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.

Windows / [SOLVED] Save to file - nothing happend

User Offline
Joined: 7th Feb 2020
Posted: 7th Feb 2020 15:14
This post has been marked by the post author as the answer.
Hi! I'm trying to save some informations to a text file but nothing happend when I run my code, my file (it's a simple test txt file in the root of my project) remains empty.

MY code contains nothing else just the sample code from AGK's website, so I belive its just a file authorization issue. I'm trying to change the file policies, but it wont helps.

The author of this post has marked a post as an answer.

Go to answer

Years of Service
User Offline
Joined: 20th Dec 2015
Posted: 7th Feb 2020 21:56 Edited at: 7th Feb 2020 21:57
AGK doesn't store files saved with OpenToWrite to your project's root folder unless you tell it to.

AGK Developer
Gold Codemaster
Years of Service
User Offline
Joined: 21st Jan 2009
Location: Lakewood Ranch, FL
Posted: 7th Feb 2020 22:18

AGK saves the files to C:\Users\[USERNAME]\AppData\Local\AGKApps\[APPDIRNAME] because reasons.

hendron's code, above, is a short and sweet way to save files to, well... where most users would expect them to be.

Virtual Nomad
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 10th Feb 2020 03:45
that code:

is also going to (try to) save the file every loop.
User Offline
Joined: 7th Feb 2020
Posted: 10th Feb 2020 09:15
@Virtual Nomad

yes I know. I'm just try this way as an experience.

@hendron, @loktofeit - THANK YOU.

Login to post a reply

Server time is: 2020-02-23 06:05:50
Your offset time is: 2020-02-23 06:05:50