Indigo Rose Software

Go Back   Indigo Rose Software Forums > Old Versions > AutoPlay Media Studio 6.0

Reply
 
Thread Tools Display Modes
  #1  
Old 09-20-2005
rknol rknol is offline
Indigo Rose Customer
 
Join Date: May 2001
Location: Elburg, Gld, Netherlands
Posts: 23
Different behavior with _SourceFolder variable

After compressing my old AMS5 project into a web/email executable, several scripts do no longer work.
In my scripts I often use the variable _SourceFolder. Building the project into a web/email executable, this variabele points to the temporary directory, i.e. the directory where the executable is uncompressed.
Is there a way to still get the _SourceFolder variable point to the path of the executable (autorun.exe) in stead of to the uncompressed executable?

Roel Knol
KMO Development BV
Reply With Quote
  #2  
Old 09-20-2005
Brett's Avatar
Brett Brett is offline
Indigo Rose Staff Member
 
Join Date: Jan 2000
Posts: 2,001
There is a way to do this.

From the Help file:

Quote:
Tip: Occasionally you may need the location your compressed executable was launched from. For this reason a command line argument is passed into your AutoPlay application in the form: SFXSOURCE:SFE EXE NAME where "SFE EXE NAME" is the full path to the compressed executable. For example, "SFXSOURCE:C:\Temp\launcher.exe". In your AutoPlay application you can access this command line argument using the Global Variable _CommandLineArgs. If any command line arguments are passed to the compressed executable, they will also be passed into the AutoPlay application.
Code:
SFESourceFolder = "";
for i, strArg in _CommandLineArgs do
	if(String.Find(strArg,"SFXSOURCE") ~= -1)then
		local nStrLen = String.Length(strArg);
		local strFullFileName = String.Right(strArg,nStrLen-10);
		local tblPathParts = String.SplitPath(strFullFileName);
		SFESourceFolder = tblPathParts.Drive..tblPathParts.Folder;
		SFESourceFolder = String.TrimRight(SFESourceFolder,"\\");
	end
end

Dialog.Message("SFESourceFolder",SFESourceFolder);
Reply With Quote
  #3  
Old 09-20-2005
rknol rknol is offline
Indigo Rose Customer
 
Join Date: May 2001
Location: Elburg, Gld, Netherlands
Posts: 23
Great, thanks!

Roel
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with variable UweGeercken Setup Factory 6.0 2 07-12-2004 05:15 AM
Variable in a variable name?? GurkGager Setup Factory 6.0 1 05-18-2004 03:31 PM
Can't copy files with variable?? SonG0han AutoPlay Media Studio 5.0 1 03-06-2004 04:58 AM
Check if a variable exists ? jmoisan AutoPlay Media Studio 4.0 4 09-16-2002 10:07 AM
SUF 6.0.0.0 Bug: Loosing def variable in radio buttons screen pit Setup Factory 5.0 1 11-21-2001 02:10 PM


All times are GMT -6. The time now is 02:12 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software