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 

linking comands to buttons

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



Joined: 20 Jun 2004
Posts: 39

PostPosted: Sun Sep 05, 2004 5:34 pm    Post subject: linking comands to buttons Reply with quote

Hi Chris,
I want to do this:

Msgbox,Click ok the ok button to run notepad. If you don't want to run notepad then click cancel.


My question is: how do I link a command to a button? Please provide good example. thank you for everything.
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Sun Sep 05, 2004 5:46 pm    Post subject: Reply with quote

Code:
Msgbox, 1, Test, Click the OK button to run notepad.`nIf you don't want to run notepad then click cancel
IfMsgBox <> OK, ExitApp
Run, Notepad
Back to top
Guest






PostPosted: Sun Sep 05, 2004 8:37 pm    Post subject: bobo it didn't work Reply with quote

bobo,
I cut and paste your code on a notepad and try to run it but it game me errors. you sure you didn't make a typo?
Back to top
Beastmaster



Joined: 15 Apr 2004
Posts: 181

PostPosted: Sun Sep 05, 2004 9:17 pm    Post subject: Reply with quote

Code:
Msgbox, 1, Test, Click the OK button to run notepad.`nIf you don't want to run notepad then click Cancel.
     IfMsgBox <> OK
        ExitApp
Run, Notepad


This should work, Btw: if an error occurs would you be so kind to provide its statement. That would help a lot! Thx. Wink
Back to top
View user's profile Send private message
Jon



Joined: 28 Apr 2004
Posts: 373

PostPosted: Sun Sep 05, 2004 9:27 pm    Post subject: Reply with quote

Code:
Msgbox, 1, Test, Click the OK button to run notepad.`nIf you don't want to run notepad then click Cancel.
     IfMsgBox, Cancel, ExitApp
Run, Notepad


Wink
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Mon Sep 06, 2004 4:15 am    Post subject: Thanks guys Reply with quote

Thanks a lot guys! The code went smooth now, it worked.
Back to top
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