Author Topic: retrieving running current scriptname  (Read 496 times)


  • Newbie
  • *
  • Posts: 4
retrieving running current scriptname
« on: June 05, 2018, 04:59:18 am »
Hi all,

Making some test to retrieve the current running scriptname, here is what I've found

With a wbt file compiled to exe , I have used the function "winname()" : file extension is "exe"
With a wbt file running with ctrl-F7 in winbatch studiodio , I have used the function "winname()" : file  extension is "wbt"

My question
Starting the wbt file in winbatch studio in debug (F11), the result of "winname()" gives only the string "wbt'


  • Full Member
  • ***
  • Posts: 183
Re: retrieving running current scriptname
« Reply #1 on: June 05, 2018, 05:57:06 am »
Take a look at the help topic for IntControl 1004:

IntControl 1004
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.

See Also:


  • Newbie
  • *
  • Posts: 4
Re: retrieving running current scriptname
« Reply #2 on: June 06, 2018, 05:16:24 am »
 :) yessssss ; exactly what I was looking for
this "intcontrol" is working in all the cases
thx a lot