To get the topmost stack I have to use topStack...
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
To get the topmost stack I have to use topStack...
...to get the current card I have to use...
Re: To get the topmost stack I have to use topStack...
Maybe this:
...
put the short name of this cd of the defaultstack into tCurrentCard
...
?
...
put the short name of this cd of the defaultstack into tCurrentCard
...
?
Re: To get the topmost stack I have to use topStack...
Hi Klaus, thanks. The fact is that the code is on a card that is not in foreground 

Re: To get the topmost stack I have to use topStack...
The code? Soory, no idea what you try to achieve?Mag wrote:Hi Klaus, thanks. The fact is that the code is on a card that is not in foreground
Re: To get the topmost stack I have to use topStack...
Hi Klaus,
I have a handler in a card where there is the need to know what is the current card displayed. And, no... the card displayed is not the one that contains the running code...
I have a handler in a card where there is the need to know what is the current card displayed. And, no... the card displayed is not the one that contains the running code...

Re: To get the topmost stack I have to use topStack...
Hm, if:
...
put the short name of this cd of the defaultstack into tCurrentCard
...
is not what you need, then I have still no idea!?
...
put the short name of this cd of the defaultstack into tCurrentCard
...
is not what you need, then I have still no idea!?
Re: To get the topmost stack I have to use topStack...
Hi Klaus, isn't "this card" used to refer to the card where the code is running? Actually I need to know the name of the card which is the current frontmost card.



Re: To get the topmost stack I have to use topStack...
Ah, I think I get it...Mag wrote:Hi Klaus, isn't "this card" used to refer to the card where the code is running? Actually I need to know the name of the card which is the current frontmost card.![]()
But how do you call that namely script and what is in it?
Means, please post the code.
Re: To get the topmost stack I have to use topStack...
Hi Klaus, the code is called by a menu item, that menus are located in a different card. The code is simple, a thing like this one:
copy word -3 to -1 of field "output"
Re: To get the topmost stack I have to use topStack...
Sorry, still no way!?
How can you select a menu item on card X, but exspect card Y to be the current card?
How can you select a menu item on card X, but exspect card Y to be the current card?

Re: To get the topmost stack I have to use topStack...
Because the menu is a pulldown menubar menu on OS X! 

Re: To get the topmost stack I have to use topStack...
OK last try!
Does this do what you want:
?

Does this do what you want:
Code: Select all
on menupick xyz
...
set the defaultstack to the topstack
## COPY will only copy SELECTED text!
set the clipboarddata["text"] to (word -3 to -1 of field "output")
...
Re: To get the topmost stack I have to use topStack...
Thank you Klaus! I almost feel sorry that we have found a solution, it was fun!





