Send a script to another stack with parameter

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: heatherlaine, Klaus, FourthWorld, kevinmiller

Post Reply
cbarbal
Posts: 69
Joined: Fri May 08, 2015 5:04 pm

Send a script to another stack with parameter

Post by cbarbal » Thu Nov 08, 2018 7:16 pm

Hi all,

How can I put quotation marks inside other quotes.

Code: Select all

 send "showFinques "Search"" to cd "Finques" of stack "Lloguers"
Thanks in advance

Carles

ClipArtGuy
Posts: 205
Joined: Wed Aug 19, 2015 4:29 pm

Re: Send a script to another stack with parameter

Post by ClipArtGuy » Thu Nov 08, 2018 7:33 pm

From the dictionary under quote:
Use the quote constant to embed quotes in a string, and to refer to quotes in a script. You must use this constant because if you use the quote character itself, it is treated as the beginning or end of a literal string and causes an execution error.

This should work:

Code: Select all

send ("showFinques" & SPACE & QUOTE & "Search" & QUOTE) to cd "Finques" of stack "Lloguers"

Klaus
Posts: 10388
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Send a script to another stack with parameter

Post by Klaus » Thu Nov 08, 2018 7:45 pm

Hola Carles,

not sure, but I think this will even work without quotes:

Code: Select all

...
send "showFinques Search" to cd "Finques" of stack "Lloguers"
...
If not, this works in any case:

Code: Select all

...
put "Search" into tParam
send "showFinques tParam" to cd "Finques" of stack "Lloguers"
...
Or just use:

Code: Select all

...
dispatch "showFinques" to cd "Finques" of stack "Lloguers" with "Search"
...
Best

Klaus

cbarbal
Posts: 69
Joined: Fri May 08, 2015 5:04 pm

Re: Send a script to another stack with parameter

Post by cbarbal » Thu Nov 08, 2018 8:08 pm

The explample of ClipArtGuy and the three of Klaus work perfectly. I can only decide for one, but I know that it can be done in several ways

Now I will have the issue of exporting as Exel and various impressions. :D

Thanks to both of you

Carles

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”