Jump to content

How do I run AUTOIT generated executable


Recommended Posts

Ok understand this issue now... so it is not an error but a syntax issue that you were not aware of. :)

Yes, It is the running script name which is the actual file running. so when you want to cover both options you need to change the if to e.g.:

If @ScriptName == 'InstallAutomation.au3' or If @ScriptName == 'InstallAutomation.exe" then

Jos

Yeah

thanks for the help guyz..

I misinterpreted the cause of the problem..

Link to comment
Share on other sites

  • Moderators

Ok understand this issue now... so it is not an error but a syntax issue that you were not aware of. :)

Yes, It is the running script name which is the actual file running. so when you want to cover both options you need to change the if to e.g.:

If @ScriptName == 'InstallAutomation.au3' or If @ScriptName == 'InstallAutomation.exe" then

Jos

If you do it often, make it easy on yourself...Something like this maybe:
If _myScriptName() = "InstallAutomation" Then MsgBox(0, 0, "Yep")

Func _myScriptName($sScript = @ScriptName)
    Return StringLeft($sScript, StringInStr($sScript, ".", 0, -1) - 1)
EndFunc
Would work for compiled or not then... with out two condition statements.

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

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...