onestcoder Posted May 3, 2006 Posted May 3, 2006 I'm trying to get my script to run a program from the folder it's located in. I'm using Func Windower2() Run(@ProgramFilesDir & "\Onestcoder\Tools\FFWindower\FFHookLauncher.exe") EndFunc My script is located in @ProgramFilesDir & "\Onestcoder\ So ever time I call Windower2() its run in the @ProgramFilesDir & "\Onestcoder\ Instead of @ProgramFilesDir & "\Onestcoder\Tools\FFWindower\ ??? Need a website: http://www.iconixmarketing.com
onestcoder Posted May 3, 2006 Author Posted May 3, 2006 I figure it has somthing to do with @WorkingDir But help file isn't real clear of how to use it.. To me Need a website: http://www.iconixmarketing.com
MHz Posted May 3, 2006 Posted May 3, 2006 Add the working directory to the Run function. Func Windower2() $directory = @ProgramFilesDir & "\Onestcoder\Tools\FFWindower" Run($directory & "\FFHookLauncher.exe", $directory) EndFunc Or perhaps change the working directory for additional code usage Func Windower2() If FileChangeDir(@ProgramFilesDir & "\Onestcoder\Tools\FFWindower") Then Run("FFHookLauncher.exe") Else MsgBox(0x10, @ScriptName, 'WorkingDir ' & @WorkingDir & ' is incorrect') EndIf EndFunc
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