Whoops: Getting the name of the script only stack an handler is in
Martin Koob
mkoob at rogers.com
Thu Jan 3 13:29:52 EST 2019
Hi
Another way to approach it is to use the 'get the executionContext'. You
can get the filename of the script only stack from this
I tried this in a button with a behaviour script on a new stack with three
fields to see the different results.
on mouseUp pButtonNumber
set the itemdelimiter to comma
put item 4 of the executionContexts into tStackPath
set the itemDelimiter to "/"
put the last item of tStackPath into tStackFileName
delete the last character of tStackFileName
put tStackFileName into field 1 -- file name of script only stack with
extension
put the name of me into field 2 -- name of control that has the behavior
put the name of this me into field 3 -- name of script only stack
end mouseUp
Using the executionContexts you get the actual filename, not sure if that
is what you want or the stack name. Either way both options are there.
Martin
--
Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
More information about the use-livecode
mailing list