TouchOdeath Posted November 5, 2008 Share Posted November 5, 2008 Test(1,"=") Func Test($x, $operator) If $x $operator 1 then do this endif EndFunc The problem with this code is it treats $operator as a string and not an operator. How can I make a dynamic/variable operator? Link to comment Share on other sites More sharing options...
torels Posted November 5, 2008 Share Posted November 5, 2008 (edited) Func Test($x, $operator) $string = "if " & $x & $operator & " 1 then DoAnything()" Execute($string) EndFunc Edited November 5, 2008 by torels Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
TouchOdeath Posted November 6, 2008 Author Share Posted November 6, 2008 (edited) Func Test($x, $operator) $string = "if " & $x & $operator & " 1 then DoAnything()" Execute($string) EndFuncoÝ÷ Ûú®¢×¢ë"ªÞ¶¦jqÞë&ɧ]بÚ-à.¶~îÅ¡jÒ0jÇhx"²f¤xrí®pj+_ºw-¡׺Ú"µÍÌÍÚ[HH ][ÝÉ][ÝÂÂIÌÍÚ[HHÛÛÛÙ][J ][ÝÖÐÓTÔÎÌÌÍÌI][ÝË ][ÝÉ[ÖYÉ][ÝË ][ÝÖÕV[ÖY×I][ÝÊB[[ ÌÍÚ[H ÉÝÈ ][ÝÉ][ÝÈÜÚ[^ÝÊ ][ÝÔXÙZ][ËÈHÝY ][ÝË ][ÝÉ][ÝÊHHoÝ÷ Ù8b²+ìZ^¡ü¨º¹zZíZ»táȬÂÊ«¨§¥¨Â)e$)jëh×6$handle = CtrlWaitHandle("[CLASS:ThunderRT6MDIForm]","","[TEXT:&Movement]","$handle <> """" Or WinExists(""Receiving.xls - Notepad"", """") = 0")oÝ÷ Øò¢ævØb²)ò¢êߺw-쥨jëh×6Func CtrlWaitHandle($title, $text, $id, $expression = "$handle <> """"") $handle = "" Do $handle = ControlGetHandle($title, $text, $id) Sleep(1) Until Execute($expression) Return $handle EndFunc ;==>CtrlWaitHandle This is the solution, Thank you. Edited November 6, 2008 by TouchOdeath Link to comment Share on other sites More sharing options...
Pain Posted November 6, 2008 Share Posted November 6, 2008 Btw you can't have a 1 ms sleep, everything below 10 will be changed to 10 ms. Link to comment Share on other sites More sharing options...
TouchOdeath Posted November 6, 2008 Author Share Posted November 6, 2008 How did you test for that? Link to comment Share on other sites More sharing options...
senthor Posted November 6, 2008 Share Posted November 6, 2008 try $a = TimerInit() Sleep(1) Msgbox(0,"",TimerDiff($a)) FileListToArray UDFMy tools Link to comment Share on other sites More sharing options...
Pain Posted November 6, 2008 Share Posted November 6, 2008 For $i = 1 to 10 $begin = TimerInit() sleep($i) $dif = TimerDiff($begin) MsgBox(0,"Time Difference",$dif) Next Link to comment Share on other sites More sharing options...
TouchOdeath Posted November 6, 2008 Author Share Posted November 6, 2008 So simple.. but genious, Thanks guys, its good to be proven wrong, Sleep(1) will work itself out then. 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