Jump to content
Sign in to follow this  
EpicKnarvik97

Run function in background

Recommended Posts

EpicKnarvik97

If I run this function:

Func Backup()
    DirCopy($dir, $backupdir & " " & @MON & "-" & @MDAY & "-" & @YEAR)
EndFunc

Everything else stops. How can I run it in the background while the rest of the script is still working properly?

Share this post


Link to post
Share on other sites
UEZ

For example use Yashied's >Copy UDF.

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
EpicKnarvik97

For example use Yashied's >Copy UDF.

Br,

UEZ

I looked over it, but I don't want the dll file and stuff. If I send the compiled program to a friend, I don't want it to need to install any files.  

Also, I don't want all that complicated stuff. The examples don't include what I am actually asking for. I repeat:

How should I execute the function to let it run individually in the background?

I just added a progress bar and hid the main gui to at least make it not seem as not working

Share this post


Link to post
Share on other sites
gruntydatsun

if you run a normal windows copy command from Run /cmd blah blah it'll just proceed without waiting for the copy to finish.  Some are a little snobby about using this method but it works with no includes.

Run(@ComSpec & " /c" & 'copy "\\network_location\giant file.ext" "C:\Test Folder"')


for $x = 0 to 100
    msgbox(1,"Message #" & $x,"This is message number " & $x)
Next

Share this post


Link to post
Share on other sites
AoRaToS

Search for /AutoIt3ExecuteScript

You will have to create a second script that contains your command and call it from your original one, that way the original won't pause until the second one completes.


s!mpL3 LAN Messenger

Current version 2.9.8.8 [30/09/2015]

Download Here

s!mpL3

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  

×