The Daily Click ::. Forums ::. Klik Coding Help ::. appdir$ RUN versus BUILD?
 

Post Reply  Post Oekaki 
 

Posted By Message

Professor AI



Registered
  16/09/2005
Points
  314
17th October, 2005 at 17:06:30 -

I thought I'd add a cool extension to an old game which
involves loading and saving levels into a bunch of files in the
appdrive$ + appdir$ directory, a trick I read in .ini tutorials.

Using RUN, everything works fine, but building the project in MMF1.2 and running the executable makes appdir$ into the useless: \documents&settings\myname\temp\random

Any ideas?


 
ProfessorAI

Professor AI



Registered
  16/09/2005
Points
  314
17th October, 2005 at 21:28:27 -

OK, Yves himself has supplied the workaround on the clickteam forums...

http://www.clickteam.com/CTforum/showthreaded.php3?Cat=&Board=tools&Number=108274&Search=true&Forum=tools&Words=del.log&Match=Entire%20Phrase&Searchpage=0&Limit=25&Old=allposts&Main=108268

---------------

OK, workaround if you want to retrieve the directory of the all-in-one exe file:

When you run an all-in-one project, it creates a temporary directory, extracts the application files to this directory and then creates a _del.log file which contains the list of files to uninstall. This file is a text file and the second line contains the source directory, preceded by "source:"

How to retrieve this directory:

1) Add a List object to your frame.

2) Add an event "Start of frame", and make the List object to load the following file: Appdrive$ + Appdir$ + "_del.log".

3) You can retrieve the source directory with the following expression:

Right$( List Line Text$( "List", 2 ), Len( List Line Text$( "List", 2 ) ) - 7 )

A little complicated, but that works.

Yves.


Edited by Yves on 11/08/03 01:30 PM.

 
ProfessorAI
   

Post Reply



 



Advertisement

Worth A Click