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 Showcase / [Plugin] FileExplore (File, Folder and System-Drives Handling)

Author
Message
MadBit
Valued Member
9
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 23rd Apr 2017 00:02 Edited at: 7th Apr 2019 08:22
Hello,
Here is a new plugin for you. Lately, the insufficient support for desktop file browsing was a few times a topic here in the forum.
Now I offer you a plugin, that treats exactly this problem. I hope you can use it.

Plugin: FileExplore

Here is the command list:


The commands starting with 'GetCurrentFile ...'. Refer to the file obtained with GetFirstFile and GetNextFile.

[UPDATE:27-04-2017]
New Function ChooseFileDialog
New Function SaveAsDialog
New Function MessageBox

Function in detail:


[UPDATE:06-05-2017]
New Function - String GetCL()

[UPDATE:16-10-2018]
Added 64Bit DLL

[UPDATE:02-03-2019]
Added New Function - Void SetDialogPosition(Integer PosX, Integer PosY) -> Set the Position for ChooseFileDialog and SaveAsDialog
Added New Function - Void SetInitialDir(String Directory) -> Set the Initial Directory for ChooseFileDialog and SaveAsDialog

[UPDATE:07-04-2019]
Added New Function - Void SetWindowStyle(Integer Style) -> Set the Style of AppGameKit output window -> StyleFlags
Added New Function - Void SetWindowExStyle(Integer ExStyle) -> Set the ExStyle of AppGameKit output window -> ExStyleFlags

And some code snippets.
System-Drive-Enumeration:


Folder Enumeration:


File Enumeration:


Please tell me if you find bugs or have some suggestions.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Attachments

Login to view attachments
nz0
AGK Developer
11
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 23rd Apr 2017 00:55
Nice work. We should really have a sticky for plugins.

BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 23rd Apr 2017 10:29
Good work, and thank you sir!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 24th Apr 2017 01:25
Would it be possible to add the openfile dialog to this .dll?
Stab in the Dark software
Valued Member
16
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 24th Apr 2017 14:03 Edited at: 24th Apr 2017 14:03
Quote: "Would it be possible to add the openfile dialog to this .dll?"


AGK has a open file dialog. It needs a save file dialog.
The coffee is lovely dark and deep,and I have code to write before I sleep.
BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 24th Apr 2017 18:09
The AppGameKit OpenFile dialog doesn't return the full path of the file. It would be really good to add it, because it would save the effort of having to hand-craft a solution.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
MadBit
Valued Member
9
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 25th Apr 2017 15:44
So after some problems I have now managed to create a file dialog.
Any other suggestion?

To be added.
ChooseFileDialog
SaveAsDialog

Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 25th Apr 2017 22:28
Message dialog would be cool too
BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Apr 2017 08:34
Quote: "Message dialog would be cool too"


Message() already exists
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 26th Apr 2017 10:06
Damn. Forgot about that!
Jack
14
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 27th Apr 2017 21:19 Edited at: 27th Apr 2017 21:21
Good work!
+1 for good and easy mass selection

[/url]
MadBit
Valued Member
9
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 27th Apr 2017 22:21 Edited at: 27th Apr 2017 22:25
Thanks Jack and all others.

So, as far as no further requests are available. Here are 3 additional functions. ChooseFileDialog, SaveAsDialog and MessageBox. The MesaageBox offers more flexibility than that of AGK.

Here the NEW Functions in detail.


Download see the first post
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 2nd May 2017 23:41
Super duper want: Get command line arguments
MadBit
Valued Member
9
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 6th May 2017 02:37
blink0k wrote: "Super duper want: Get command line arguments"


Added
GetCL()

The strange thing about this is that Paul has already implemented this function but it does not work.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 7th May 2017 00:16
Superb! Thanks!
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 7th May 2017 08:45 Edited at: 7th May 2017 08:46
One last request;
Functions to access the copy/paste buffer
Functions to allow access to the right-click menu for file explorer
JohnnyMeek
5
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 7th May 2017 16:21
Mac version would be great to have......
MadBit
Valued Member
9
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 16th Oct 2018 13:47
Hi,

I've updated this plugin for support 64bit-Windows.
You find the download at the first post.

Thanks for your attention.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Cliff Mellangard 3DEGS
Developer
13
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 17th Oct 2018 17:14
MadBit
Valued Member
9
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 2nd Mar 2019 19:55
The first post has a updates with a new version.
Contains two new Commands.

[UPDATE:02-03-2019]
Added New Function - Void SetDialogPosition(Integer PosX, Integer PosY) -> Set the Position for ChooseFileDialog and SaveAsDialog
Added New Function - Void SetInitialDir(String Directory) -> Set the Initial Directory for ChooseFileDialog and SaveAsDialog
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 2nd Mar 2019 22:47
Thanks MadBit. My favorite plugin!
Ortu
DBPro Master
11
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 3rd Mar 2019 00:31
Nice work MadBit
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
MadBit
Valued Member
9
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 3rd Mar 2019 06:34
Thankyou!
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Scraggle
Moderator
15
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 1st Apr 2019 16:54
I'd really like to use this plugin but I can't get it working.
I haven't used any plugins before so maybe the problem is at my end but I'd appreciate any help.
Here's what I have done:

Downloaded the plugin and extracted it to e:\AGK\Plugins\
Set my preferences for plugins to point to that folder.
Added the line#import_plugin FileExplore to my code


When I compile I get the error:
Quote: "error: Failed to open file for reading /Plugins/FileExplore/Commands.txt"


I read somewhere that you need to add the plugin to your projects folder, so I did that next. I created a Plugins folder in my project folder and copied all of the FileExplore folder into it.
But when I compile now, I get the following error and the FileExplorer folder is deleted from {project}/Plugins/


What am I doing wrong?

Attachments

Login to view attachments
MadBit
Valued Member
9
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 1st Apr 2019 19:47 Edited at: 1st Apr 2019 19:49
Where you want to specify your plugin path. This is the plugin path of geany and has nothing to do with AGK.
If you want to use a plugin from AppGameKit, you have to copy the directory into the plugin folder of AppGameKit as shown in the picture.
Compiling your project will automatically copy all used plugins to your project directory.



And thank you for using this Plugin.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Attachments

Login to view attachments
Scraggle
Moderator
15
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 4th Apr 2019 07:35 Edited at: 4th Apr 2019 07:35
Hey Mr Bit!
Would it be possible to have a function that removes the windows border for the AppGameKit App that calls your DLL?
Thanks for your awesome .DLL!
MadBit
Valued Member
9
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 7th Apr 2019 07:32
Okay, new version in the first post.
Two new commands SetWindowStyle and SetWindowStyleEx. This allows you to define your own style for the AppGameKit window. Use the flags required by Microsoft you can find here.

StyleFlags
ExStyleFlags

You may have to link them with '||'. Make sure that you set the flags for visibility (WS_VISIBLE).

@blink0k
The following line is recommended for your borderless window.


Think about it, the resolution and aspect ratio change. Since the space needed for the frame is now available for drawing.

I hope it works without a problem.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 7th Apr 2019 21:27
Superb! Thanks heaps!

Login to post a reply

Server time is: 2019-04-22 08:12:02
Your offset time is: 2019-04-22 08:12:02