Page 1 of 1

get or set default printer

Posted: Mon Jun 17, 2024 4:46 pm
by photoevents
Next question:
How can I GET or SET the default printer?
or SELECT printer and save to a variable to use in subsequent printing ?

I want to be able to print certain images to printer1, others to printer2, and so on.

Thank you,
Christian

Re: get or set default printer

Posted: Mon Jun 17, 2024 7:07 pm
by Oleg
Take a look on Print Document action

Re: get or set default printer

Posted: Tue Jun 18, 2024 9:02 am
by photoevents
I can't use print document action to get and save a printer to a variable.
An action 'Browse for printers' would be a nice add-on.
Mind you, as I work more with robotask I seem to find alternative ways of doing things.
So, this is not a must or urgent but just easier.

Christian

Re: get or set default printer

Posted: Wed Jun 19, 2024 8:55 pm
by felipe
execute powershell to get all printers
Get-Printer | Format-List



and this to get active printer
Get-WmiObject -Query "SELECT * FROM Win32_Printer WHERE Default = TRUE"

Re: get or set default printer

Posted: Thu Jun 20, 2024 9:03 am
by photoevents
Thank you Felipe.