Print the name of the program

I want to access (in fact print) the name of a program I have constructed. This name is Graph-840 (with extension .rbp). Certainly, the ‘840’ evolves with successive modifications, which is why I want to print it.

Thank you Christian. This gives me correctly the name of the program but I would like to get the name of the original file.

You can’t get the name of the project file used to create the app.

And since it sounds like you only want to do so in order to get a version number embedded in the file name, I think you’ll be better served by creating a constant for the app name and using the App.NonReleaseVersion to track the specific build version, which you can set in the Shared Build Settings.

Thanks Paul. This requires unfortunately to master concepts outside of my knowledge.

Hopefully, not!

It’s easy enough to add a constant: Just Insert a Module and then choose Add Constant. Set the Scope to Global so you can access it anywhere in your code.

Set Non Release Version in the Inspector for Shared Build Settings and access it in your code using App.NonReleaseVersion.

MsgBox("My App " + MyAppNameConstant + " " + Str(App.NonReleaseVersion))

This is indeed easy enough. I can define name and version inside the program but not the original file name. I am surprised by this restriction … but I shall manage, this is not vital.