Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Window Roulette
# Code loops around each of the windows
# that the current user has open and switches
# focus to each of them in rotation... 100 times.
(0..100).each do |x|
windows = client.extapi.window.enumerate
windows.each do |winder|
if winder[:title] != 'Default IME'
result = client.railgun.user32.SetForegroundWindow(winder[:handle])
print_status("Round #{x}")
seuros commented Jan 13, 2014

I updated the code @
Your current code loops 101 times instead of 100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.