In Fastscript, is there a way to find out the Usine base directory, i.e. the directory the executable was launched from ?
I need to know this in order to read in a stringlist file from a subdirectory.
Simon.
Usine base directory
-
sm_jamieson
- Member
- Posts: 559
- Contact:
Note: I had been using a relative file path. i.e. relative to whatever the "currrent" directory was. The "current" directory was the usine launch directory when the script initialised, but it must have changed after a while and the file reads stopped working.
Simon.
Simon.
Hi Simon,
I too am looking into some file-handling relative to the current Usine base-directory.
Have you had any luck determining how to set the path based on this?
-S
I too am looking into some file-handling relative to the current Usine base-directory.
Have you had any luck determining how to set the path based on this?
-S
"Every act of creation is first an act of destruction." -Picasso
So yes, it seems that the directory the FastScript refers to is the actual directory currently selected by Hollyhock in general.
I wish the full Pascal functions were available as there are options for Get and Set of the directory as well as directory creation.
Senso would this be possible to implement?
-S
I wish the full Pascal functions were available as there are options for Get and Set of the directory as well as directory creation.
Senso would this be possible to implement?
-S
"Every act of creation is first an act of destruction." -Picasso
So one workaround I am doing at the moment:
This seems like the only logical workaround without an expanded Fastscript, such as Pascals Get/Set/Create directory functions.
Until these functions become available, or if there are any alternatives we don't know about:
At the moment should be able just to set the base directory and read a dummy file once, to give a path to your Fastscript.
You could also read the Master Setup panel and pull the directory for one of the pre-set folders such as the MIDI directory, alternate drive, etc...
-S
This seems like the only logical workaround without an expanded Fastscript, such as Pascals Get/Set/Create directory functions.
Until these functions become available, or if there are any alternatives we don't know about:
At the moment should be able just to set the base directory and read a dummy file once, to give a path to your Fastscript.
You could also read the Master Setup panel and pull the directory for one of the pre-set folders such as the MIDI directory, alternate drive, etc...
-S
"Every act of creation is first an act of destruction." -Picasso
Hi sm_jamieson!
So Senso has provided some updates for this specifically you will find in HH2.
Refer to the Declarations and References page, where this info can be found.
Just learned that it should be used when specifying paths for compatibility since the difference between Windows / MAC file path differences of
forward/back slash.
Also if saving data, I was originally using the Resources folder for my location.
I was told it was probably more appropriate to utilize the Config location to place as a Data location, since Resources are applicable to change and can be Private.
Definitely exciting, can't wait for Hollyhock II
-S
So Senso has provided some updates for this specifically you will find in HH2.
Refer to the Declarations and References page, where this info can be found.
Very interesting for Windows / MAC OS compatibility, I was always wondering what the PathDelim was:function PathDelim:string; // returns '/' on MACOS, '' on windows
procedure CreateDir(dir:String);
function GetApplicationPath:string; //give the absolute path of the current Usine's folder
Just learned that it should be used when specifying paths for compatibility since the difference between Windows / MAC file path differences of
forward/back slash.
Also if saving data, I was originally using the Resources folder for my location.
I was told it was probably more appropriate to utilize the Config location to place as a Data location, since Resources are applicable to change and can be Private.
Definitely exciting, can't wait for Hollyhock II
-S
"Every act of creation is first an act of destruction." -Picasso
Who is online
Users browsing this forum: No registered users and 67 guests
