Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / SendHTTPFile follow up1 2015

Author
Message
ICERGB
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 25th Aug 2015 09:25
Using the Help file for SendHTTPfile with the AppGameKit example and the PHP example...

Could someone please tell me why the example of the AppGameKit for SendHTTPfile has the line
"until done = 1"
This is an error.
(Is this is for a learning curve?)
Anyways
I switched it out for



the "done=1" seems to take care of it
probably not the smartest way
however
WHY I AM HERE IS BELOW

I am getting an error html file that flashes in white text on the black screen for less than a second and disappears.
I have narrowed it down to this;
when this kicks in as true:


The only way to view this flashing full text of html screen for more than the flashing second is to use the command "sleep (some time)"

IF you use "print repeat" after "UNTIL done=1"

then you print something in a loop; the text disappears... WHY???
Why doesn't the text stay???

How can i caputure the html text?
How can i caputure the html text?

and the text is tiny and non capturable!

HOW do I capture this TEXT so I can SEE IT?
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 25th Aug 2015 13:46 Edited at: 25th Aug 2015 13:50
u must check 3 states 0,1,-1
Quote: "Returns 1 if the request previously sent with SendHTTPRequestASync has completed. You can get the response with GetHTTPResponse. Returns 0 if the request is still in progress, or -1 if the request failed. "


just save the response in a string variable.
each sync it begins a new cycle.

if "beep"
r$= ...
endif
print(r$)


i prefer


AGK (Steam) V2 Beta .. : Windows 10 Pro, 8.1 Pro 64 Bit : AMD (15.7.1) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
ICERGB
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 26th Aug 2015 14:21 Edited at: 26th Aug 2015 14:43
Quote: "u must check 3 states 0,1,-1"


Thanks that helps...

... Still, no better way to capture the response?

I saw it clear enough that it was html and is saying the there was an error. Sending it to a variable seems to work; but there seems to be no way to look at all the text, as it is to large to paste on the screen without the bottom half disappearing.
Any way to post the variable to a debugger or the clip board???

I need to see the html response my server sent so I can figure out what the error is... Clipboard should be the way to go; even if it just for debugging purposes. or post variable contents to the debugger??? Even if it is not supported in the tablet/iphone export; if I run it one windows or mac I should be able to easily capture a long html response as text and easily reference it???

Tks for the help!
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 26th Aug 2015 14:41 Edited at: 26th Aug 2015 14:43
SetPrintSize can help, write as file or a function where you can step
through the string.
see mid and len command.

or a text label and set the offset via a view function

or make the same request with your web browser.

AGK (Steam) V2 Beta .. : Windows 10 Pro, 8.1 Pro 64 Bit : AMD (15.7.1) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
ICERGB
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 26th Aug 2015 14:45 Edited at: 26th Aug 2015 14:48
How could I make the same request with a web browser?

or Log?
Quote: "Log( szMessage )
Parameters

szMessage - the text message to send to the log/output area"


plse/tks
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Aug 2015 15:48
Quote: "How could I make the same request with a web browser?"


Type the same URL into Chrome or IE

Quote: "or Log?"


Run in debug mode, and the log command will write to the Debug Log window.

Personally, I would write it to a file and check it in Notepad.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
ICERGB
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 27th Aug 2015 13:12 Edited at: 27th Aug 2015 13:14
Hmmm
Quote: "Debugger not yet implemented"

However:


Does work like a charm!
Yay!

I used:


I don't get it: does your debugger work?

Which brings me back to the original question:
Why does the help file for SendHTTPFile use

as it doesn't work.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 27th Aug 2015 17:45
everybody can add examples to the commands.
there is no edit option.
u can make a better example and upload it

AGK (Steam) V2 Beta .. : Windows 10 Pro, 8.1 Pro 64 Bit : AMD (15.7.1) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)

Login to post a reply

Server time is: 2024-04-20 05:09:37
Your offset time is: 2024-04-20 05:09:37