Sign in to follow this  
Followers 0
chssoccer

ShellExecute

3 posts in this topic

If I want to call a function in an compiled script could I use ShellExecute like this to do it?:

ShellExecute("ahkscript.exe", "functionnamethatneedstobecalled")

Share this post


Link to post
Share on other sites



No

The second argument is for command line parameters. This passes strings to the application.

If it is an autoit script, look up 'Command Line Parameters' in the AutoIT help file.

Share this post


Link to post
Share on other sites

Only if your compiled script looks like this:

If $CmdLine[0] > 0 Then
    Switch $CmdLine[1]
        Case 'functionnamethatneedstobecalled'
            functionnamethatneedstobecalled()
    EndSwitch
EndIf

Func functionnamethatneedstobecalled()
    ; Do stuff
EndFunc

Share this post


Link to post
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
Sign in to follow this  
Followers 0