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 / Retrieving the full path when using ChooseRawFile("*.csv")

Author
Message
Kevin Cross
21
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 5th Apr 2017 12:13
Hi

Is it possible to retrieve the full path when browsing for a file using ChooseRawFile()? I want to open two files, check for differences between the two and then write out a file containing the differences in the same directory as the original files opened with ChooseRawFile. I can do all of this but save the file in the same directory because I can't find a function that retrieves the full path to the two files I've loaded.

Another option would be to be able to browse to a location to save a file. Like ChooseRawFile() but it opens up the file directory to save a file instead of opening one.

Thanks

Kevin
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 5th Apr 2017 12:26
Quote: "retrieve the full path when browsing for a file "

There's currently no AppGameKit command to do this.
Signature removed by mod because it's larger than 600x120... please resize and try again.
Kevin Cross
21
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 5th Apr 2017 12:47 Edited at: 5th Apr 2017 12:50
Ok thanks. I'm having trouble finding the default location it saves to at the moment with OpenToWrite. GetWritePath shows /Users/<username>/Library/Application Support/AGK Player/ but I've not got a Library folder in /Users/<username>/ and there's no AppGameKit Player folder in the /Users/Library/Application Support/. I've tried changing the path with SetRawWritePath and fixing a location but it's not writing to any location I pick. I even tried SetRawWritePath(GetDocumentsPath())

I've written files before and accessed them in the app (for saving data etc.) but for this mini project I need to be able to access the text file from outside of the app.

I will see if I can manually create the missing folders shortly to see if that works.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Apr 2017 13:55
We had a coding challenge to write a better file picker. The challenge failed because fo the lack of full path
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Kevin Cross
21
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 5th Apr 2017 14:09
I've just seen that this folder does exist on the computer: /Users/<username>/Library/Application Support/AGK Player/

The Library folder was hidden. Now that I've found the folder I can see and look at text file that gets written.

Next step is to see why SetRawWritePath isn't working as I'd like to change the path to a more standard one like Desktop or Documents etc.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 5th Apr 2017 17:17
last AppGameKit version supporting dlls now. i think you can get some freedom with the usage of an c++ or c# library project in visual studio.
AGK (Steam) V2017.03.31 : Windows 10 Pro 64 Bit : AMD (17.2.1) Radeon R7 265 : Mac mini OS Sierra (10.12.2)
Kevin Cross
21
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 5th Apr 2017 17:45
@Markus thanks but I've no real experience with C++ or C#. I wanted to create a simple tool that would be used within a team of 4 or 5 people at my place of work so didn't want to spend too long with it, as it goes I found other problems with it when working with AGK. In the end I threw something together in IBM SPSS Statistics that found the differences between records in the two CSV files, each containing 60,000-70,000 rows. I know Excel would have been the most logical tool to use.

I have a feeling though I'm going to need to save files to a folder outside of the AppGameKit environment that the user can open externally so will have another look at it again at a later date.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 5th Apr 2017 19:13 Edited at: 5th Apr 2017 19:18
agk is more for games.
i think you should try visual studio2017 and visual basic .net project for windows desktop.
or PureBasic 800 rows are free
or if you have a database server, maybe import this csv files (or connect via odbc direct) and try a query / report.

i read that ChooseRawFile make a copy of the selected file
Quote: "the file will be copied to the apps current directory"

you can not use OpenToRead OpenToWrite GetDocumentsPath ?
AGK (Steam) V2017.03.31 : Windows 10 Pro 64 Bit : AMD (17.2.1) Radeon R7 265 : Mac mini OS Sierra (10.12.2)
GameDevGuy
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location:
Posted: 5th Apr 2017 21:42
While I agree that AppGameKit is more for games, if I am working on a game and need to knock together a small utility (related to managing game assets during development, say) it would be very convenient if I could code it in AppGameKit too.

If ChooseRawFile() did return the full path, on the three desktop platforms, it could make the creation of such utilities a lot more convenient and easier, for such a small enhancement to the language.

I have seen threads here where an AppGameKit coder has reached a roadblock when developing what looks like a useful tool for AppGameKit simply because of this one limitation.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 5th Apr 2017 22:05 Edited at: 5th Apr 2017 22:06
Quote: "If ChooseRawFile() did return the full path, "

you need a feature request for a new folder/file selector because this command is in use and it copy the file.
today i made a feature request to have file access to all that the user can use.
yes, i made also level editor for my game and need copy the output then into the media folder.
Quote: "coder has reached a roadblock when developing "

he he it remember me i remade a tool in basic 4 java and the write pixel was missing. arrrgg.
because of one row i had written a compleate bitmal file output.
agk provide tier2, thats the last hope, but now for windows the dll support is fine.
AGK (Steam) V2017.03.31 : Windows 10 Pro 64 Bit : AMD (17.2.1) Radeon R7 265 : Mac mini OS Sierra (10.12.2)
Kevin Cross
21
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 6th Apr 2017 01:46
Quote: "agk is more for games. "

While no one is going to be making a fully functioning Photoshop in AppGameKit, I like to think that it's good enough for quite a lot of decent apps and utilities. Not just games. I managed to create a prototype in AppGameKit with resizable and draggable panels. Using SetScissor correctly you've got panels that can each contain content that's scrollable too (think of the Unity window and the different panels). It's just the little things that let it down sometimes like this file path problem, and the lack of functionality with EditBoxes (i.e. not being able to select part or all of the text and no copy and paste etc.).

I tend to have more app ideas then games and AppGameKit seems the almost perfect option for me.
Jack
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 6th Apr 2017 05:07
Quote: "While no one is going to be making a fully functioning Photoshop in AppGameKit"

GUI + GLSL can give you 100% Photoshop in AppGameKit right now. We already have some successful paint softwares made in AppGameKit some while ago.
If We could be able to modify the sound signal by a shader, we would also be able to create all sort's of synths/ or sound mixing platforms.
AGK just misses some minor features to be 100% flexible for all sorts of problems.

You can also create a custom editbox that can be modified.

A while ago, I posted a custom file explorer for AppGameKit that could return filename and filepath. Maybe you find it.




[/url]

Login to post a reply

Server time is: 2024-11-24 16:27:02
Your offset time is: 2024-11-24 16:27:02