am632 Posted March 2, 2011 Share Posted March 2, 2011 Hi, Basically this is what i want... RunWait(@ComSpec & ' /c xcopy /e /h /y /i "' & $SETDESKTOPDIR & '" "' & $TEMPFOLDER & "\Desktop" & '"', "", @SW_HIDE) DirMove($TEMPFOLDER, $DESTINATION & "\Desktop") WANT SCRIPT TO WAIT UNTILL DIRMOVE HAS FINISHED BEFORE CONTINUING The example above is just to give u an idea on what i want to do, the top line works perfect but im hoping i can move the directory with a hidden cmd.exe box as i think this would be easier, but i dont know what command to use. Thanks Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 2, 2011 Share Posted March 2, 2011 DirMove() doesn't run int he background, and won't return until the move is done. You already used @SW_HIDE, so the CMD window should not be visible as it is. What do you want it to do differently? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
am632 Posted March 2, 2011 Author Share Posted March 2, 2011 DirMove() doesn't run int he background, and won't return until the move is done.You already used @SW_HIDE, so the CMD window should not be visible as it is.What do you want it to do differently? Hi, Thanks for the reply.I want the script to 'sleep' whilst the dirmove is running, then once its finished it will go onto the next part of the script.I figured i wouldnt be able to do this with the 'dirmove' command so I was hoping i could do it with a cmd command, like the RunWait(@ComSpec.... command, as this would be running a hidden cmd window, thatway the script wont continue until the hidden cmd window has finished its thing. I just dont know what cmd command to use, and how to intergrate it into autoit.thanks Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 3, 2011 Share Posted March 3, 2011 When your script hits DirMove(), it will not continue to the next line until that function is finished with the move. You don't have to take any other measures to "pause" script execution. There will be no more script execution until it is done. The same goes for RunWait(). You don't need any additional "pause" because the "Wait" in "RunWait" means it won't go on until it's done. Did you actually test any scripts where you tried these things and they DIDN'T hold up the script until done? If so, post that script because the one you posted doesn't have the problem you describe. P.S. Do you mean to block events as well? I guess it's possible event handling might still occur while DirMove() is still active. I've never tested that, but it seems unlikely you meant to go there. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now