desertcolt Posted August 15, 2005 Posted August 15, 2005 I have two functions as seperate au3 files and I have a top.au3 script like --------------------------- #include "file1.au3" #include "file2.au3" func1() func2() --------------------------- The above functions execute one by one BUT I want both the functions to execute simultaneously. How I can do that ?
JSThePatriot Posted August 15, 2005 Posted August 15, 2005 You have to turn the scripts into .exe's to use Run() or use Run() in conjunction with AutoIt3.exe. Make sure you call the function at the beginning of the scripts. Because of the way AutoIt is setup... we dont support multi threading from one script. If you want 2 things done at the same time you have to run 2 scripts at the same time. (Though it wont really be at the exact same time). JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
LxP Posted August 16, 2005 Posted August 16, 2005 Welcome to the forums!Depending on what you're trying to do, sometimes it's possible to achieve the working of two functions within the one function (through clever use of TimerInit() and TimerDiff(), etc.).If you feel like posting your code we might be able to help you do it this way if running two scripts simultaneously doesn't appeal to you.
LxP Posted August 16, 2005 Posted August 16, 2005 In particular, my last post to this thread might give you some inspiration depending on what you want to achieve.
tylo Posted August 16, 2005 Posted August 16, 2005 (edited) This should work. You must compile it to an exe. #NoTrayIcon If $CmdLine[0] = 1 And $CmdLine[1] == "!func1" Then AutoItWinSetTitle("!func1") func1() Exit EndIf Run('"' & @ScriptFullPath & '" !func1') WinWait("!func1") func2() WinWaitClose("!func1"); syncronize msgbox(0, "both funcs done", "") Exit Func func1() msgbox(0, "Function One", "") EndFunc Func func2() msgbox(0, "Function Two", "") EndFunc Edited August 16, 2005 by tylo blub
SumTingWong Posted August 16, 2005 Posted August 16, 2005 This should work. You must compile it to an exe.I can't even see the box with this one!
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