AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to print the aktive ahk-dialog to standartprinter ?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Grendel



Joined: 18 Nov 2005
Posts: 25
Location: Germany

PostPosted: Wed Mar 29, 2006 3:56 pm    Post subject: how to print the aktive ahk-dialog to standartprinter ? Reply with quote

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
View user's profile Send private message
Greg



Joined: 22 Dec 2005
Posts: 246

PostPosted: Wed Mar 29, 2006 4:01 pm    Post subject: Reply with quote

FileAppend the information. Then Run, print "File.txt"
Back to top
View user's profile Send private message
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Wed Mar 29, 2006 4:22 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Greg



Joined: 22 Dec 2005
Posts: 246

PostPosted: Wed Mar 29, 2006 4:41 pm    Post subject: Reply with quote

I think the idea was he wanted a dialog button like "print." In which case using only AHK is easier.
Back to top
View user's profile Send private message
Guest






PostPosted: Thu Mar 30, 2006 10:19 am    Post subject: Reply with quote

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 ?!? Question
Back to top
Grendel



Joined: 18 Nov 2005
Posts: 25
Location: Germany

PostPosted: Thu Mar 30, 2006 10:21 am    Post subject: Reply with quote

btw....this could give us a nice new internal command (eg. CLIPPRINT) , what do you mean ?
_________________
greets Grendel
Back to top
View user's profile Send private message
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Thu Mar 30, 2006 10:26 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Grendel



Joined: 18 Nov 2005
Posts: 25
Location: Germany

PostPosted: Thu Mar 30, 2006 11:40 am    Post subject: Reply with quote

ok, than I try Irfanview first.
If someone discover a DLLCALL for it, let me now..

big thanks for your help.. Very Happy
_________________
greets Grendel
Back to top
View user's profile Send private message
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Thu Mar 30, 2006 12:27 pm    Post subject: Reply with quote

i_view32.exe /clippaste /print
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
Grendel



Joined: 18 Nov 2005
Posts: 25
Location: Germany

PostPosted: Thu Mar 30, 2006 1:21 pm    Post subject: Reply with quote

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 Smile
_________________
greets Grendel
Back to top
View user's profile Send private message
Grendel



Joined: 18 Nov 2005
Posts: 25
Location: Germany

PostPosted: Thu Mar 30, 2006 3:16 pm    Post subject: Reply with quote

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 Cool
_________________
greets Grendel
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group