Xand3r Posted September 8, 2010 Posted September 8, 2010 (edited) is there anything i can use in autoit like the c/c++ inline if? a==b?"yes":"no"; What i want to do is something like Execute('Msgbox(0 , "" , Random(0,1,1)?"Yes":"No")') P.S.: i need the execute and no i can't use "If" Edit: i found a way... not exactly what is was looking for but will do the work Execute('Msgbox(0 , "" , lif(Random(0,1,1) , "aa" , "bb"))') Func lif($cond , $ret , $ret2 = "") If $cond Then Return $ret Return $ret2 EndFunc Edited September 8, 2010 by Xand3r Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro
Bowmore Posted September 8, 2010 Posted September 8, 2010 Have a look at _Iif($fTest, $vTrueVal, $vFalseVal) in the help file. This is more or less the function you wrote yourself. "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook
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