Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/08/2012 in all areas

  1. let's say you wanna put your code in a text file called 'Test.txt' To run the code in Test.txt use this $TextFile = "Test.txt" RunWait('"' & @AutoItExe & '" /AutoIt3ExecuteScript ' & $TextFile) You have to see Running Scripts in the help file
    1 point
  2. Jos

    Constantly changing GUI Output

    Correct, ... here is a version with a brief explanation: While 1 $FileList = _FileListToArray($filefolder, $fileextension) ;only list files with given extension ; Check if Files were found If $FileList <> 0 Then ; When files are found, check if the number of files changed If $FileList[0] <> $lastlabel Then ;Update the CONTROL in the GUI and save the new value when different GUICtrlSetData($Label, "Jobs: " & $FileList[0]) $lastlabel = $FileList[0] EndIf Else ; When NO files are found, check if the number of files isn'r 0 yet. If $lastlabel <> 0 Then ;Update the CONTROL in the GUI and save the new value when different GUICtrlSetData($Label, "Jobs: Null ") $lastlabel = 0 EndIf EndIf WEnd Problem was that previously we also referred to $FileList[0] when the _FileListToArray() returned 0 (No array) causing an error in the script. That is now fixed with this version.
    1 point
  3. Oh my little pony, how adorable. That could be Manadar fucking with you.
    1 point
  4. Jos

    Constantly changing GUI Output

    Try this one to see if that works. #include<file.au3> $filefolder = 'd:temp' $fileextension = '*.eml' Global $Label = 0, $lastlabel = "" $Gui = GUICreate("Web-DMZ Count", 200, 50) GUISetBkColor(0xFFFF00) GUISetState() $Label = GUICtrlCreateLabel("Jobs: 0", 20, 20) While 1 $FileList = _FileListToArray($filefolder, $fileextension);only list files with given extension If $FileList <> 0 Then If $FileList[0] <> $lastlabel Then GUICtrlSetData($Label, "Jobs: " & $FileList[0]) $lastlabel = $FileList[0] EndIf Else If $lastlabel <> 0 Then GUICtrlSetData($Label, "Jobs: Null ") $lastlabel = 0 EndIf EndIf WEnd EDIT: Fixed some code logic
    1 point
×
×
  • Create New...