I'm trying to prevent that my script does not hang on certain occasions like the ones that occur below.
Code: Select all
RunWait, C:\Windows\System32\RUNDLL32.exe PRINTUI.DLL`,PrintUIEntry /y /n"\\HOSTEST\PRINTER"
Code: Select all
RunWait, C:\Windows\System32\RUNDLL32.exe PRINTUI.DLL`,PrintUIEntry /y /n"\\HOSTEST\PRINTER", UseErrorLevel
If ErrorLevel = ERROR
{
MsgBox, Problema to run!
}
Code: Select all
Try
RunWait, C:\Windows\System32\RUNDLL32.exe PRINTUI.DLL`,PrintUIEntry /y /n"\\HOSTEST\PRINTER"
catch e
{
MsgBox, Problema to run!
}