Jump to content

Testing command line parameteres within Scite


Recommended Posts

Hi,

I want to write some scripts with command line parameters.

I understand how it all works once I have an executable (or execute my script as a param to AutoIt3.exe)

My question is during development stage in Scite, how do I simulate passing parameters to the script?

One idea I have is to do save the au3 file, and then write another script with for example, something like

run(AutoIt3.exe myscript.au3 param1 "param 2")

command in it. Is this the best (only) way?

Thanks,

D

Link to comment
Share on other sites

There is probably a better way than what I am suggestion, but I do something like this:

( Expected command line: param1 "param 2" )

; This is a fix for testing purposes
If @Compiled Then
    $realCmdLine = $CmdLine
Else
    Local $realCmdLine[3]
    $realCmdLine[0] = UBound($realCmdLine)-1
    $realCmdLine[1] = "param1"
    $realCmdLine[2] = "param 2"
EndIf

; Actual script below. Use $realCmdLine instead of $CmdLine
Edited by Manadar
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...