How to get the own filename?

Started by mueer01, September 27, 2013, 03:42:57 AM

Previous topic - Next topic

mueer01

Hello,

is there any parameter/variable that contains the filename of the running .wbt file?
Example:
I have abc.wbt and a shortcut to abc.wbt called xyz.wbt
If I start abc.wbt or the shortcut xyz.wbt, I want to know what was started:
   message("Here is ", variable)

Regards,
Erhard

kdmoyers

IntControl (1004, 0, 0, 0, 0)

Returns the full path and file name of the current WinBatch program.

If the current WinBatch script is a child program that was called with the Call( ) function, this IntControl will return the name of the main (calling) program.
The mind is everything; What you think, you become.

mueer01

Hi,

thanks for the answer.

Unfortunately
IntControl (1004, 0, 0, 0, 0)
returns always abc.wbt, even if I started the shortcut xyz.wbt, that points to abc.wbt.

But anyway, I found a workaround. In the Shortcut detail of xyz.xbt I added the parameter "xyz.wbt". Now I just need to check for param0 and param1.
This works fine for me.

Thanks,
Erhard

DAG_P6

Erhard,

Quote from: mueer01 on September 27, 2013, 05:11:07 AM
In the Shortcut detail of xyz.xbt I added the parameter "xyz.wbt". Now I just need to check for param0 and param1.
This works fine for me.

Your imaginative solution is one of the reasons that this board stands out among technical support boards.

Thanks for brightening my day. ;D
David A. Gray
You are more important than any technology.