Skip to content

Instantly share code, notes, and snippets.

@seuros
Forked from mubix/windowroulette.rb
Last active January 3, 2016 02:39
Show Gist options
  • Save seuros/8397005 to your computer and use it in GitHub Desktop.
Save seuros/8397005 to your computer and use it in GitHub Desktop.
# Code loops around each of the windows
# that the current user has open and switches
# focus to each of them in rotation... 100 times.
100.times do |x|
windows = client.extapi.window.enumerate
windows.each do |winder|
if winder[:title] != 'Default IME'
result = client.railgun.user32.SetForegroundWindow(winder[:handle])
end
end
print_status("Round #{x+1}")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment