 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Mon Aug 07, 2006 8:16 am Post subject: |
|
|
| 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 |
|
 |
rajat as guest Guest
|
Posted: Mon Aug 07, 2006 4:36 pm Post subject: |
|
|
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
|
Posted: Thu Aug 10, 2006 4:27 am Post subject: |
|
|
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 |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Thu Aug 10, 2006 5:27 am Post subject: |
|
|
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 |
|
 |
rajat still as guest Guest
|
Posted: Thu Aug 10, 2006 3:17 pm Post subject: |
|
|
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
|
Posted: Thu Aug 10, 2006 3:39 pm Post subject: |
|
|
| 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  _________________
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 |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Fri Aug 11, 2006 4:11 am Post subject: |
|
|
| 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 |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5107 Location: eth0 ::1
|
Posted: Fri Aug 11, 2006 8:47 pm Post subject: |
|
|
| 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 |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Sun Aug 13, 2006 2:34 pm Post subject: |
|
|
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 |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5107 Location: eth0 ::1
|
Posted: Sun Aug 13, 2006 2:58 pm Post subject: |
|
|
| 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 |
|
 |
robiandi
Joined: 08 Aug 2006 Posts: 50
|
Posted: Mon Aug 14, 2006 11:29 am Post subject: |
|
|
toralf wrote | Quote: | Have you tested it? I can't make it work. 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  |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Tue Aug 15, 2006 1:17 am Post subject: |
|
|
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 |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Tue Aug 15, 2006 4:47 am Post subject: |
|
|
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 |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Tue Aug 15, 2006 8:49 pm Post subject: |
|
|
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 |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5107 Location: eth0 ::1
|
Posted: Tue Aug 15, 2006 9:08 pm Post subject: |
|
|
| 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
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 |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|