Source language: Translate to:

Find compiled neobook file name.

General questions about NeoBook

Moderator: Neosoft Support

Find compiled neobook file name.

Postby mr cubefan » Sat Apr 08, 2017 7:39 am

Hi neobookers!, is there a way to make a neobook app find its own filename?.
my plan is when the app start compare its own version number against an exe file stores in a shared folder, and update itself when necessary.
User avatar
mr cubefan
 
Posts: 27
Joined: Thu Mar 10, 2011 6:23 pm

Re: Find compiled neobook file name.

Postby Gaev » Sat Apr 08, 2017 9:01 am

cubefan:

is there a way to make a neobook app find its own filename?.

You can get the path+file name of the exe of the running NeoBook Application from the variable CommandLine] ... from the Help file ...
A running publication can access the contents of the command line by examining the global [CommandLine] variable. The script below parses the [CommandLine] variable and separates the different parameters into variables [Param1], [Param2], [Param3], etc. The first variable ([Param1]) will always contain the path and file name of the publication. The variables after that ([Param2], [Param3], etc.) will contain any other command line items. The following script separates the command line elements and then displays a message for each one:

StrParse "[CommandLine]" "[#13]" "[Param]" "[Count]"
Loop "1" "[Count]" "[X]"
AlertBox "Result" "Parameter [X] is [Param[X]]"
EndLoop


my plan is when the app start compare its own version number against an exe file stores in a shared folder, and update itself when necessary.

Not sure what you mean by version number ... assuming that you have a way (size, timestamp, name) to differentite different versions, you will have to undertake the update process via another (NeoBook) Application or some .bat file (because you can not rename/delete an .exe file while it is running).
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Find compiled neobook file name.

Postby mr cubefan » Sat Apr 08, 2017 10:25 am

Thanks Gaev!!, Exactly what i needed!
About the updater, is done exactly as you described, (an external EXE is handling the process).
For the version, is the group of numbers located in "Book>>Book Properties>>General>>Version Info"
Thanks again for your time! :)
User avatar
mr cubefan
 
Posts: 27
Joined: Thu Mar 10, 2011 6:23 pm

Re: Find compiled neobook file name.

Postby Gaev » Sat Apr 08, 2017 11:32 am

mr cubefan:

For the version, is the group of numbers located in "Book>>Book Properties>>General>>Version Info"

f.y.i. there is a NeoBook Variable that will provide the version number of the currently running NeoBook Application ... from the Help file ...
[PubVersion]
The publication's version number as specified in Book Properties > Version Info.
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Find compiled neobook file name.

Postby mr cubefan » Sat Apr 08, 2017 12:58 pm

Thanks mate!, and time for me to read the help file. :oops:
User avatar
mr cubefan
 
Posts: 27
Joined: Thu Mar 10, 2011 6:23 pm


Return to General NeoBook Discussions

Who is online

Users browsing this forum: Bing [Bot] and 2 guests