# 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])