Posted: 14th Feb 2022 22:31
I have a project I'm trying to port to app game kit, that downloads a website and saves it as a text file, I've tried all the examples but none have worked to actually fetch a website and save the html off as a textfile, so please help if it can be done. If not the app game kit team you need to add a command to allow us to use the browser or whatever to fetch a website then have a command to save it off as a textfile. I've tried the examples using google maps to save a map file as a png but this will not work for a website itself and saving the html as a text file...

for example:
sourcehtml.txt
Posted: 15th Feb 2022 0:15
I've tried all the examples

+ Code Snippet
http = CreateHTTPConnection()
SetHTTPHost( http, "appgamekit.com", 0 )

MyFile$ = "GetHTTPFile.txt"

GetHTTPFile( http, "documentation/Reference/HTTP/GetHTTPFile.htm", MyFile$ )
while GetHTTPFileComplete(http) = 0
    Print( "Downloading: " + str(GetHTTPFileProgress(http)) )
    Sync()
endwhile

CloseHTTPConnection(http)
DeleteHTTPConnection(http)

do
    Print( "Click to open: " + MyFile$)
    If GetPointerPressed() then OpenBrowser(GetWritePath()+"/media/" + MyFile$)
    Sync()
loop


what am i missing?
Posted: 15th Feb 2022 0:23
Thank you sooooo much, you know it was working before, I just didn't know that there was another agkapps folder under the local folder... Thank you when you did the click to open then I hit save as and it took me to the folder and my other html.txt file I tried to save before was in there too.. It was in a completely different folder from my project folder, I didn't know it created this other directory.

Anyways sorry to bother you, but I am happy you posted this..

Thanks,

Appprrrrrreeeeeeeshhhh!
Posted: 15th Feb 2022 0:25
not a problem was wondering if you wanted something else but sounds like you're set.
Posted: 15th Feb 2022 0:30
Thank you this will work perfectly for an app I already have done in C#, now I can re-write the whole thing in AGKStudio and even test it using the player while working on it,

Thanks man,

I appreciate it fully, more than you know.

Ken aka StOrM3