AutoHotkey Community

It is currently May 27th, 2012, 7:17 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: March 29th, 2006, 4:56 pm 
Offline

Joined: November 18th, 2005, 11:18 pm
Posts: 25
Location: Germany
Any ideas, how to print out the aktive ahk-dialog to the standardprinter?
(i wanna use a button inside the dialog)

_________________
greets Grendel


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 29th, 2006, 5:01 pm 
Offline

Joined: December 22nd, 2005, 7:43 pm
Posts: 245
FileAppend the information. Then Run, print "File.txt"


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 29th, 2006, 5:22 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Or use some program to do a screen capture (like IrfanView or MWSnap) and ask it to print it...

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 29th, 2006, 5:41 pm 
Offline

Joined: December 22nd, 2005, 7:43 pm
Posts: 245
I think the idea was he wanted a dialog button like "print." In which case using only AHK is easier.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2006, 11:19 am 
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 ?!? :?:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2006, 11:21 am 
Offline

Joined: November 18th, 2005, 11:18 pm
Posts: 25
Location: Germany
btw....this could give us a nice new internal command (eg. CLIPPRINT) , what do you mean ?

_________________
greets Grendel


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2006, 11:26 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
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.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2006, 12:40 pm 
Offline

Joined: November 18th, 2005, 11:18 pm
Posts: 25
Location: Germany
ok, than I try Irfanview first.
If someone discover a DLLCALL for it, let me now..

big thanks for your help.. :D

_________________
greets Grendel


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2006, 1:27 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
i_view32.exe /clippaste /print

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2006, 2:21 pm 
Offline

Joined: November 18th, 2005, 11:18 pm
Posts: 25
Location: Germany
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2006, 4:16 pm 
Offline

Joined: November 18th, 2005, 11:18 pm
Posts: 25
Location: Germany
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 8)

_________________
greets Grendel


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Exabot [Bot], oldbrother, sjc1000 and 70 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group