Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/21/2013 in all areas

  1. I ran the code, it doesn't error on those macros, it just sees them as being 0 so the While loop never runs.
    1 point
  2. JohnOne

    WinAPIEx UDF

    http://www.autoitscript.com/site/autoit/downloads/ latest release version is 3.3.8.1
    1 point
  3. LarsJ

    Rubik's Cube

    Fixed some errors in the Build menu. Added a log to see the colors of all sides at one time: Added updated zipfile in first post.
    1 point
  4. guinness

    10!

    I think I learnt something too, though I won't let you know what!
    1 point
  5. Xenobiologist

    10!

    $sum = sum(10) MsgBox(0, "Total", "Total:" & $sum) Func sum($x) $y = 10 For $i = 10 To 1 Step -1 $y -= 1 $x += $x * $y Next Return $x EndFunc ;==>sum
    1 point
  6. water

    10!

    Change line For $i = 10 To 1 Step -1toFor $i = 10 To 2 Step -1Because if you go down to 1 and then subtract 1 you multiply with 0.
    1 point
  7. Why not pass it as a parameter instead? UDFs work in a way that all variable should be declared prior to the user implementing it in their script. If you don't want to "clog" up the _CW parameters, then you could something like this >> (though not recommended) #include-once #include <FileConstants.au3> Global $__sCWLogFile = @ScriptDir & '\LogFile.log' ; Default log file variable placed at the top of the UDF. ; A user just has to call the relevant function. Func _CW_GetLogFile() Return $__sCWLogFile EndFunc ;==>_CW_GetLogFile Func _CW_SetLogFile($sLogFile) If FileExists($sLogFile) = 0 Then FileClose(FileOpen($sLogFile, $FO_OVERWRITE)) ; Create the file if it doesn't exist. EndIf $__sCWLogFile = $sLogFile EndFunc ;==>_CW_SetLogFile
    1 point
  8. water

    help

    Nunos, could you please add a more descriptive title to your threads? Everyone on this forum is seeking for help. A descriptive title helps people to easily decide if they can help on the subject.
    1 point
  9. Try one of these codes for second parameter, or leave it out. EDIT: It is not a string.
    1 point
×
×
  • Create New...