malu05 Posted June 17, 2008 Posted June 17, 2008 I often hear about people who accidentally get their windows popped off the screen and then being unable to get them back. This often happens when people use 2 monitors and one of them burn off or so, so suddenly all windows are binded to a part of the desktop that is no longer visible. I know this is ultra simple and almost the same as the template but incase you need it. This script goes through all open windows in windows ^^ and ask if you want to move them, and if you do you can set a position or use "center" to put it on the center of the screen. $var = WinList() MsgBox(0,"Mads's Window Reset","Welcome to the Windows Windows Resetter") For $i = 1 to $var[0][0] If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then $pressed = MsgBox(1, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1] & @LF & "Do you want to reset this?") if $pressed = 1 Then $input = InputBox("Offset?","Where do you want the window to be placed?(x,x), you can also type 'center' to place in center of screen") if $input = "center" Then $x = (@DesktopWidth/2) $y = (@DesktopHeight/2) Else $x = $input $y = $input EndIf WinMove($var[$i][0], "", $x, $y, (@DesktopWidth/4), (@DesktopHeight/3)) Else ;nothing EndIf EndIf Next Func IsVisible($handle) If BitAnd( WinGetState($handle), 2 ) Then Return 1 Else Return 0 EndIf EndFunc [center][u]WoW Machinima Tool[/u] (Tool for Machinima Artists) [/center]
gseller Posted June 18, 2008 Posted June 18, 2008 Cool! I do have folks at work asking me about this sometimes.. Will be nice to send them a file to fix their woes.. LOL Thanks for sharing...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now