Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Plug'n'Play GUI Settings Editor for your scripts (Version 6)


  • Please log in to reply
154 replies to this topic
Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004

Making it able to pick up multiple ini's, this might be a big add on, and then it would just go down further in the tree

lets get toralf's opinion on this, but i think it'll be a bit too off-base and would require a lot of code rewriting... Easier would be to call this functin again with a different ini.

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


toralf
  • Moderators
  • 4035 posts
  • Last active: Aug 20 2014 04:23 PM
  • Joined: 31 Jan 2005

Making it able to pick up multiple ini's, this might be a big add on, and then it would just go down further in the tree

Why would you used multiple ini files?

With the default it is the same as with the type. You could mention it in the description. Would it often be used?
Should both default buttons (all and single key) be visible? Or only one?
Ciao
toralf
 
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004

Would it often be used?
Should both default buttons (all and single key) be visible? Or only one?

frequency of use depends... like for some of my script i pack a default ini file in the zip with the exe... one would have had to extract the original ini to get default settings, but that'd revert all settings to default and not just one. THIS particular option is still open, but till now there's no way to reset one particular option... so i guess only resetting the current key should be there. also, it'd add too much clutter if there're two set-to-default buttons.

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


Kerry
  • Members
  • 144 posts
  • Last active: Sep 25 2006 07:33 PM
  • Joined: 20 Jul 2006

Why would you used multiple ini files?


My script will read in (as includes) other scripts, each of those other scripts will dynamically create their own INI file, I would then like the user to be able to edit them without going through 5-15 windows (probably how many scripts I will be reading it)

If it's too much work that's fine... I'll see if I can mess around with the script until I can get it to work and post back if I do, and then you can decide whether or not you like the addition

-----------------
Edit: I was just thinking, perhaps something could simple be added in the INI file above each section, like with another name, and then that would be a section over the sections (that would work for me too)?

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004

My script will read in (as includes) other scripts, each of those other scripts will dynamically create their own INI file, I would then like the user to be able to edit them without going through 5-15 windows (probably how many scripts I will be reading it)


how about you editing the script to point to same ini file but separate sections? then a single window will be able to edit all settings.

please don't mind but it seems like a too specific use to be supported by a general-use function.

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


Kerry
  • Members
  • 144 posts
  • Last active: Sep 25 2006 07:33 PM
  • Joined: 20 Jul 2006
The only thing was I wanted different sections in it :) but yeah, you're right, it is too specific, I might see if I can edit the code a lil bit to match my specific case :)

-Kerry

toralf
  • Moderators
  • 4035 posts
  • Last active: Aug 20 2014 04:23 PM
  • Joined: 31 Jan 2005
Just in case, and to prevent duplicate work: I am writing a IniFileCreator script which GUI looks similar to the IniSettingsEditor but creates INI files from scrtach and user can edit/add/remove/modify all parts of the ini file. And later create the ini file.

I'm lazy and creating the ini files maually with the description and types can be messy. Give me some days.
Ciao
toralf
 
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
that sounds good toralf... keep us posted! :)

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012

creates INI files from scrtach and user can edit/add/remove/modify all parts of the ini file

Your objective seems very similar to the purpose of VisualINI - you could use that as a template too speed things up :p

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


Kerry
  • Members
  • 144 posts
  • Last active: Sep 25 2006 07:33 PM
  • Joined: 20 Jul 2006
Hey, what does OwnedBy and DisabledGUI do? I tried to put OwnedBy 0 and DisabledGUI 1, and made an error, which I was doing to try to test the different (what do they do?)

-Kerry

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
For OwnedBy, see +Owner option in GUI command... the function here is the same.

and DisableGUI, when provided a GUI count, disables it as long as the settings window is open... like most program's main window can't be accessed when you're on their settings window.

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


Kerry
  • Members
  • 144 posts
  • Last active: Sep 25 2006 07:33 PM
  • Joined: 20 Jul 2006
Hey, tell me if I'm messing something else with this code, but this is what I did to add a higher level branch in the Tree, I called it Area, due to not being able to think of a better name, but here:

		;Area Line
		If ( InStr(CurrLine, "{") = 1 And InStr(CurrLine, "}", "", 0) = CurrLineLength) {
            StringTrimLeft, CurrArea, CurrLine, 1
            StringTrimRight, CurrArea, CurrArea, 1
            CurrAreaLength := StrLen(CurrArea)
            CurrAreaID := TV_Add(CurrArea)
            CurrSecID =
            Continue
        }

Then I changed 1 line in the Section area:

Original:
CurrSecID := TV_Add(CurrSec)

New:
CurrSecID := TV_Add(CurrSec, CurrAreaID)

Then below to make the first one selected:

Original:
    ;select first key of first section and expand section
    TV_Modify(TV_GetChild(TV_GetNext()), "Select")

New:
    ;select first key of first section and expand section
    TV_Modify(TV_GetChild(TV_GetNext()), "Select")
	If CurrAreaID <>
	{
		TV_Modify(TV_GetChild(TV_GetChild(TV_GetNext())), "Select")
	}

for the description, I added

		;describtion (comment) line for area
        If ( FirstChar = ";" AND CurrAreaID) {
            StringLeft, chk2, CurrLine, % CurrAreaLength + 2
            If (";" CurrArea A_Space = chk2){
                StringTrimLeft, Des, CurrLine, % CurrAreaLength + 2
                %CurrAreaID%Des := %CurrAreaID%Des "`n" Des
              }
            Continue
        }

and had to change 1 line from the section code
Original:
%CurrSecID%Des := %CurrSecID%Des "`n" Des

New:
%CurrAreaID%%CurrSecID%Des := %CurrAreaID%%CurrSecID%Des "`n" Des

an Example (like your INI would be)
{Whisper}
;Whisper This contains all the settings for the Whisper program
[User]
;User User of this script
Name=Testing
;Name Name of user
;Name second line
;Name Type: Text

The only thing I can't figure out how to do (looks really complex) is making the section uneditable as well as the whisper, I saw that you made it the parent object, but not sure how to make the one right under it uneditable too (in the case that there is an area), have any idea how I could do that?

-Kerry

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
Kerry,
as u're modding taking toralf's mod as base.. he's the best person to ask.

toralf,
i modded ur function to add the 'Default' feature... as u must be busy with the editor, i thought of giving u a hand instead of making feature demands! :)

moderator: Removed out-dated code

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


Kerry
  • Members
  • 144 posts
  • Last active: Sep 25 2006 07:33 PM
  • Joined: 20 Jul 2006
Hey, I made a complete working version with a third area (done by using {})

Do you want me to post the code? I know it was to be too specific, and I don't want to infringe on your guys' program, but thought it might help. It doesn't interfere with the rest of the program (you don't need to have the area) and it will work just as you designed it.

-Kerry

toralf
  • Moderators
  • 4035 posts
  • Last active: Aug 20 2014 04:23 PM
  • Joined: 31 Jan 2005

I tried to put OwnedBy 0 and DisabledGUI 1, and made an error

I'll add a line to the code that will prevet this error.
Ciao
toralf
 
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.