Jump to content
Sign in to follow this  
TheBG

Make Script execute one line at a time?

Recommended Posts

TheBG

Hi,

I'm new to Autoit, but not new to scripting.

Is there a simple way to make my script execute one line at a time? Basically make it wait for the previous line to finish before it moves on?

I have a little script I'm going to use to setup my work's pc's. It's basically going to copy files here and there and run other scripts we have created for installations of other programs.

I don't want it to start too many installs at the same time. I need it to wait for each previous command to finish.

as you can see, the script is running many file copies and reg entries, and running a exe.

CODE
Opt("WinWaitDelay",100)

Opt("WinTitleMatchMode",4)

Opt("WinDetectHiddenText",1)

Opt("WinTitleMatchMode", 4)

FileCopy("\\age-cims\software$\Ag Engineering Procedures & Guidelines.url", "C:\Documents and Settings\All Users\Desktop\", 1)

FileCopy("\\age-cims\software$\Engineering Standards.url", "C:\Documents and Settings\All Users\Desktop\", 1)

FileCreateShortcut("C:\Program Files\JoshMadison\convert\convert.exe", "C:\Documents and Settings\All Users\Desktop\convert")

Send("{F5}")

DriveMapAdd("R:", "\\finch\age_eng", 1)

DriveMapAdd("P:", "\\phoenix\drawings", 1)

Run("\\age-cims\software$\XnView\XnView.exe")

FileCopy("\\age-cims\software$\JkDefrag\JkDefrag.exe", "C:\Documents and Settings\All Users\Desktop\", 1)

FileCopy("\\age-cims\software$\JkDefrag\JkDefragScreenSaver.exe", "C:\Windows\system32\", 1)

FileCopy("\\age-cims\software$\JkDefrag\JkDefragScreenSaver.scr", "C:\Windows\system32\", 1)

Run("REGEDIT /S \\age-cims\software$\JkDefrag\JkDefragDefault.reg")

Run("REGEDIT /S \\age-cims\software$\JkDefrag\JkDefragSettings.reg")

Share this post


Link to post
Share on other sites
weaponx

The only thing you need to change is Run() to RunWait(), everything else already works in sequence.

Share this post


Link to post
Share on other sites
TheBG

nevermind, I'm such a goon. I jus trealized there is a RunWait cmd to does just as i want.

Share this post


Link to post
Share on other sites
Valuater

Things that make you say... Hmmmm!!!...???

The only thing you need to change is Run() to RunWait(), everything else already works in sequence.

nevermind, I'm such a goon. I jus trealized there is a RunWait cmd to does just as i want.

8)


NEWHeader1.png

Share this post


Link to post
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
Sign in to follow this  

×