crescentic Posted October 10, 2007 Author Share Posted October 10, 2007 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 More sharing options...
Moderators SmOke_N Posted October 10, 2007 Moderators Share Posted October 10, 2007 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 JosIf 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) EndFuncWould 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now