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
toralf



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

PostPosted: Mon Aug 07, 2006 8:16 am    Post subject: Reply with quote

holomind wrote:
For Including in your scripts its a little bit to big, so calling it as a second ahk-script for simply editing the .ini file would be better pehaps. or one uses #include... to get ones own script smaller.
Dear Holomind,
It was always ment to include the function via #Include. See details in header of function.

@robiandi,
Thanks for the suggestion. I added it to the Ini File Creator. I modified your code slightly. :) And added a new feature: The GUI remembers the last position it has been shown, and will show up at the same position.

@All
Since the Ini File Creator seems to be mature enough I have raised it's version number to be equal of the functions one to 1.4. I will log version changes changes from now on.
The code is update in the first post of this thread.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rajat as guest
Guest





PostPosted: Mon Aug 07, 2006 4:36 pm    Post subject: Reply with quote

Hi toralf and others,
My computer's mainboard is gone for some repairs and I don't have any access to files on my HD and I'm using some other PC right now. I'll check out the recent changes soon.
Back to top
robiandi



Joined: 08 Aug 2006
Posts: 50

PostPosted: Thu Aug 10, 2006 4:27 am    Post subject: Reply with quote

Using the new command Gui +LabelMyGui of Autohotkey 1.0.44.09 you can now make Ini Edit Function resizable ( as in Ini File Creator )
see: robiandi Fri Aug 04, 2006 6:01 pm
Back to top
View user's profile Send private message
toralf



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

PostPosted: Thu Aug 10, 2006 5:27 am    Post subject: Reply with quote

Yes, I thought the same thing when I saw the new feature. Besides that I had already planes to do it with a workaround anyway. But I'm not sure if we can use another function (e.g. Anchor) inside the function; needs some testing.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rajat still as guest
Guest





PostPosted: Thu Aug 10, 2006 3:17 pm    Post subject: Reply with quote

toralf,
though late, I checked out the latest improvements by you and they look really nice. The 'hide' option is a good addition.
Back to top
Titan



Joined: 11 Aug 2004
Posts: 5107
Location: eth0 ::1

PostPosted: Thu Aug 10, 2006 3:39 pm    Post subject: Reply with quote

toralf wrote:
I'm not sure if we can use another function (e.g. Anchor) inside the function; needs some testing.
  • Include the Anchor function in the script (anywhere outside your function)
  • Add a GuiSize subroutine within your function
  • In this subroutine call the Anchor function for each control (or in one go dynamically) using your absolute control positions

Easy. I can do it if you would like me to Question
_________________

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
toralf



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

PostPosted: Fri Aug 11, 2006 4:11 am    Post subject: Reply with quote

Titan wrote:
I can do it if you would like me to :?:
Please do, but try it without including an extra function. I would appreciate to keep the included functions low.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Titan



Joined: 11 Aug 2004
Posts: 5107
Location: eth0 ::1

PostPosted: Fri Aug 11, 2006 8:47 pm    Post subject: Reply with quote

toralf wrote:
try it without including an extra function.
Without Anchor() it's a little more difficult but this is what I was quickly able to do:
Code:
   
    GuiSize:
    w := A_GuiWidth - 570
    h := A_GuiHeight - 400
    GuiControl, Move, SysTreeView321, % "h" . h + 242
    GuiControl, Move, Edit1, % "w" . w + 340
    GuiControl, Move, Edit2, % "w" . w + 340 . "h" h + 100
    GuiControl, MoveDraw, Button1, % "y" . h + 335
    GuiControl, MoveDraw, Button3, % "y" . h + 274
    GuiControl, MoveDraw, Button4, % "w" . w + 560 . "h" . h + 263
    Return

Add that just before the end of the function. You'll also need to add a Gui, +Resize of course. I noticed you hidden some controls so I couldn't check and add them. If you want increased flexibility you'll need to create a more resize-friendly GUI with relative positioning and the use of Anchor().
_________________

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
toralf



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

PostPosted: Sun Aug 13, 2006 2:34 pm    Post subject: Reply with quote

Have you tested it? I can't make it work. :| Could you please post a link to a working example?
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Titan



Joined: 11 Aug 2004
Posts: 5107
Location: eth0 ::1

PostPosted: Sun Aug 13, 2006 2:58 pm    Post subject: Reply with quote

toralf wrote:
Could you please post a link to a working example?
Sure, Func_IniSettingsEditor.ahk

Note: I used Anchor() because it made it a lot easier, if you still want I can do the traditional GuiControl moves. I didn't anchor the hidden controls becuase I couldn't see them to make judgements.
_________________

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
robiandi



Joined: 08 Aug 2006
Posts: 50

PostPosted: Mon Aug 14, 2006 11:29 am    Post subject: Reply with quote

toralf wrote
Quote:
Have you tested it? I can't make it work. Neutral Could you please post a link to a working example?
Titan wrote
Quote:
Sure, Func_IniSettingsEditor.ahk

I copied www.autohotkey.net/~Titan/dl/Func_IniSettingsEditor.ahk , inserted at the first line a call
Code:
IniSettingsEditor("IniSet", "test.ini", 0, 0)
and it worked Smile
Back to top
View user's profile Send private message
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Tue Aug 15, 2006 1:17 am    Post subject: Reply with quote

the function keeps updating the description even if the key/section isn't changed, so the control keeps blinking.

i changed
Code:
        ;set description
        GuiControl, , Edit2, % %CurrID%Des
        LastID = %CurrID%                   ;remember last key

to
Code:
        ;set description
      IfNotEqual, CurrID, %LastID%
           GuiControl, , Edit2, % %CurrID%Des
        LastID = %CurrID%                   ;remember last key

near line 300, which seems to fix it. i hope this doesn't have any side-effects. if found ok, i suggest updating the main release.
_________________
Back to top
View user's profile Send private message
toralf



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

PostPosted: Tue Aug 15, 2006 4:47 am    Post subject: Reply with quote

Will be in next release.
(The blinking isn't visible on my machine, but the extra line of code will do no harm)
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
toralf



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

PostPosted: Tue Aug 15, 2006 8:49 pm    Post subject: Reply with quote

A new version in first post. I have switched to integer numbers.
Quote:
; Version: 5
;
; changes since 1.4
; - Creator and Editor GUIs are resizeable (thanks Titan). The shortened Anchor function
; is added with a long name, to avoid nameing conflicts and avoid dependencies.
; - switched from 1.x version numbers to full integer version numbers
; - requires AHK version 1.0.44.09
; - fixed blinking of description field
; changes since 1.3:
; - added field option "Hidden" (thanks jballi)
; - simplified array naming
; - shorted the code
; changes since 1.2:
; - fixed a bug in the description (thanks jaballi and robiandi)
; changes since 1.1:
; - added statusbar (thanks rajat)
; - fixed a bug in Folder browsing
; changes since 1.0:
; - added default value (thanks rajat)
; - fixed error with DisableGui=1 but OwnedBy=0 (thanks kerry)
; - fixed some typos

_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Titan



Joined: 11 Aug 2004
Posts: 5107
Location: eth0 ::1

PostPosted: Tue Aug 15, 2006 9:08 pm    Post subject: Reply with quote

toralf wrote:
The shortened Anchor function is added with a long name, to avoid nameing conflicts and avoid dependencies.
Shortened? It looks exactly the same apart from the change in name Razz

A couple things:
  • You forgot to anchor the titles (I also forgot in my example):
    Code:
          GuiIniSettingsEditorAnchor("Static3", "w", true)
          GuiIniSettingsEditorAnchor("Static4", "w", true)

  • See Chris' minimum GUI size function - you can probabily extract the few lines of code instead of including the whole thing... I can do it if you want?

_________________

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