Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Loop throught a folder of files?

$
0
0

Hey Guys,

 

Ive a file that I open and do all sorts of things with it. But my script only works when I do it for 1 file.

 

How would I get it to: rerun through the tasks after Ive finished dealing with the first file. With about say 3 files of .XML extension on the desktop?

 

This is my main script with the majority of functions and actions taking place inside the #include files.

 

AutoIt         
  AutoItSetOption("SendKeyDelay", 50) #include <.\KSM-500\kWorkbench\kWorkbench_Open.au3> #include <.\KSM-500\kWorkbench\kWorkbench_Close.au3> #include <.\KSM-500\kSetup\kSetup_Close.au3> #include <..\Desktop\LoadFilekWB.au3> #include <..\Desktop\Setup.au3> #include <..\Desktop\Verify.au3> #include <..\Desktop\Program.au3> #include <.\Library\Error_log.au3> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Local $file = "BCU101C_DSI002.XML" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; HotKeySet("{PAUSE}", "Quit") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func kWBOpen($installDir = "c:\acra", $timeout = 4)     Return kOpenTheCane("kWorkbench.exe", "TkWBForm", $installDir, $timeout) EndFunc Func LDfiletask()     Return LoadfileWB("TkWBForm", "Open", "TForm1", $file) EndFunc Func SnVnPTest()     Return SnVnP("TDockingHolder", 10) EndFunc Func ksetClose($timeout = 4)     Return KstpClose("TDockingHolder", $timeout) EndFunc Func VerFile($timeout = 20)     Return Verify("TResultsForm", $timeout) EndFunc Func Prog($timeout = 20)     Return Program("TResultsForm", $timeout) EndFunc Func kWorkClose()     Return kWBClose("TkWBForm") EndFunc Func Quit()     Exit EndFunc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func Main()     $gInteractiveLog = 1     ;initialize log     ACRAOpenLog("kWorkbench Task.log", 2)     kWBOpen()     LDfiletask()     SnVnPTest()     ksetClose()     VerFile()     Prog()     kWorkClose()     ; close the log     ACRACloseLog() EndFunc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Main()    

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>