AustrianOak Posted June 24, 2008 Share Posted June 24, 2008 Can I format my case statement like this without getting an error: Case $msg = $pic1 AND $pic2 My goal is to check if a picture is clicked and also if a function has been "run through" before I want it to go to that certain Case statement. I am extremely stumped on this but I know what I want to do. Can this be accomplished? Link to comment Share on other sites More sharing options...
Valuater Posted June 24, 2008 Share Posted June 24, 2008 well... did "You" try it?? 8) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 24, 2008 Moderators Share Posted June 24, 2008 well... did "You" try it??8)lol... he did say he was stumped...msg = x and msg = y Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
AustrianOak Posted June 24, 2008 Author Share Posted June 24, 2008 Ahh... thank you Smoke_N! Link to comment Share on other sites More sharing options...
martin Posted June 24, 2008 Share Posted June 24, 2008 lol... he did say he was stumped... msg = x and msg = yIf you want to detect a pic has been click and some other condition has occurred then $msg = x and $msg = y will never work unless x and y are the same because $msg will either be one or the other. Select Case $msg = $pic1 And $functionrun = true Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 24, 2008 Moderators Share Posted June 24, 2008 If you want to detect a pic has been click and some other condition has occurred then $msg = x and $msg = y will never work unless x and y are the same because $msg will either be one or the other. Select Case $msg = $pic1 And $functionrun = trueDon't think I need a lesson on what would or wouldn't work... I only showed the OP how to use an And statement. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
AustrianOak Posted June 24, 2008 Author Share Posted June 24, 2008 Don't think I need a lesson on what would or wouldn't workyou're right, you need a lesson on how to use sarcasm more effectively. Link to comment Share on other sites More sharing options...
MHz Posted June 24, 2008 Share Posted June 24, 2008 you're right, you need a lesson on how to use sarcasm more effectively.Sad comment. You are not very smart. You already seemed to have reached the smartass grade. Bye. Link to comment Share on other sites More sharing options...
martin Posted June 24, 2008 Share Posted June 24, 2008 Don't think I need a lesson on what would or wouldn't work... I only showed the OP how to use an And statement.Please don't think I was trying to give you a lesson SmOke_N, my post was not intended for you. I thought, since the OP asked the question he did, that I should point out that he could not actually do, literally, what you posted. I'm sorry if I offended you; I do not know as much as you do and I doubt anyone thinks otherwise. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
aslani Posted June 24, 2008 Share Posted June 24, 2008 (edited) If you want to detect a pic has been click and some other condition has occurred then $msg = x and $msg = y will never work unless x and y are the same because $msg will either be one or the other. Select Case $msg = $pic1 And $functionrun = true So you mean to say the following isn't true? $len = StringLen("bob") $rnd = Random(1, 5, 1) ... Case $msg = $len AND $msg = $rnd ... ??? Edited June 24, 2008 by aslani [font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version Link to comment Share on other sites More sharing options...
martin Posted June 24, 2008 Share Posted June 24, 2008 So you mean to say the following isn't true? $len = StringLen("bob") $rnd = Random(1, 5, 1) ... Case $msg = $len AND $msg = $rnd ... ???I didn't say that and I don't see how you decided I did. I said that unless the two values are the same, but maybe I should have said unless the three values are the same. This would be the same as your version Case $rnd = $len And $msg = $len Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
AustrianOak Posted June 24, 2008 Author Share Posted June 24, 2008 Sad comment. You are not very smart. You already seemed to have reached the smartass grade. Bye. Why are you telling me Bye? You didn't think I was going to get banned for a comment like that did you? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 24, 2008 Moderators Share Posted June 24, 2008 Please don't think I was trying to give you a lesson SmOke_N, my post was not intended for you. I thought, since the OP asked the question he did, that I should point out that he could not actually do, literally, what you posted. I'm sorry if I offended you; I do not know as much as you do and I doubt anyone thinks otherwise.I could have misinterpreted it, the fact that you "quoted" me without any iteration to the OP is what led me to believe it. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 24, 2008 Moderators Share Posted June 24, 2008 you're right, you need a lesson on how to use sarcasm more effectively.If I was trying to be sarcastic, maybe I'd take that lesson.Why are you telling me Bye? You didn't think I was going to get banned for a comment like that did you?No, but you aren't earning any "help me" brownie points either. I will indeed avoid any further contact with you and or your posts for help, and encourage others to do the same. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now