Page 2 of 2

Re: Problem with Google Query Lannguage

Posted: Wed Oct 01, 2014 8:16 pm
by Simon
Hi teacherguy,
Actually with your exact code I get the same
result empty
it OK

But

Code: Select all

   put URL wholeURL into temp
  -- set the sockettimeoutinterval to 1000 ---if you have to use this I believe it goes before the get/put
   answer the result
   put temp
does return the info you want.

Simon

Re: Problem with Google Query Lannguage

Posted: Wed Oct 01, 2014 8:29 pm
by teacherguy
Simon,

When I place the sockettimeoutinterval prior I get a 443 timeout no matter what. :(

Re: Problem with Google Query Lannguage

Posted: Wed Oct 01, 2014 8:31 pm
by Simon
But what about using put???
Did that work for you?

Simon
Edit: the commented line actually had nothing to do with the post :)

Re: Problem with Google Query Lannguage

Posted: Wed Oct 01, 2014 8:37 pm
by teacherguy
Simon wrote:But what about using put???
Did that work for you?

Simon
Edit: the commented line actually had nothing to do with the post :)
With this code:

Code: Select all

on mouseUp
   put "https://docs.google.com/spreadsheets/d/" into downloadFirstHalf
   put "1kzVH1Nv9K3tuZCTyIs6BPbGT-wycs8aIRlhLdz5ZCpk" into downloadKey
   put "/gviz/tq?tqx=out:json&tq=select+A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS+order+by+A+desc" into downloadSecondHalf
   put downloadFirstHalf&downloadKey&downloadSecondHalf into wholeURL
   libURLSetSSLVerification false 
   put URL wholeURL into temp
   answer the result
   put temp
end mouseUp
I get this result:

socket timeout docs.google.com:443|6978

Re: Problem with Google Query Lannguage

Posted: Wed Oct 01, 2014 8:47 pm
by Simon
Leave the socketTimeout in if you need it.

Just saying that I received the same results as you
result empty
it OK
until I used the put.

Simon

Re: Problem with Google Query Lannguage

Posted: Wed Oct 01, 2014 8:52 pm
by Simon
OK it's the "it" variable getting scrambled;

Code: Select all

 on mouseUp
   put "https://docs.google.com/spreadsheets/d/" into downloadFirstHalf
   put "1kzVH1Nv9K3tuZCTyIs6BPbGT-wycs8aIRlhLdz5ZCpk" into downloadKey
   put "/gviz/tq?tqx=out:json&tq=select+A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS+order+by+A+desc" into downloadSecondHalf
   put downloadFirstHalf&downloadKey&downloadSecondHalf into wholeURL
   libURLSetSSLVerification false 
   get URL wholeURL
   put it 
   set the sockettimeoutinterval to 1000
   answer the result
end mouseUp
Works here.

Simon

Re: Problem with Google Query Lannguage

Posted: Wed Oct 01, 2014 9:59 pm
by teacherguy
Was on my way home and just tried your suggestion. Worked perfectly. Hopefully it will work tomorrow at school.

Thank you for taking the time, I truly appreciate it!

Re: Problem with Google Query Lannguage

Posted: Thu Oct 02, 2014 12:42 pm
by teacherguy
At school I am back to the same issues: I get a timeout if I don't use the "set the sockettimeoutinterval" but when I do use it I either get nothing for "it" or I get the word "OK" (or empty)

Well, I guess we've narrowed the issue to my network?