dlp Posted July 28, 2006 Posted July 28, 2006 I've made a script to transfer files from the computer it's run on to a network computer. Simple stripped down version: $origin = "C:\origin" ; folder to be copied $dest = "\\machinename\destination" ; folder to be copied into DirCopy( $origin, $dest, 1 ) ; 1 being used even though it really doesn't need to be When you run this as a script from SciTE, or as a compiled .exe, the GUI this is built on becomes unresponsive, like a frozen windows app, until DirCopy is done. Then the GUI becomes responsive again. Is this normal behavior? Is there any way of having it remain responsive while still copying? I'm just afraid the users I made this for will panic when they see it acting like that. Also, is there any way to put a Cancel command on this command? So a button that when pressed, the copy is cancelled? Thanks.
Moderators SmOke_N Posted July 28, 2006 Moderators Posted July 28, 2006 During the copy you don't have control of the GUI, you would need to run the DirCopy() in another process like using /AutoIt3ExecuteLine or /AutoIt3ExecuteScript to keep control of the GUI. The larger the directory, the more time you will not have control of the GUI. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
dlp Posted July 31, 2006 Author Posted July 31, 2006 What if the computer the script is being run on does not have AutoIT installed?
Moderators SmOke_N Posted August 7, 2006 Moderators Posted August 7, 2006 If you compiled it, it doesn't matter, if your running it as a script, then you need to use one of the methods above I've already mentioned (with a compiled exe) or have autoit installed. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Briegel Posted August 7, 2006 Posted August 7, 2006 (edited) Write a second script for the copy job. Start it from the first script with parameters. Run('secondscript.exe $origin $dest') EDIT: In the second script use '$CmdLine[]'. Edited August 7, 2006 by Briegel
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