public
Created

Window Roulette

  • Download Gist
windowroulette.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13
# 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])
end
end
print_status("Round #{x}")
end

I updated the code @ https://gist.github.com/seuros/8397005
Your current code loops 101 times instead of 100.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.