ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Screenshot Captor

want to invoke PrinterDialog, using -setprinter?

(1/2) > >>

towser:
Hello.
I am currently trying to make a command line batch file using MiniCap.
What i intend to do is simply capture the active window, and invoke the printing dialog.
Automatically print does of course work using "-print", but only invokes the default printer.

Is it possible to somehow invoke the Windows PrintingDialog, and select the desired printer?
-- either using MiniCap or using win batch code
If yes, how would i use it in the batch file?

My code so far in "mcprint.bat" (as mentioned, nothing special):

@echo off
"\MiniCap.exe" -captureactivewin -print -exit

--- End quote ---


Thank you for your time!
-towser

Ath:
Changing the default printer can be done using rundll32 like this:

--- Code: Text ---rundll32 printui.dll,PrintUIEntry /y /q /n "Printer name"
Source

Some more info on PrintUI can be found here

towser:
thank you so much for your reply!
thought it could be "easier" than using rundll32
will do some reading now and use that ;)

mouser:
Ath's solution may work and is a good general solution when you need to set the default printer for any app,

BUT you are using MiniCap, which has a way to specify the printer to use and does not require changing the default printer.

From the MiniCap help file, pass commandline option "-setprinter" as follows:

-setprinter PRINTERNAME
sets a specific printer for printing (to get a list invoke -setprinter list); you can use the full name or a substring

towser:
hello again.
i had found "-setprinter list" before, but had trouble using it, as it would not produce any result, or "list" at all on execution, but only after i was "done" doing the screenshot, and had my batch file completed.
what i intend to do is
- automatically take a screenshot of the fullscreen, or last active window
- print this
- for printing use the default fancy gui that you get when you want to print any image under windows, and have the printer selected manually within this gui

meaning i would rather not like to pass the printername on commandline, but have the user select it manually after the screenshot has been taken
i suppose i could use "run" as commandline, and define the printing gui as parameter, if there was something like this...
or alternatively, copy the screenshot to clipboard, and invoke the printing gui using this clipboard?

-regards

Navigation

[0] Message Index

[#] Next page

Go to full version