Ram Posted October 10, 2007 Share Posted October 10, 2007 I would like to know how do I go about executing another au3 file. For eg: Test.au3 test2. au3 I have different script in test2.au3 and I want to write a command in test.au3 such that it can excute test2.au3.. Can some one help me out please! Thanks! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 11, 2007 Moderators Share Posted October 11, 2007 I would like to know how do I go about executing another au3 file. For eg: Test.au3test2. au3 I have different script in test2.au3 and I want to write a command in test.au3 such that it can excute test2.au3..Can some one help me out please!Thanks!Do you have a short (I mean short) working example (other than the execution part of course) of both scripts?I don't know if all you are looking for is /AutoIt3ExecuteScript or not. 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. Link to comment Share on other sites More sharing options...
Ram Posted October 11, 2007 Author Share Posted October 11, 2007 Do you have a short (I mean short) working example (other than the execution part of course) of both scripts? I don't know if all you are looking for is /AutoIt3ExecuteScript or not. OK. Here is what I have. I have three different scripts. The mainscript checks the condiotion and should lauch the au3 script file accordingly. Yep. I saw the example for /AutoIT3ExcuteScript but this seems to be little complicated as it needs to be executed on cmd line. I thought Shellexcute will do it for me but When I execute that I get the script opened in the editor. ShellExecute ("test2.au3") Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 11, 2007 Moderators Share Posted October 11, 2007 (edited) OK. Here is what I have. I have three different scripts. The mainscript checks the condiotion and should lauch the au3 script file accordingly. Yep. I saw the example for /AutoIT3ExcuteScript but this seems to be little complicated as it needs to be executed on cmd line. I thought Shellexcute will do it for me but When I execute that I get the script opened in the editor. ShellExecute ("test2.au3")ShellExecute wont work unless you have made the necessary arrangements with the specific PC first. I'm not sure I'm following the difficulty part though: _Au3Execute(@ScriptDir & "\MyAu3Script.au3", "DoSomething") Func _Au3Execute($hSourceFile, $sParams, $sWDir = @WorkingDir, _ $nShowHide = @SW_SHOW, $nSTDOut = 0) Return Run('"' & @AutoItExe & '" /AutoIt3ExeCuteScript "' & _ $hSourceFile & '" ' & $sParams, $sWDir, $nShowHide, $nSTDOut) EndFuncThis way, all you ever need is the AutoIt executable you created, rather than having to pack around and install all the necessary options that make an .au3 run on your PC. Edit: BTW, it's going to return the PID of the .au3/exe clone you just launched. Edited October 11, 2007 by SmOke_N 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. Link to comment Share on other sites More sharing options...
Nahuel Posted October 11, 2007 Share Posted October 11, 2007 And this doesn't work? ShellExecute ("borrar.au3","","","Run") Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 11, 2007 Moderators Share Posted October 11, 2007 And this doesn't work? ShellExecute ("borrar.au3","","","Run")That worked for you on a PC that AutoIt isn't installed on? 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. Link to comment Share on other sites More sharing options...
Nahuel Posted October 11, 2007 Share Posted October 11, 2007 That worked for you on a PC that AutoIt isn't installed on?You had to make fun of me? hahaSorry, I need to read posts more carefully. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 11, 2007 Moderators Share Posted October 11, 2007 You had to make fun of me? hahaSorry, I need to read posts more carefully.Nah... your mind was in a fun place... a "Oh I got SmOke_N now!!" ... I get "got" enough 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. Link to comment Share on other sites More sharing options...
Ram Posted October 11, 2007 Author Share Posted October 11, 2007 And this doesn't work? ShellExecute ("borrar.au3","","","Run")wow! this is what I am looking for this.. this worked perfectly fine..!! Thanks a lot guys! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 11, 2007 Moderators Share Posted October 11, 2007 wow! this is what I am looking for this.. this worked perfectly fine..!! Thanks a lot guys!So you are only wanting to execute an Au3 script from another Au3 only if AutoIt is installed on that machine? 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. Link to comment Share on other sites More sharing options...
Nahuel Posted October 11, 2007 Share Posted October 11, 2007 wow! this is what I am looking for this.. this worked perfectly fine..!! Thanks a lot guys!hahahaha, in-your-face SmOke_N (just kidding) Link to comment Share on other sites More sharing options...
Ram Posted October 12, 2007 Author Share Posted October 12, 2007 So you are only wanting to execute an Au3 script from another Au3 only if AutoIt is installed on that machine?Yep. You are right.. 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