address in local or global not working?

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

Post Reply
sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am

address in local or global not working?

Post by sphere » Wed Jun 24, 2015 8:52 pm

Hi,

just a short question which i don't understand.

Why is this working

Code: Select all

put URL "http://website/script.php" into varResults
and this not

Code: Select all

put quote & gIP & "/script.php" & quote into tGetshow
answer tGetshow
put URL tGetdata into varResults
i created a field where a user can input the webaddress or IP address, that is put into gIP
the answer command is giving me the correct address with quotes

So you might think it is correct
but the put URL command does not put the received information into varResults but the webaddress
in better words, the results should be put in a field, but instead of the result the webaddress is shown

so http:// is known and also the scriptname.php is known
just the address or IP address can change

can anyone help me in the right direction?

thanks very very much!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: address in local or global not working?

Post by FourthWorld » Wed Jun 24, 2015 8:56 pm

URLs don't include quotes. LiveCode needs those when putting the things between the quotes into a variable, but the variable itself should not include them.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am

Re: address in local or global not working?

Post by sphere » Wed Jun 24, 2015 9:04 pm

wow ! that was blazingly simple .....
I was thinking tooooooooooooooooooooooo difficult

i removed the quotes and it worked :) :D :mrgreen:

Thanks a lot FourthWorld! --> Richard !

Post Reply