 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
edu
Joined: 12 Oct 2006 Posts: 88 Location: Canada
|
Posted: Fri Jan 04, 2008 7:28 pm Post subject: how to detect or retrieve the default printer? |
|
|
Hello forum,
I would like to improve this script:
| Code: | #Persistent
SetTimer, printswitch, 5000
return
printswitch:
SetTitleMatchMode, 2
IfWinActive, Purolator,
Run, RUNDLL32 PRINTUI.DLL `,PrintUIEntry /y /n "Lexmark Optra T610 PS"
IfWinActive, Create Shipment,
Run, RUNDLL32 PRINTUI.DLL `,PrintUIEntry /y /n "BOCACAN"
IfWinNotExist, Create Shipment,
Run, RUNDLL32 PRINTUI.DLL `,PrintUIEntry /y /n "Lexmark Optra T610 PS"
return
!f10::Reload |
The problem is that is that at every so many given seconds it runs rundll32 and sets Lexmark as the default printer. But I would like to know how to change this script so that if Lexmark is already the default printer, the script won't run this line again:
Run, RUNDLL32 PRINTUI.DLL `,PrintUIEntry /y /n "Lexmark Optra T610 PS"
Where is that information stored? I assume somewhere in the registry but I never did anything with Autohotkey and registry before. So I could you some help  _________________ The best things of life are free. |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6772 Location: Pacific Northwest, US
|
|
| Back to top |
|
 |
edu
Joined: 12 Oct 2006 Posts: 88 Location: Canada
|
Posted: Fri Jan 04, 2008 8:13 pm Post subject: |
|
|
Thanks, enguneer, I will work on that.
Edu _________________ The best things of life are free. |
|
| Back to top |
|
 |
controlfreak
Joined: 13 Apr 2007 Posts: 7 Location: Unterschleißheim, BY, DE
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|