I have the need to set a default printer at computer start. I have created a script that points the mouse to a place where the printer should be in the window, and then selects it. This works some of the time. The problem comes when the printer window gets resized...this causes the printer to move to a different position in the window, and the wrong printer is chosen. I need a step that finds the printer wherever it is in the window, then selects it.
Here is what I have so far...
Code: Select all
Run, control printers ; opens the Devices and Printers settings page where the printers are listed
WinWaitActive, Devices and Printers
sleep, 500
click, right, 389, 489 ; right clicks on the printer that I want to choose (depending on the sizing of the window)
sleep, 500
click, 423, 527 ; chooses "Set as default printer"
Thanks