jumping among Mainstack and substacks isn't easy

J. Landman Gay jacque at hyperactivesw.com
Tue Jun 19 00:50:23 EDT 2012


On 6/18/12 9:05 PM, Mark Rauterkus wrote:
> Hi Again,
>
> I can't build a script that crafts a temp variable that can be used in
> a "go to card name" script.
>
> #Fail for me.
>
> So, I want to go to a different stack. -- check.
> write to a field -- check
>
> But I can't get to the proper card.
>
> I put the card name into that vTempC temp handle, complete with
> quotes. When I put the vTempC into the message box it is just as I
> want it to be.
>
> Saying again.
>
> I want to go to card "Roberto Clemente" in stack "Kids"
> That works. But, I need a script off of a button to insert the
> "Roberto Clement" part.
>
> So, this line breaks:
> put "Present on" && the short english date & return after field
> "Attendance" of card x of stack "Kids"
>
> And the failure message, I've seen for hours now, is:
>
> executing at 10:02:51 PM
> Type	Chunk: can't find card
> Object	Yo! Present
> Line	put "Present on" && the short english date & return after field
> "Attendance" of card z of stack "Kids"
> Hint	mouseUp

It would be helpful if you could post whole handler, since the excerpts 
above don't give enough info. Some of the relevant variables don't 
match; for example, the script refers to the card as "x" and in the 
error it refers to "z", and so forth.

What you want to do is usually pretty easy:

put "Roberto Clement" into tUserName
go cd tUserName of stack "kids"
put "Present on" && the short english date & return after field "Attendance"

Alternately, you don't need to actually go to the card, you can do it 
all from anywhere remotely, provided the stack is in memory somewhere:

put "Roberto Clement" into tUserName
put "Present on" && the short english date & return after field \
   "Attendance" of card tUserName of stack "kids"

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com






More information about the use-livecode mailing list