Jump to content

Recommended Posts

Posted

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?

Posted (edited)

Func Test($x, $operator)
$string = "if " & $x & $operator & " 1 then DoAnything()"
Execute($string)
EndFunc

Edited 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

Posted (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 by TouchOdeath
Posted

For $i = 1 to 10
    $begin = TimerInit()
    sleep($i)
    $dif = TimerDiff($begin)
    MsgBox(0,"Time Difference",$dif)
Next

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
×
×
  • Create New...