| View previous topic :: View next topic |
| Author |
Message |
ahk_man
Joined: 20 Jun 2004 Posts: 39
|
Posted: Sun Sep 05, 2004 5:34 pm Post subject: linking comands to buttons |
|
|
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 |
|
 |
BoBo Guest
|
Posted: Sun Sep 05, 2004 5:46 pm Post subject: |
|
|
| 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
|
Posted: Sun Sep 05, 2004 8:37 pm Post subject: bobo it didn't work |
|
|
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
|
Posted: Sun Sep 05, 2004 9:17 pm Post subject: |
|
|
| 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.  |
|
| Back to top |
|
 |
Jon
Joined: 28 Apr 2004 Posts: 373
|
Posted: Sun Sep 05, 2004 9:27 pm Post subject: |
|
|
| 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 |
 |
|
| Back to top |
|
 |
Guest
|
Posted: Mon Sep 06, 2004 4:15 am Post subject: Thanks guys |
|
|
| Thanks a lot guys! The code went smooth now, it worked. |
|
| Back to top |
|
 |
|