Page 1 of 1

Get project filename, how?

PostPosted: Tue Sep 28, 2010 4:45 am
by Tony Kroos
Question: how can I easily get (without any workarounds) the filename of my project? There are some cases (like app update, starting new external nb project etc.) when the project must get its current filename itself. Hardcoded names doesn't fit, user may rename .exe or .pub file to smth else or names may be differ...
So, maybe you should introduce new global var [PubName]. Also you may want to add more global vars (for Desktop path and so on)...

PostPosted: Tue Sep 28, 2010 6:50 am
by HPW
Take a look in the help file at the global variable [Commandline].

You can use:

Code: Select all
StrParse "[Commandline]" "[#13]" "Clineparam" "Clinecount"

and get the filename inclusive path in [Clineparam1].
The use ExtractFilename to get the EXE alone.

PostPosted: Tue Sep 28, 2010 11:51 am
by Tony Kroos
thanks for the tip, I will try that... I thought [CommandLine] just contains passed parameters, without full exe path...