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 create a yes no message box with a goto a label.

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



Joined: 16 Jun 2007
Posts: 280

PostPosted: Tue Jun 19, 2007 10:33 am    Post subject: How to create a yes no message box with a goto a label. Reply with quote

I created that post to help new user with Yes No MSGBox + goto a lebel simple and usefull.

Here is my script
Code:
Label(debut)
MSGBox, 4, , Do you want to make a yes no choice?
IfMsgBox, No
Exit
IfMsgBox, Yes
Goto, debut


It should ask Do you want to make a yes no choice?
and if you click NO it shoud exit, yes it shoud ask the question again, but it is not working.
Back to top
View user's profile Send private message
Travley



Joined: 13 May 2007
Posts: 47

PostPosted: Tue Jun 19, 2007 10:35 am    Post subject: Reply with quote

Give me about 20 more minutes and Ill have something to share with you very similar to this Smile
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 8688

PostPosted: Tue Jun 19, 2007 11:02 am    Post subject: Reply with quote

Code:
Debut:
  MSGBox, 4, , Do you want to make a yes no choice?
  IfMsgBox, No
    Exit
  Else
    GoSub, Debut
Return


Question

@Travley: I am waiting for over 20 Mins Rolling Eyes Smile
Back to top
View user's profile Send private message Send e-mail
Travley



Joined: 13 May 2007
Posts: 47

PostPosted: Tue Jun 19, 2007 11:08 am    Post subject: Reply with quote

Skan, Please answer http://www.autohotkey.com/forum/viewtopic.php?t=20269 if you can. Everything else is already ready, Im just confused on that last bit.

Thank You.

Also its not DIRECTLY related to Multi-Button Menus (Though it is in a way) and could be upgraded to do way more then Im currently already doing.

We shall see soon *tired and happy!*
Back to top
View user's profile Send private message
feejo



Joined: 16 Jun 2007
Posts: 280

PostPosted: Tue Jun 19, 2007 11:50 am    Post subject: Reply with quote

Travley wrote:
Skan, Please answer http://www.autohotkey.com/forum/viewtopic.php?t=20269 if you can. Everything else is already ready, Im just confused on that last bit.

Thank You.

Also its not DIRECTLY related to Multi-Button Menus (Though it is in a way) and could be upgraded to do way more then Im currently already doing.

We shall see soon *tired and happy!*


We are happy and tired lol. I email the support and beg him to update the goto to place a remark with Label, WE SHALL NOT WRITE LABEL but just the name of the label with :
Back to top
View user's profile Send private message
feejo



Joined: 16 Jun 2007
Posts: 280

PostPosted: Tue Jun 19, 2007 11:55 am    Post subject: Reply with quote

I want to perform now 2 command if No is choose.

Code:
MsgBox, 4, , Question?
IfMsgBox, No
Send, {CTRLDOWN}{UP}{CTRLUP} Goto, label1
IfMsgBox, Yes
Goto, label2
Back to top
View user's profile Send private message
Grumpy
Guest





PostPosted: Tue Jun 19, 2007 12:23 pm    Post subject: Reply with quote

I still don't see where you saw that.
You should read the tutorial and the first pages of the manual, like the one on scripts.
To have more than one command under a condition, you have to surround them by braces: { } each on a separate line (and one command per line too).
Back to top
feejo



Joined: 16 Jun 2007
Posts: 280

PostPosted: Tue Jun 19, 2007 1:05 pm    Post subject: Reply with quote

Grumpy wrote:
I still don't see where you saw that.
You should read the tutorial and the first pages of the manual, like the one on scripts.
To have more than one command under a condition, you have to surround them by braces: { } each on a separate line (and one command per line too).


Like this
MsgBox, 4, , Question?
{
IfMsgBox, No
Send, {CTRLDOWN}{UP}{CTRLUP}
Goto, label1
}
IfMsgBox, Yes
Goto, label2
Back to top
View user's profile Send private message
TheIrishThug



Joined: 19 Mar 2006
Posts: 419

PostPosted: Tue Jun 19, 2007 1:19 pm    Post subject: Reply with quote

Code:
MsgBox, 4, , Question?
IfMsgBox, No
{
Send, {CTRLDOWN}{UP}{CTRLUP}
Goto, label1
}
IfMsgBox, Yes
Goto, label2
Back to top
View user's profile Send private message Visit poster's website AIM Address
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