Jump to content

Running of Pen drive displays different results


Recommended Posts

Hi

I have written a little script to run .exes one after another. To get them to run in the order i like i change the name of the exe so that the begining start with 0x e.g. (01 - first.exe, 02 -second.exe, 03 - last.exe).

This works great and i haven't had a problem until i tried to run it of a usb pen and the order is all over the place. The only thing i can assume is the read/write speed is much slower and autoit is going to quickly is there any way of slowing down autoit or does anyone now what is happening.

#INCLUDE <Process.au3>
#INCLUDE <File.au3>
#INCLUDE <GUIConstants.au3>
#Include <Array.au3>

$ExecuteList = _FileListToArray(c:\scripts,"*.exe",1)
 IF @Error = 1 Then 
    Msgbox(0,"ExecuteList","No Files to Run")
    Exit
    Endif

_ArrayDisplay ($ExecuteList)
Link to comment
Share on other sites

This only displays the execute list which is in c:\scripts and labeled *.exe. Are you showing us the code or some script that you wrote up? Anyways a Sleep(<TIME>) will slow it down if you place it right before a list

CODE
$a_ExecuteList = _FileListToArray("C:\Users\Terarin Kerowyn\Desktop", "*.exe", 1)

If @error Then

MsgBox(4096,"Error", " Error reading to Array error:" & @error)

Exit

EndIf

For $i_ExecuteList = 1 To $a_ExecuteList[0]

; will execute and wait till the application is fully loaded

RunWait("C:\Users\Terarin Kerowyn\Desktop\" & $a_ExecuteList[$i_ExecuteList])

; will execute then after 5 seconds continue on regardless to the application

; Run("C:\Users\Terarin Kerowyn\Desktop\" & $a_ExecuteList[$i_ExecuteList])

; Sleep(5000)

Next

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...