Another one for ya: using put from server to stack

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: FourthWorld, heatherlaine, Klaus, kevinmiller

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: Another one for ya: using put from server to stack

Post by shawnblc » Mon Jan 19, 2015 1:36 am

instead of a button, what if i wanted it like the above on closestack? Not really understanding what you're saying though.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Another one for ya: using put from server to stack

Post by Simon » Mon Jan 19, 2015 1:46 am

put tLcCode
Will only put the text file into the messagebox.
You have to set the script of something so ...
wait..
Using the three lines from the text file (on mouseUp etc.) just get line 2 and

Code: Select all

do tLcCode
What FUN!

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: Another one for ya: using put from server to stack

Post by shawnblc » Mon Jan 19, 2015 1:59 am

lol. I'm locking LC up.

Code: Select all

on closeStack
 do mYahoo
end closeStack

Code: Select all

on mYahoo
   put line 2 of URL "http://mydomain.com/launch.txt" into tURL
end mYahoo
text file

Code: Select all

on mYahoo
launch URL "http://www.yahoo.com"
end mYahoo

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Another one for ya: using put from server to stack

Post by Simon » Mon Jan 19, 2015 2:14 am

Get rid of the "do"

Code: Select all

on closeStack
mYahoo
end closeStack

on mYahoo
put line 2 of URL "http://mydomain.com/launch.txt" into tURL
do tURL
end mYahoo
add the "do" :)

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: Another one for ya: using put from server to stack

Post by shawnblc » Mon Jan 19, 2015 2:17 am

Gonna try it Simon!

LC started smoking!!!!
Attachments
lc started smoking.png

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: Another one for ya: using put from server to stack

Post by shawnblc » Mon Jan 19, 2015 2:20 am

It WORKED! Awesome. I'd get so far away from the solution, then so close. Thanks for being there and helping out. LC is addictively fun!

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Another one for ya: using put from server to stack

Post by Simon » Mon Jan 19, 2015 2:26 am

Interesting.
I wonder if Apple will see this as a binary?
Well you could script anything from a text file. :twisted:

I'm not sure how stable using what we just did in the "closeStack" maybe further up the line is safer "on closeStackRequest".

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: Another one for ya: using put from server to stack

Post by shawnblc » Mon Jan 19, 2015 2:27 am

Simon wrote:Interesting.
I wonder if Apple will see this as a binary?
Well you could script anything from a text file. :twisted:

I'm not sure how stable using what we just did in the "closeStack" maybe further up the line is safer "on closeStackRequest".

Simon
I'll give it a whirl! Thanks again bud.

Post Reply