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
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Tue Aug 01, 2006 9:53 pm    Post subject: Reply with quote

toralf,
I've been using this function into some apps and noticed that the texts like 'Type: DropDown Yes|No' in the description window doesn't look good... though showing something like 'Default: Yes' is useful.

so i suggest removing 'Type....' text from what's shown to user... what do u think?
_________________
Back to top
View user's profile Send private message
toralf



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

PostPosted: Tue Aug 01, 2006 10:48 pm    Post subject: Reply with quote

Rajat wrote:
i suggest removing 'Type....' text from what's shown to user... what do u think?
I guess it doesn't hurt to remove it for the dropdown, since the user has no chance to put data into the field himself. Same might be true for datetime. These two types happen to be the only one with format/choice anyway. For the other the field types I think the info on the type gives help to the user on what to put into the edit control.

Do you think it would help usabilty to remove the type description for those two types only? Or would you want to remove all?
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Tue Aug 01, 2006 11:13 pm    Post subject: Reply with quote

i think i'd go with hiding that completely... if for some key the 'type' info is needed, it still can be added just like the normal description.
_________________
Back to top
View user's profile Send private message
jballi



Joined: 01 Oct 2005
Posts: 346
Location: Texas, USA

PostPosted: Tue Aug 01, 2006 11:18 pm    Post subject: Reply with quote

On the topic of types, a couple of additional types might be of value. They may or may not interest you. They are not "types" of the traditional sense, but they do fit into the syntax.

    ReadOnly. This "type" lets the user see the variable and the value, but is not allowed to change it.

    Hide. This "type" would hide (drop) the variable from the list entirely. This would be useful for variables that for whatever reason, you don't want to be seen or edited. I can see using this type to limit the number of configuration variables that can be edited to the basic minimum.

Them be my thoughts...
Back to top
View user's profile Send private message
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Tue Aug 01, 2006 11:26 pm    Post subject: Reply with quote

jballi, i can see that they might be important in certain specific reqmts... also they aren't too far off from what's the function already doing... i guess they can be added.
but you must remember that a user can still very easily edit the .ini file.
_________________
Back to top
View user's profile Send private message
Kerry



Joined: 20 Jul 2006
Posts: 146
Location: Los Angeles

PostPosted: Wed Aug 02, 2006 12:10 am    Post subject: Reply with quote

Hi Rajat - just wondering if you ever looked at the updated code (without that other code error). I can repost it if you like (note that I updated the code in the next post, not the same link).

here's the link: http://kerjo.freehostia.com/editor.txt

-Kerry
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Wed Aug 02, 2006 12:57 am    Post subject: Reply with quote

actually Kerry i got busy with some other things and haven't worked on this function since some time... i guess the last thing i did was to add that li'l statusbar... also, i don't know if i'm allowed to divulge this, but toralf has told me that he'll be working on your request if it can be added to the code without much hassle.
_________________
Back to top
View user's profile Send private message
Kerry



Joined: 20 Jul 2006
Posts: 146
Location: Los Angeles

PostPosted: Wed Aug 02, 2006 4:56 am    Post subject: Reply with quote

ok, I can show him the specific code changes if need be (quite small).
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
toralf



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

PostPosted: Wed Aug 02, 2006 6:09 am    Post subject: Reply with quote

Kerry wrote:
ok, I can show him the specific code changes if need be (quite small).
I'll work on it in the next 10 days (I'm on business trip and will find some time in the hotels. :) You do not need to show me the differences, I can just make a diff on your and my code.

@Jballi:
I see the advantage of "Hide", e.g. for GUI positions or remembering status between runs. I'll add this type.
As for the "ReadOnly" I do not see any use. Can someone please tell me an example that would benefit from it?
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Kerry



Joined: 20 Jul 2006
Posts: 146
Location: Los Angeles

PostPosted: Thu Aug 03, 2006 7:57 am    Post subject: Reply with quote

another quick thing, I was wondering if you could make the region uneditable when you choose something like "folder" - simply because if someone mistypes it can throw a whole program off, so if they have to browse to change you're all good
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
toralf as guest
Guest





PostPosted: Thu Aug 03, 2006 12:01 pm    Post subject: Reply with quote

Hi Kerry,
I made them editable on purpose. Some users like to type the path manually. The browse button is only made for convienence of the lazy. Smile But I could add an local variable that if set by the user will make them readonly. I don't think it is worth it to put it in the argument list of the function.

Regrading the area idea: I looked at your code. Thanks for providing it. It would work, but I will have problems to support this in the ini file creator. And considering the low benefit for most users and cases, I will not put it in the code. I assume that a "[area - section]" section name will just do as well without having the area as an extra node in the tree. If you think differently I'm still open for discussion.

PS: New version with "Hidden" option for all keys is comming up soon.

ciao
toralf
Back to top
Kerry



Joined: 20 Jul 2006
Posts: 146
Location: Los Angeles

PostPosted: Thu Aug 03, 2006 8:55 pm    Post subject: Reply with quote

Ok, that's fine. I do see your point, and don't know how many people would use it besides me (it is absolutely necessary for me), but I can just reimplement my code in later versions Smile. I might try to edit your Ini Creator when it's got a reasonably done state for the same purpose (is it there already?)

-Kerry
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
toralf



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

PostPosted: Fri Aug 04, 2006 1:25 am    Post subject: Reply with quote

Updated the code in the first post:

; changes since 1.3:
; - added field option "Hidden" (thanks jballi)
; - simplified array naming
; - shorted the code

The IniFileCreator is updated as well.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
robiandi
Guest





PostPosted: Fri Aug 04, 2006 6:01 pm    Post subject: Reply with quote

@toralf: To make in your excellent script IniFileCreator Version 0.4 the GUI resizable, could you please give the following a try:
After line 32 add gui, 1:+resize
Code:
BuildGui:
  ;create GUI
  gui, 1:+resize
At the end of the script add
Code:
 GuiSize:
 ifgreater a_guiwidth ,700,winmove,A,,,,700
 ifless    a_guiwidth ,570,winmove,A,,,,570
 Anchor("SysTreeView321"    ,0  ,0  ,180,240) ;SysTreeView321
 Anchor("Button3"           ,0  ,327,0  ,0  ) ;Button3
 Anchor("EdtName"           ,0  ,327,145,0  ) ;Edit1
 Anchor("BtnRemove"         ,181,327,0  ,0  ) ;Button4
 Anchor("DdlKeyType"        ,215,0  ,0  ,0  ) ;ComboBox1
 Anchor("EdtKeyFormat"      ,300,0  ,0  ,0  ) ;Edit2
 Anchor("EdtKeyValue"       ,215,0  ,0  ,0  ) ;Edit3
 Anchor("ChkKeyDefault"     ,255,0  ,0  ,0  ) ;Button5
 Anchor("ChkKeyHidden"      ,350,0  ,0  ,0  ) ;Button6
 Anchor("BtnBrowseKeyValue" ,505,0  ,0  ,0  ) ;Button7
 Anchor("DatKeyValue"       ,215,0  ,0  ,0  ) ;SysDateTimePick321
 Anchor("HotKeyValue"       ,215,0  ,0  ,0  ) ;msctls_Hotkey321
 Anchor("DdlKeyValue"       ,215,0  ,0  ,0  ) ;ComboBox2
 Anchor("EdtKeyDes"         ,215,0  ,0  ,0  ) ;Edit4
 Anchor("EdtIniFile"        ,265,0  ,0  ,0  ) ;Edit5
 Anchor("Button8"           ,535,0  ,0  ,0  ) ;Button8
 Anchor("BtnSaveToFile"     ,290,360,0  ,0  ) ;Button9
 Anchor("BtnTestIni"        ,150,360,0  ,0  ) ;Button10
 Anchor("Button11"          ,0  ,0  ,560,305) ;Button11
 Anchor("Static1"           ,215,0  ,0  ,0  ) ;Static1
 Anchor("Static2"           ,300,0  ,0  ,0  ) ;Static2
 Anchor("Static3"           ,215,0  ,0  ,0  ) ;Static3
 Anchor("Static4"           ,215,0  ,0  ,0  ) ;Static4
 Anchor("Static5"           ,215,0  ,0  ,0  ) ;Static5
 return
Anchor(Control, x=0, y=0, w=0, h=0)  ; by Titan, slightly modified by robiandi
 {
  static Wid, Hei, co
  ifequal co
   {
   Wid:=a_guiwidth
   Hei:=a_guiheight
   co = IWasHere
   }
  guiwidth:= a_guiwidth
  ifgreater a_guiwidth ,700,setenv,guiwidth,700
  ifless    a_guiwidth ,570,setenv,guiwidth,570
  Ifnotequal x,0, GuiControl, Move, % Control, % "x" x+(GuiWidth -Wid)
  Ifnotequal y,0, GuiControl, Move, % Control, % "y" y+(A_GuiHeight-Hei)
  Ifnotequal w,0, GuiControl, Move, % Control, % "w" w+(GuiWidth -Wid)
  Ifnotequal h,0, GuiControl, Move, % Control, % "h" h+(A_GuiHeight-Hei)
 }

Back to top
holomind



Joined: 11 Mar 2006
Posts: 300
Location: Munich, Germany

PostPosted: Sat Aug 05, 2006 12:34 pm    Post subject: Reply with quote

Wow, looks great. i thought of the same idea, and now i only have to copy and paste it into my own ahk-script. this forum is cool Wink
will be using it in my scripts to make i *much* more userfriendly to configure.

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.


A little bit offtopic, but perhaps interesting for others (and me) how to make ahk-scripts better configurable.

one should also separate hotkey-definition and function like following.


F10 / F11 would come from configuration.

Pseudocode
Code:

hotkey F10 , MyFunction1
hotkey F11 , MyFunction2

;or  in a loop for each hotkey defined in config?
hotkey %config_hotkey_for_1% , %config_function_for_1%

...
MyFunction1:
   ; execute things for F10 (or whatever key is defined)
   ...
Return

MyFunction2:
  ...
Return


i think this style of code is very good to read and maintain. better than asigning the hotkey at the function. (which is shorter but harder to maintain/configure)
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 6 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