Note from author: This function will allow you to code into your application a way to get the path to where the AMS 5 created application (aka. executable, .exe) is located. Do not confuse this with the "temp" (aka. temporary) run-from (as I call it) location!
Code:
[color=#006600]--[[ NOTE: This function only works AFTER you Build (F7) the project! The following function takes one argument (runexe = path and name of .exe)... and returns one string (strPath = the path of... the location of the .exe), NOT the temp ran-from location! ]][/color] function fnEXEOrigLoca(runexe) resFile = File.Run(runexe, "", "", SW_SHOWNORMAL, false) strCWF = Folder.GetCurrent() strPath = String.Replace(_CommandLineArgs[1], "SFXSOURCE:", "", true) return strPath; end [color=#006600]-- An example "function call" (to use the function)[/color] fnEXEOrigLoca(_DesktopFolder.."\\app_name.exe") [color=#006600]-- This Message box can be removed (it's just for visual feedback)[/color] Dialog.Message("", strPath)
Comment