21 July, 2013

AutoHotkey Scripts: Automatically resize and move "Save As" dialog box. Close Print dialog box.

  

How to use an AutoHotkey timer to automatically resize and move "Save As" dialog box to the position of the user's choice.
Also, how to kill the Print dialog box and VLC error messages windows.

One of the most annoying things in the Windows operating system is that that "Save As", "Open" dialog boxes are unable to keep their size and position according to the user's choice. It's simply unbelievable that Microsoft can be so inept, that it can't fix such annoyances in a series of operating systems for years (apparently Microsoft spends all its time thinking how to make backdoors for NSA).

The timer executes the subroutine every second (1000 ms) and moves every "Save As" and "Open" window to the position: x=340, y=170 and resizes it to width=800, height=600. To execute the script with every computer start, one has to add a shortcut to the script to the "Startup" folder in the "Start menu"


#Persistent
SetTimer, MyTimer, 1000
return
MyTimer:
SetTitleMatchMode, 3
WinMove, Save As,,340,170,800,600
WinMove, Open,,340,170,800,600
return





The timer may also be used to kill every "Print" dialog box by adding to it "WinClose, Print". To kill the annoying error messages windows in VLC Media Player (apparently independent programmers can also be stubborn), add: "WinClose, Errors ahk_class QWidget ", "WinClose, VLC media player ahk_class #32770"



#Persistent
SetTimer, MyTimer, 1000
return
MyTimer:
SetTitleMatchMode, 3
WinMove, Save As,,340,170,800,600
WinMove, Open,,340,170,800,600
WinClose, Print
WinClose, Errors ahk_class QWidget
WinClose, VLC media player ahk_class #32770
return




No comments:

Post a Comment