AutoHotkey Community

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

All times are UTC [ DST ]




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

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 7th, 2006, 4:36 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 10th, 2006, 4:27 am 
Offline

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 10th, 2006, 5:27 am 
Offline

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 10th, 2006, 3:17 pm 
toralf,
though late, I checked out the latest improvements by you and they look really nice. The 'hide' option is a good addition.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 10th, 2006, 3:39 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
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 :?:

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 11th, 2006, 4:11 am 
Offline

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 11th, 2006, 8:47 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
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().

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 13th, 2006, 2:34 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Have you tested it? I can't make it work. :| Could you please post a link to a working example?

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 13th, 2006, 2:58 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
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.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 14th, 2006, 11:29 am 
Offline

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 15th, 2006, 1:17 am 
Offline

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

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 15th, 2006, 4:47 am 
Offline

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


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

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


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

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
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 :P

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?

_________________
GitHubScriptsIronAHK Contact by email not private message.


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 ... 4, 5, 6, 7, 8, 9, 10  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: SKAN, Stigg and 8 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