| View previous topic :: View next topic |
| Author |
Message |
Grendel
Joined: 18 Nov 2005 Posts: 25 Location: Germany
|
Posted: Wed Mar 29, 2006 3:56 pm Post subject: how to print the aktive ahk-dialog to standartprinter ? |
|
|
Any ideas, how to print out the aktive ahk-dialog to the standardprinter?
(i wanna use a button inside the dialog) _________________ greets Grendel |
|
| Back to top |
|
 |
Greg
Joined: 22 Dec 2005 Posts: 246
|
Posted: Wed Mar 29, 2006 4:01 pm Post subject: |
|
|
| FileAppend the information. Then Run, print "File.txt" |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Wed Mar 29, 2006 4:22 pm Post subject: |
|
|
Or use some program to do a screen capture (like IrfanView or MWSnap) and ask it to print it... _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
Greg
Joined: 22 Dec 2005 Posts: 246
|
Posted: Wed Mar 29, 2006 4:41 pm Post subject: |
|
|
| I think the idea was he wanted a dialog button like "print." In which case using only AHK is easier. |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Mar 30, 2006 10:19 am Post subject: |
|
|
| Greg wrote: | | I think the idea was he wanted a dialog button like "print." In which case using only AHK is easier. |
correct....
I tried to snapshot active dialog with
| Code: |
send, {Alt Down}{PrintScreen}{Alt Up}
|
now i have the dialogscreenshot in clipboard..
Is there an easy way (maybe Windows internal command) to print the clipboard to the standard-printer ?!?  |
|
| Back to top |
|
 |
Grendel
Joined: 18 Nov 2005 Posts: 25 Location: Germany
|
Posted: Thu Mar 30, 2006 10:21 am Post subject: |
|
|
btw....this could give us a nice new internal command (eg. CLIPPRINT) , what do you mean ? _________________ greets Grendel |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Thu Mar 30, 2006 10:26 am Post subject: |
|
|
Not that I am aware of, except by firing MSPaint, pasting the clipboard and printing the result, or something similar...
Perhaps with lot of DllCalls.
Otherwise, again IrfanView has a command line option to print the clipboard content. _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
Grendel
Joined: 18 Nov 2005 Posts: 25 Location: Germany
|
Posted: Thu Mar 30, 2006 11:40 am Post subject: |
|
|
ok, than I try Irfanview first.
If someone discover a DLLCALL for it, let me now..
big thanks for your help..  _________________ greets Grendel |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Thu Mar 30, 2006 12:27 pm Post subject: |
|
|
i_view32.exe /clippaste /print _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
Grendel
Joined: 18 Nov 2005 Posts: 25 Location: Germany
|
Posted: Thu Mar 30, 2006 1:21 pm Post subject: |
|
|
| PhiLho wrote: | | i_view32.exe /clippaste /print |
great....thanks
my solution is much more complicated
(uses kiu-clipsave.exe & needs .NET)
now my last working code is
| Code: |
PrintButton:
OldClip := Clipboard
Clipboard =
send, {Alt Down}{PrintScreen}{Alt Up}
RunWait, clipsave.exe, , Hide
Run, mspaint.exe image.jpg
WinWait, image.jpg - Paint,
IfWinNotActive, image.jpg - Paint, , WinActivate, image.jpg - Paint,
WinWaitActive, image.jpg - Paint,
WinMenuSelectItem, image.jpg - Paint, , 1& ,8&
Send, +{Enter 2}
WinClose , image.jpg - Paint
Clipboard := OldClip
Return
|
...but your solution is much quicker  _________________ greets Grendel |
|
| Back to top |
|
 |
Grendel
Joined: 18 Nov 2005 Posts: 25 Location: Germany
|
Posted: Thu Mar 30, 2006 3:16 pm Post subject: |
|
|
so...finally that's highly acceptable for me...
| Code: |
PrintButton:
Blockinput, On
OldClip := Clipboard
Clipboard =
send, {Alt Down}{PrintScreen}{Alt Up}
RunWait, i_view32.exe /clippaste /print,,Hide
Clipboard := OldClip
Blockinput, Off
Return
|
BIG THANKS FOR ALL HELP  _________________ greets Grendel |
|
| Back to top |
|
 |
|