Jump to content

Recommended Posts

Posted

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

  • Moderators
Posted

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.

Posted

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

Please dont talk in coding language...help me..

  • Moderators
Posted

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.

Posted (edited)

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
  • Moderators
Posted

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.

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
×
×
  • Create New...