Jump to content

Recommended Posts

Posted

Hi,

 

Please help me. I couldn't find any solution for passing parameters from Php to AutoIT. Below are the codes;

PHP

$parameter = 5;
shell_exec("db.exe $parameter");

 

How to pass the $parameter to AutoIT program? Please help me. I tried to use command line, but it seems like I couldn't solve the problem

  • Moderators
Posted

@billy85 look at Command Line parameters in the help file or here: 

https://www.autoitscript.com/autoit3/docs/intro/running.htm#CommandLine

the integrated $CmdLine array allows you to define your parameters from the calling function in a different language.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Posted

@JLogan3o13 Hai, can you help me how to do it? bcs I am new to AutoIT. and I tried jst now using command line, I could not solve my issue. I think there is a problem with my code.

  • Moderators
Posted

@billy85 I'm not sure what I can provide beyond what the help file shows you. Here is another example - compile this script to whatever you want, then call the script with the /h parameter.

If $CmdLine[0] > 0 Then
        Switch $CmdLine[1]
            Case "/?"
                MsgBox(0, "", "Help")
            Case "/s"
                MsgBox(0, "", "_s")
            Case "/u"
                MsgBox(0, "", "_u")
            Case "/x"
                MsgBox(0, "", "_x")
        EndSwitch
    Else
        MsgBox(0, "", "No Parameters passed")
    EndIf

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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
  • Recently Browsing   0 members

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