 |
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: Tue Aug 15, 2006 9:17 pm Post subject: |
|
|
I didn't put the titles into it on purpose. Because I didn't thought it would be needed. Do you think it brings extra "beauty"?
Regarding Chris function: It is used in the Creator script. But it also applies to the Editor script, which I didn't expect. Do you know a way, to make it only work for a special GUI, e.g. the Creator script? Maybe the GUIID has to be checked in the WM_GETMINMAXINFO() function. If you know a better way to do it, I'm open. It would be great if the sized could be set independend of each GUI, maybe automatic initialized like your Anchor function. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Tue Aug 15, 2006 9:55 pm Post subject: |
|
|
I tried: | Code: | WM_GETMINMAXINFO(wParam, lParam) {
static pos
sig = `n%A_Gui%=
If !A_Gui
Return
If !InStr(pos, sig) {
WinGetPos, , , w, h
pos := pos . sig . w . "/" . h . "/"
}
StringTrimLeft, p, pos, InStr(pos, sig) - 1 + StrLen(sig)
StringSplit, p, p, /
c=24/28
Loop, Parse, c , /
InsertIntegerAtAddress(p%A_Index%, lParam, A_LoopField, 4)
Return 0
}
| but it doesn't work for the second (Editor) script, since it gets w and h as 0 when I press the Test button. :|
Any idea? _________________ Ciao
toralf  |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Wed Aug 16, 2006 10:18 pm Post subject: |
|
|
I recently added this function to another script of mine. due to its specific reqmts this didn't quite suffice... i needed uppercase chars only in the edit field and could only be max 8 in length.
at first i thought including support for these extra options would be nice ...but then most controls have there own set of options and adding separate support for each in the function and the editor isn't feasible.
so i did an open-ended solution... the function now supports any custom option that ahk understands (eg. Uppercase or Number for Edit controls)
try it here
toralf,
i've not changed the version info etc. and not touched the editor, which, by the way won't need any heavy updations, it just has to add one more edit field where one can put in custom options separated by spaces (just like in a script)
use this .ini for testing
| Code: | [section]
New Key 1=Rajat & toralf
;New Key 1 Type: Text
;New Key 1 Default:
;New Key 1 Options:
New Key 2=ABC
;New Key 2 Type: Text
;New Key 2 Options: Limit3 Uppercase
New Key 3=password
;New Key 3 Type: Text
;New Key 3 Options: +Password
|
Tip : the password option up there is just for demo... saving plain text password in a .ini isn't safe at all!  _________________
 |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Wed Aug 16, 2006 10:45 pm Post subject: |
|
|
Thanks Rajat,
I'll take a look. Great idea. Although I do not know where to put such a field in the editor but somewhere will be space.
I recently added a Checkbox key type, so that 1/0 can be easily saved. Version is in testing now. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Wed Aug 16, 2006 10:51 pm Post subject: |
|
|
yeah that checkbox sounds good. i shifted from editfields to dropdownlists for yes/no or 1/0 ... but checkbox is definitely better. _________________
 |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Wed Aug 23, 2006 12:56 pm Post subject: |
|
|
I updated the code in the first post to version 6:
| Quote: | ; changes since 5:
; - add key type "checkbox" with custom control name
; - added key field options (will only apply in Editor window)
; - whole sections can be set hidden
; - reorganized code in Editor and Creator
; - some fixes and adjustments
| Please test.
First I thought that the key field options would allow us to remove the Integer and Float type. But the options for Edit controls only offers "number" which is different from what's in the code, so I leave them. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
rajat as guest Guest
|
Posted: Wed Aug 23, 2006 4:11 pm Post subject: |
|
|
| will check it tonight! |
|
| Back to top |
|
 |
rajat as guest Guest
|
Posted: Wed Aug 23, 2006 8:04 pm Post subject: |
|
|
toralf,
on your system, does the editor gui look normal once you minimize and restore it? |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Wed Aug 23, 2006 10:23 pm Post subject: |
|
|
yes it does. Just double checked. What's up? What do i have to do to reproduce it?
I startet the creator, opened a ini file, opened (tested) the ini in the editor script. Both with and without Ownedby. Only without Ownedby minimize is possible. After restore the gui looks ok. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Wed Aug 23, 2006 11:54 pm Post subject: |
|
|
the screenshot shows 2 windows. they're the same window before and after minimizing. i didn't do any thing, just launched the editor, minimized and restore the window. checked on two systems.
 _________________
 |
|
| Back to top |
|
 |
robiandi
Joined: 08 Aug 2006 Posts: 50
|
Posted: Thu Aug 24, 2006 8:02 am Post subject: |
|
|
At line 75 you have to change | Code: | Gui, 1:Show, %GuiPos%, IniFileCreator %Version% - Create Ini file for IniSettingsEditor
Gui, 1:+LastFound +LabelGuiIniFileCreator
| by | Code: | Gui, +LabelGuiIniFileCreator
Gui, 1:Show, %GuiPos%, IniFileCreator %Version% - Create Ini file for IniSettingsEditor
Gui, 1:+LastFound |
This is for GuiIniFileCreatorAnchor getting "initialized"
(necessary only if minimizing before the first resizing,
i.e. it it is always safer to set Gui +LabelMyGui before Gui, Show.
Maybe a hint in AutoHotkey.chm would be appropriate. ) |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Thu Aug 24, 2006 12:06 pm Post subject: |
|
|
Thanks a lot to you both.
@Rajat: You are right. I could reproduce it. I got confused because you wrote about the editor, but call the function the editor while I call this code the creator. Maybe we should change the names to reflect more their purpose.
@robiandi: Thanks for the help. Very much appreaciated. It would have cost me an hour to figure that out. I moved the GuiLabel to line 41: | Code: | | Gui, 1:+Default +Resize +LabelGuiIniFileCreator | Which solves the problem as well. I'll update the code now without changing the version. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Thu Aug 24, 2006 9:57 pm Post subject: |
|
|
i recently used an application which had many settings to play around with but the best part was a little incremental search field where you type anything and only those items were left visible in the listbox which had the querry somewhere in their text. i really liked it.
maybe i'll add that feature sometime to this function... wouldn't require any change to the creator. _________________
 |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Fri Aug 25, 2006 5:30 pm Post subject: |
|
|
I have added some improvements to the Creator script. Thus it is now version 7 and the first post is updated.
| Quote: | changes since version 6
- possibility to copy a section with all its keys (checkbox in add gui)
- a section or key can be moved up/down in its siblings in the tree
- for integer key type nothing and integer numbers are allowed as value
- for float key type nothing, a dot ("."), integer and float numbers are allowed as value
- improved speed of reading and writing ini files (and thus also to open the test gui)
|
_________________ Ciao
toralf  |
|
| Back to top |
|
 |
userabuser
Joined: 15 Jul 2006 Posts: 29
|
Posted: Sat Sep 02, 2006 4:13 pm Post subject: DropDown Boxes |
|
|
I've a 2 questions on the Dropdown boxes.
1. What format to put the List of Choices in? Comma separated does not seem to work.
2. What is the "Field Options" box for?
I appologize in advance if these are stupid questions. |
|
| 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
|