AutoHotkey Community

It is currently May 27th, 2012, 9:27 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 146 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10  Next
Author Message
 Post subject:
PostPosted: August 15th, 2006, 9:17 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 15th, 2006, 9:55 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 16th, 2006, 10:18 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
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! ;)

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 16th, 2006, 10:45 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 16th, 2006, 10:51 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
yeah that checkbox sounds good. i shifted from editfields to dropdownlists for yes/no or 1/0 ... but checkbox is definitely better.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 23rd, 2006, 12:56 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 23rd, 2006, 4:11 pm 
will check it tonight!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 23rd, 2006, 8:04 pm 
toralf,
on your system, does the editor gui look normal once you minimize and restore it?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 23rd, 2006, 10:23 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 23rd, 2006, 11:54 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
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.

Image

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 24th, 2006, 8:02 am 
Offline

Joined: August 8th, 2006, 3:55 pm
Posts: 49
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. )


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 24th, 2006, 12:06 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 24th, 2006, 9:57 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
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.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 25th, 2006, 5:30 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject: DropDown Boxes
PostPosted: September 2nd, 2006, 4:13 pm 
Offline

Joined: July 15th, 2006, 7:36 pm
Posts: 31
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 146 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], nomissenrojb, SKAN, Stigg and 12 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group