Jump to content

writing batch files


 Share

Recommended Posts

  • Moderators

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

  • Moderators

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

Coding is what we do though :nuke:

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!

:P

Edited 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

  • Moderators

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...