Setting Path to Application...

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Phil Pendlebury
Automation Wizard
Posts: 538
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Setting Path to Application...

Post by Phil Pendlebury » Thu Jan 25, 2007 8:49 am

Hi there,

Once again this may seem obvious but I have searched and can find no relevant information.

I am successfully using the screen capture feature now (see my other post) and so far it seems to be working great...

However one of my users could not get the application (which is an .exe file) to work at all. It baffled me until I discovered that he is German.

My application comes with an installer that on most systems installs to:

C:\Program Files\Phil Pendlebury\Multi Export Audio\ *FILES HERE*

In my script I had been using all commands for screens, ini file etc.

Code: Select all


ScreenCapture>0,0,srx,sry,C:\Program Files\Phil Pendlebury\Multi Export Audio\export.bmp
For some reason the German user's system installed the application to:

C:\Programme\Phil Pendlebury\Multi Export Audio\ *FILES HERE*

So all the paths in my script do not work.

SO TO MY QUESTION AT LAST :-)

How to set a relative path in a script.

I noticed that ini files don't need a path at all but screen capture and compare does.

Is there a variable or some way of replacing:

Code: Select all


ScreenCapture>0,0,srx,sry,C:\Program Files\Phil Pendlebury\Multi Export Audio\export.bmp
with:

Code: Select all


ScreenCapture>0,0,srx,sry,FOLDER THAT APP SCRIPT EXE IS IN\export.bmp
Thank you for any help once again.
Phil Pendlebury - Linktree

User avatar
Phil Pendlebury
Automation Wizard
Posts: 538
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Thu Jan 25, 2007 11:37 am

Did a bit more searching and found:

%SCRIPT_DIR%

Is this what I need? Does that work if teh script is an exe file?

thanks again?
Phil Pendlebury - Linktree

User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

Post by pgriffin » Thu Jan 25, 2007 2:29 pm

Phil,

to clarify, %SCRIPT_DIR%, strictly defined, is the location in which the current running script is found. Having said that, I use it quite a bit as the default path to many (not all) things in the execution of a script. Is the capture tool (and any related dll's, etc...) located in the same location as your other MacroSched files? if so, then %SCRIPT_DIR% should work nicely.

scp>0,0,1000,1000,%SCRIPT_DIR%\HierBinIch.bmp

und wann ihre Deutsch user ein bisschen helf brauchen, dann kann ich auch auf Deutsch Sprache helfen....

tschuess!

User avatar
Phil Pendlebury
Automation Wizard
Posts: 538
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Thu Jan 25, 2007 4:21 pm

SkunkWorks wrote:Phil,

to clarify, %SCRIPT_DIR%, strictly defined, is the location in which the current running script is found. Having said that, I use it quite a bit as the default path to many (not all) things in the execution of a script. Is the capture tool (and any related dll's, etc...) located in the same location as your other MacroSched files? if so, then %SCRIPT_DIR% should work nicely.

scp>0,0,1000,1000,%SCRIPT_DIR%\HierBinIch.bmp

und wann ihre Deutsch user ein bisschen helf brauchen, dann kann ich auch auf Deutsch Sprache helfen....

tschuess!
Well I don't speak German mate (which is one reason why multi language things in a script can make trouble) but your English was enough for me. I am on with it now and once again your help is much appreciated.

I only wish that i had discovered this awesome tool before the last few months.

Cheers,

:-)
Phil Pendlebury - Linktree

User avatar
Phil Pendlebury
Automation Wizard
Posts: 538
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Thu Jan 25, 2007 4:49 pm

Worked perfectly thank you. :-)
Phil Pendlebury - Linktree

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts