AutoHotkey Community

It is currently May 27th, 2012, 8:57 am

All times are UTC [ DST ]




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

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

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 1st, 2006, 10:48 pm 
Offline

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 1st, 2006, 11:13 pm 
Offline

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

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 1st, 2006, 11:18 pm 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
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...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 1st, 2006, 11:26 pm 
Offline

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

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2006, 12:10 am 
Offline

Joined: July 20th, 2006, 6:41 pm
Posts: 144
Location: Los Angeles
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2006, 12:57 am 
Offline

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

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2006, 4:56 am 
Offline

Joined: July 20th, 2006, 6:41 pm
Posts: 144
Location: Los Angeles
ok, I can show him the specific code changes if need be (quite small).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2006, 6:09 am 
Offline

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2006, 7:57 am 
Offline

Joined: July 20th, 2006, 6:41 pm
Posts: 144
Location: Los Angeles
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2006, 12:01 pm 
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. :) 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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2006, 8:55 pm 
Offline

Joined: July 20th, 2006, 6:41 pm
Posts: 144
Location: Los Angeles
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 :). 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


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

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 4th, 2006, 6:01 pm 
@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)
 }



Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 5th, 2006, 12:34 pm 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
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 ;)
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)


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], IsNull, Xx7 and 10 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