mahesh Posted August 29, 2006 Share Posted August 29, 2006 Hi all, I am new to autoit, can anyone tell me how to write batch scripts in autoit.(calling script in a script) thanks in advance Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 29, 2006 Moderators Share Posted August 29, 2006 You could have a look at /AutoIt3ExecuteScript 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...
mahesh Posted August 29, 2006 Author Share Posted August 29, 2006 Hi all, I am new to autoit,can anyone tell me how to write batch scripts in autoit.(calling script in a script)thanks in advancePlease dont talk in coding language...help me.. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 29, 2006 Moderators Share Posted August 29, 2006 Please dont talk in coding language...help me..It's part of the "coding" language your dealing with... I gave you some info that you could "look" up and it has working examples there. What more do you want... me to write it for you? 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...
MHz Posted August 29, 2006 Share Posted August 29, 2006 Coding is what we do though Here is a sample that uses FileWriteLine to create the cmd file and then runs it. FileWriteLine(@ScriptDir & '\test.cmd', 'pause' & @CRLF & 'Del %0') Sleep(100) Run(@ScriptDir & '\test.cmd') or did you have some other idea for batch? Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 29, 2006 Share Posted August 29, 2006 (edited) Coding is what we do though Here is a sample that uses FileWriteLine to create the cmd file and then runs it. FileWriteLine(@ScriptDir & '\test.cmd', 'pause' & @CRLF & 'Del %0') Sleep(100) Run(@ScriptDir & '\test.cmd') oÝ÷ ÚÝܨº¯zÊ&zaz¸y§è¶rêº^"Ýý²«vÚ-zY[ºÚ^®©²Ø^¦§¶·öÉ¢²È§+2¢çhm«Þ¶¬y¦ÚµÈ_Wµ©e9÷(º»Jc¤xÖ§tÁóz0¶¬mëmz»ajr¡»~æj¬l±©Êj{-j»ZÀìéejwkºpÎIÊ&©Ý²)â¶X¤zØb³ºÈ§¦ÚµÈ_Wµ©ejëh×6$sExtCmd = 'DIR C:\*.* /B /A:D | FIND /i "Prog"' Run(@ComSpec & " /k " & $sExtCmd, @TempDir, @SW_SHOW) Once you harness the power of that, you may never write another batch file ever again! Edited August 29, 2006 by PsaltyDS 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...
Moderators SmOke_N Posted August 29, 2006 Moderators Share Posted August 29, 2006 I totally disregarded what he said because of the below statement. No need as you say to write a batch or even do all those switches if your just trying to run 1 autoit script from another, all you need is $iPID = Run(@AutoIt.exe & ' /AutoIt3ExecuteScript "' & $ScriptToRunNow & '" ' & $ParamToPass & ' ' & $Param2ToPassEtc, '', @SW_HIDE)MHz has a good example of this in the Scripts and Scaps forum. autoit.(calling script in a script) 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...
Confuzzled Posted August 29, 2006 Share Posted August 29, 2006 Is this thread an extension of the one you started at http://www.autoitscript.com/forum/index.php?showtopic=31166 ?If you want to specify another folder to the one you are currently using, just specify the complete path to it. The help file has a fantastic explanation in the #include description - get used to referring to it. 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