Sign in to follow this  
Followers 0
Hooch

Select and case statements

7 posts in this topic

Select

Case $MSG = $CMD_PAUSE OR $MSG = "cmdPause"

EndSelect

Some languages allow more than one argument on the case statement. From the help file it does't look like autoit does, but ya never know :ph34r:

I am getting odd behaivor from my tests so I am thinking the "OR" is not going to work.

Share this post


Link to post
Share on other sites



Hmm my case responds correctly wether I do $msg = "string or $msg == "string"

What I was trying to do there is :

Case $msg = $var OR $msg = "string"

See there are buttons in the main gui that are the same as the child, the child is an always on top "quick bar" so the two sets of buttons execute the same code. I just don't want to have to make 2 case statements for each set. I was hoping I could have one case cover both types of input, from the $button event in the main app or the text message sent via AutoItWinSetTitle.

Share this post


Link to post
Share on other sites

You know... it would of been a hell of a lot quicker to just test this instead of ask it.

Share this post


Link to post
Share on other sites

You know... it would of been a hell of a lot quicker to just test this instead of ask it.

To be fair, he did say he'd read the helpfile and was getting strange results when testing it. :ph34r:

Share this post


Link to post
Share on other sites

ya! :ph34r:

Share this post


Link to post
Share on other sites

I know I am asking some stupid questions, I try not to. I do search the help file and the forums prior to every question. I'm new but I am going to be around for long time I expect, give a newb a break :ph34r:

Share this post


Link to post
Share on other sites

I didn't see his last sentence, I must of scrolled it off-screen when I looked at Larry's post.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0