No internet with standalone?

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

3djedi
Posts: 16
Joined: Mon Feb 16, 2015 3:32 pm

No internet with standalone?

Post by 3djedi » Mon Feb 16, 2015 4:01 pm

New to LiveCode and longtime Toolbook developer... and I am completely stumped (and feeling stupid)!
Problem: unsuccessful at launching an internet URL and/or put url statement in a windows standalone on the target machine after install.
works fine:
in the windows IDE
in the standalone on the windows development machine
in the standalone on the windows (Vista, Win 7, Win 8) target machines, but only after REBOOTING

have perused and tried every single post here with regard to launching/checking for an internet connection,etc. to no avail.
...and completely baffled that the standalone on the target machine will launch URLs after rebooting!

Any ideas or suggestions?
Thank you in advance,
Jay

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: No internet with standalone?

Post by Klaus » Mon Feb 16, 2015 4:55 pm

Hi Jay,

1. welcome to the forum! :D

2. That should work right out of the box!?
Never had any problems with that in the past.

No idea what is going wrong, but you could check "the result" right after launching the url,
maybe that might give us a hint:

Code: Select all

...
launch url "http://www.whatever.com"
if the result <> empty then 
   answer the result
## THE RESULT should be empty on success and maybe give a hint if not.
end if
...
Best

Klaus

3djedi
Posts: 16
Joined: Mon Feb 16, 2015 3:32 pm

Re: No internet with standalone?

Post by 3djedi » Mon Feb 16, 2015 5:31 pm

Klaus,

Thank you for the quick reply... I will implement your handler, run the standalone on the target machine and report back ASAP!

Thanks again,
Jay

3djedi
Posts: 16
Joined: Mon Feb 16, 2015 3:32 pm

Re: No internet with standalone?

Post by 3djedi » Mon Feb 16, 2015 6:15 pm

Klaus,

I put your handler in a mouseup script and "Viola" it worked like a champ! (Now I'm seriously confused)
My challenge seems to be isolated to using an internet url and the put command... for example

Code: Select all

--Check for Internet Connection
   put url "ht tp :// www . google . com" into tURL
   if tURL is empty then
      answer question "Please check your internet connection and try again."
      exit to top
   end if 
or should it be this?

Code: Select all

--Check for Internet Connection
   put url "ht tp :// www . google . com" into tURL
   if tURL <> empty then
      answer question "Please check your internet connection and try again."
      exit to top
   end if 
Thanks in advance,
Jay
PS. had to put spaces in the URL (forum rules)

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: No internet with standalone?

Post by SparkOut » Mon Feb 16, 2015 6:33 pm

First, wrap the URL in parentheses.ie

Code: Select all

put URL (http://www.google.com) into tUrl
it shouldn't be necessary but sometimes it is.
Is the URL being retrieved in a preopenstack or openstack script? It can be necessary to add a little delay by such as

Code: Select all

send fetchUrl to this stack in 1000 milliseconds
(having made an appropriate handler) so that liburl has time to be loaded.

3djedi
Posts: 16
Joined: Mon Feb 16, 2015 3:32 pm

Re: No internet with standalone?

Post by 3djedi » Mon Feb 16, 2015 7:03 pm

Thank you for the quick reply SparkOut... I implemented your suggestions and had the same end result on the target machine. script is in a button on a card in the stack... long after the liburl loads

Code: Select all

on mouseUp
   
   --Check for Internet Connection
   put url ("http :// www . google . com") into tURL
   if tURL is empty then
      answer question "Please check your internet connection and try again."
      exit to top
   end if
Should I not include the double quotes when enclosing the url?... I noticed your code did not have any.

Thanks in advance,
Jay

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: No internet with standalone?

Post by Klaus » Mon Feb 16, 2015 7:09 pm

Hi Jay,
Should I not include the double quotes when enclosing the url?
you really should! :D

But i was talking about (also) checking "the result"! 8)
That my give a hint on WHAT might have gone wrong, you could add it to your script:

Code: Select all

...
put url ("http :// www . google . com") into tURL
   if tURL is empty then
      answer question "Please check your internet connection and try again." & CR & "Possible ERROR:" && the result
      exit to top
   end if
...
Best

Klaus

3djedi
Posts: 16
Joined: Mon Feb 16, 2015 3:32 pm

Re: No internet with standalone?

Post by 3djedi » Mon Feb 16, 2015 7:09 pm

okay, just tried removing the quotes inside the parentheses of the url and the script editor throws an error.
So I'm guessing that the quotes need to be there... Still stuck and perplexed!

Thanks in advance,
Jay

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: No internet with standalone?

Post by SparkOut » Mon Feb 16, 2015 7:11 pm

Whoops, quotes are needed. That was a reflection of me using a phone to visit the forum and forgetting to wrestle with the onscreen keyboard for fancy characters.

So if you launch URL as per Klaus's code it works, but put URL into a variable doesn't. That's very odd. What if you

Code: Select all

get URL ("http://www.google.com")
Put it into tUrl
If turl is empty then... 
Etc...

3djedi
Posts: 16
Joined: Mon Feb 16, 2015 3:32 pm

Re: No internet with standalone?

Post by 3djedi » Mon Feb 16, 2015 7:13 pm

Klaus wrote:Hi Jay,

But i was talking about (also) checking "the result"! 8)
That my give a hint on WHAT might have gone wrong, you could add it to your script:

Code: Select all

...
put url ("http :// www . google . com") into tURL
   if tURL is empty then
      answer question "Please check your internet connection and try again." & CR & "Possible ERROR:" && the result
      exit to top
   end if
...
Best

Klaus
Okay Klaus, I will give that a shot and let you know... Thanks!

3djedi
Posts: 16
Joined: Mon Feb 16, 2015 3:32 pm

Re: No internet with standalone?

Post by 3djedi » Mon Feb 16, 2015 7:53 pm

okay, I tried both suggested scripts and received "invalid host address" results on both... on multiple target windows (Vista and Win 7) machines...
not sure where to go next as REBOOTING the target machine(s) solves the connection issue... but obviously don't want the end user to have to reboot after installing.

I'm open to ideas!

Thanks in advance,
Jay

3djedi
Posts: 16
Joined: Mon Feb 16, 2015 3:32 pm

Re: No internet with standalone?

Post by 3djedi » Tue Feb 17, 2015 1:23 am

Any further suggestions to resolve this issue?
I have scoured the forums for "invalid host address" and could find no posts directly related to my issue except this one: http :// www . runrev . com/pipermail/use-livecode//2012-November/180328 . html
Give the age of the post, I'm not sure it's applicable.
Any ideas?

Thanks in advance,
Jay

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

Re: No internet with standalone?

Post by Simon » Tue Feb 17, 2015 1:40 am

Hi Jay,
Any chance these machines are behind a proxy?

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

3djedi
Posts: 16
Joined: Mon Feb 16, 2015 3:32 pm

Re: No internet with standalone?

Post by 3djedi » Tue Feb 17, 2015 1:48 am

Simon wrote:Hi Jay,
Any chance these machines are behind a proxy?

Simon
Simon,

Neither are... and to make it all really strange... if I use a launch url script in the standalone, the default browser launches successfully with the correct url but I can't use a put or get without a reboot.
At this point... Thinking about uninstalling livecode and reinstalling.

Thanks in advance,
Jay

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

Re: No internet with standalone?

Post by Simon » Tue Feb 17, 2015 3:21 am

Try the attached
Test_connect.zip
LC 6.7.2
(7.95 KiB) Downloaded 168 times
With that simple stack it fails?

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

Post Reply