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 

several breaks

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





PostPosted: Thu Jul 22, 2004 7:30 pm    Post subject: several breaks Reply with quote

suppose i have the following script:

Code:
loop
{
loop
{
break
}
}


how can i make the break count twice but not like this:

Code:
loop
{
loop
{
break
}
break
}
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Jul 22, 2004 8:30 pm    Post subject: Reply with quote

The way to do it is with a variable:
Code:
continue_outer_loop = y
loop
{
   loop
   {
      continue_outer_loop = n
      break
   }
   if continue_outer_loop = n
      break
}

You could also do a return or an exit if you want to break out of all enclosing blocks and return to the caller (or, in the case of exit, terminate the current thread).
Back to top
View user's profile Send private message Send e-mail
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