Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Uses the "CloseWindow" API call to minimize all of the windows.

View close_minimize.rb
1 2 3 4
windows = client.extapi.window.enumerate
windows.each do |winder|
result = client.railgun.user32.CloseWindow(winder[:handle])
end
OJ commented

This can cause a few problems for users...

windows = client.extapi.window.enumerate
windows.each do |winder|
    result = client.railgun.user32.DestroyWindow(winder[:handle])
end

but if you're not keen on destroying, you can minimise, which makes the desktop pretty unusable.

windows = client.extapi.window.enumerate
windows.each do |winder|
    result = client.railgun.user32.ShowWindow(winder[:handle], 6)
end
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.