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 a msgbox

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



Joined: 20 Jul 2009
Posts: 6

PostPosted: Sun Aug 02, 2009 2:00 pm    Post subject: How to print a msgbox Reply with quote

Hi,

I have a msgbox with a list of hotstrings as a sort of Help-function for users. Is it possible to have a button on there to print the list? I've searched the forum, but couldn't find anything.

Rgrds,

Ischa
Back to top
View user's profile Send private message
Guest






PostPosted: Sun Aug 02, 2009 2:16 pm    Post subject: Reply with quote

There are only certain buttons available on a MsgBox (as determined by the windows api), so no you cannot add a print button.
help file wrote:
Tip: Pressing Control-C while a MsgBox window is active will copy its text to the clipboard. This applies to all MsgBoxes, not just those produced by AutoHotkey.

The thing you could do is have a script to get the text (via a hotkey if you like) to copy the text and print it from that scriipt.
Back to top
lilalurl.T32



Joined: 17 May 2007
Posts: 391
Location: Titan

PostPosted: Sun Aug 02, 2009 4:13 pm    Post subject: Reply with quote

Anonymous wrote:
The thing you could do is have a script to get the text (via a hotkey if you like) to copy the text and print it from that scriipt.


For example, you could use FileAppend to yourfile.text and then Run, print "yourfile.txt"
________
Druze advice


Last edited by lilalurl.T32 on Sun Mar 13, 2011 6:42 am; edited 1 time in total
Back to top
View user's profile Send private message
Leef_me



Joined: 08 Apr 2009
Posts: 5336
Location: San Diego, California

PostPosted: Sun Aug 02, 2009 5:20 pm    Post subject: Re: How to print a msgbox Reply with quote

iwillems wrote:
Is it possible to have a button on there to print the list?

@iwillems, what about:
http://www.autohotkey.com/docs/commands/MsgBox.htm
>>>The names of the buttons can be customized by following this example. (See next link)

Changing MsgBox's Button Names
http://www.autohotkey.com/docs/scripts/MsgBoxButtonNames.htm

Leef_me
Back to top
View user's profile Send private message
stuboo



Joined: 17 Apr 2007
Posts: 22

PostPosted: Mon Aug 03, 2009 2:48 am    Post subject: Reply with quote

I suppose you could create a GUI that looked like a MsgBox if that's the look you're going for. Then you could create a print button and attach the appropriate action to it.

Code:

Gui, Add, Text, x6 y7 w160 h20 , Instruction 1          Ctrl+1
Gui, Add, Text, x6 y37 w160 h20 , Instruction 2          Ctrl+2
Gui, Add, Text, x6 y67 w160 h20 , Instruction 3          Ctrl+3
Gui, Add, Text, x6 y97 w160 h20 , Instruction 4          Ctrl+4
Gui, Add, Text, x176 y7 w160 h20 , Instruction 5          Ctrl+5
Gui, Add, Text, x176 y37 w160 h20 , Instruction 6          Ctrl+6
Gui, Add, Text, x176 y67 w160 h20 , Instruction 7          Ctrl+7
Gui, Add, Text, x176 y97 w160 h20 , Instruction 8          Ctrl+8
Gui, Add, Button, x66 y137 w100 h30 , Close
Gui, Add, Button, x176 y137 w100 h30 , Print
; Generated using SmartGUI Creator 4.0
Gui, Show, x131 y91 h176 w343, New GUI Window
Return

GuiClose:
ExitApp




Hope this helps,
Ryan
_________________
---
I used AutoHotKey to write this signature crazy fast.
Back to top
View user's profile Send private message
Display posts from previous:   
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