That worked for me Paul, thanks.
exe.name$ looked like a class function so I wondered about that.
thanks everyone!
Announcement
Collapse
No announcement yet.
retrieve program name
Collapse
X
-
And...if you think that someone changed the name of the EXE you can always use that code Michael put in the source code forum to draw a string name out of the resource file.
I updated the code JUST for retrieving a JPEG but you could modify THAT code easy enough to look for "Original filename" or something.
Leave a comment:
-
EXE.Name$ is new functionality in PBWin9 and PBCC5.
In order to get the executing filename and extension you would use EXE.Namex$ rather than EXE.Name$
Leave a comment:
-
Shawn,
use the Windows API GetModuleFilename:
Code:#INCLUDE "WIN32API.INC" FUNCTION PBMAIN () AS LONG LOCAL FullPath AS ASCIIZ * %MAX_PATH GetModuleFileName 0, FullPath, %MAX_PATH PRINT "Full path:";FullPath PRINT " EXE name:";RIGHT$(FullPath, -INSTR(-1,FullPath,"\")) WAITKEY$ END FUNCTION
Last edited by Paul Dixon; 3 Nov 2008, 03:43 PM.
Leave a comment:
-
Sorry to be ignorant about this, but I seem to missing something. Could you be more specific? I can't find any references to exe.name$, besides references to exe and name separately.
I'm using PBCC 4.04
Leave a comment:
-
retrieve program name
How can I retrieve the name (i.e. filename.exe) of a program, from within the program itself?Tags: None
Leave a comment: