AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Plug'n'Play GUI Settings Editor for your scripts (Version 6)
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Wed Jul 26, 2006 9:09 pm    Post subject: Reply with quote

Kerry wrote:
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.
_________________
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Wed Jul 26, 2006 9:19 pm    Post subject: Reply with quote

Kerry wrote:
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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Wed Jul 26, 2006 9:37 pm    Post subject: Reply with quote

toralf wrote:
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.
_________________
Back to top
View user's profile Send private message
Kerry



Joined: 20 Jul 2006
Posts: 146
Location: Los Angeles

PostPosted: Wed Jul 26, 2006 9:46 pm    Post subject: Reply with quote

Quote:
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)?
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Wed Jul 26, 2006 9:53 pm    Post subject: Reply with quote

Kerry wrote:
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.
_________________
Back to top
View user's profile Send private message
Kerry



Joined: 20 Jul 2006
Posts: 146
Location: Los Angeles

PostPosted: Wed Jul 26, 2006 9:59 pm    Post subject: Reply with quote

The only thing was I wanted different sections in it Smile 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 Smile

-Kerry
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Wed Jul 26, 2006 10:16 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Wed Jul 26, 2006 10:39 pm    Post subject: Reply with quote

that sounds good toralf... keep us posted! Smile
_________________
Back to top
View user's profile Send private message
Titan



Joined: 11 Aug 2004
Posts: 5041
Location: imaginationland

PostPosted: Wed Jul 26, 2006 11:10 pm    Post subject: Reply with quote

toralf wrote:
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 Razz
_________________

RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
Kerry



Joined: 20 Jul 2006
Posts: 146
Location: Los Angeles

PostPosted: Wed Jul 26, 2006 11:10 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Wed Jul 26, 2006 11:20 pm    Post subject: Reply with quote

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.
_________________
Back to top
View user's profile Send private message
Kerry



Joined: 20 Jul 2006
Posts: 146
Location: Los Angeles

PostPosted: Wed Jul 26, 2006 11:53 pm    Post subject: Reply with quote

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:

Code:

      ;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:
Code:
CurrSecID := TV_Add(CurrSec)


New:
Code:
CurrSecID := TV_Add(CurrSec, CurrAreaID)


Then below to make the first one selected:

Original:
Code:

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


New:
Code:

    ;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

Code:

      ;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:
Code:
                %CurrSecID%Des := %CurrSecID%Des "`n" Des


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


an Example (like your INI would be)
Code:

{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
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Thu Jul 27, 2006 12:15 am    Post subject: Reply with quote

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! Smile

moderator: Removed out-dated code
_________________
Back to top
View user's profile Send private message
Kerry



Joined: 20 Jul 2006
Posts: 146
Location: Los Angeles

PostPosted: Thu Jul 27, 2006 1:51 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Thu Jul 27, 2006 5:28 am    Post subject: Reply with quote

Kerry wrote:
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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 3 of 10

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group