C
C#2y ago
FroH.LVT

Interactive with Print Window and Save File Dialog

I'm trying to automate the print action. - Print action can be called by any software ( no direct access, no available API ) then we will have two steps to complete action: 1. Select Printer Screen: always use the default option then press OK button for 2nd step 2. Input fileName then save - I've tried automating it using *SendKey * but it's not reliable enough I wonder are there any WinAPI that support this operation or anyway that I can configure Print Spools to skip this print window popup and print automatically at a specific location plus file name generation.
2 Replies
Becquerel
Becquerel2y ago
have you tried using autohotkey for this instead of c#? it seems like that's more appropriate to this kind of problem
FroH.LVT
FroH.LVT2y ago
Yes, I've tried SendKey.SendWait(key). It works but as I said It's not reliable. Sometimes file save location is changed and if i'm not wrong, each software has their own explorer's save file location . Eg: software A will save at C:\ otherwise software B will save at D: