Chris wrote:
This would make AutoHotkey heavily dependent on the registry...(though it's possible I'm misunderstanding your idea).
...it would use the registry if anything is there to read...it would...
- Read an "AutoHotkey.ini" file in the same directory the current exe's running from...or maybe: from the "working dir", then "exe dir".
- Failing that, it would read from the registry.
- Failing that, it could just fail or look in the working dir/exe dir for an Includes subdir...& use that...
...it's really a multi-level fail-safe...if you (the person writing a script) don't want to use the registry, for example on a usb-stick (portable) you are
expected to create an AutoHotkey.ini with the settings...but the fail-safe code could go as far as still trying to work when no settings are anywhere...by using hard coded defaults. Check this out...
Search for: Include*Dir
Display results as: Posts
Return first All available characters of posts
...I mentioned an IncludeDir setting 1st a year ago & people have been writing RegRead workarounds since a builtin don't exist...
Chris wrote:
In the future, there might be a standard library...
...which is exactly why I want AutoHotkey to support these settings...I need to use A_IncludesDir for my scripts that use my Base.ahi, currently I have no method to "find the users include dir" cuz AutoHotkey don't ship with one & if I just hard code a default based on A_AHKPath, people might not want their scripts/includes under the AutoHotkey Install dir...
Chris wrote:
However, the benefit/cost of any increased use of the registry seems low compared to other priorities like v2.
...I didn't say "NOW" I'm just saying I've been wanting this silently & now I'm posting it...if it's a good idea & you EVER want it, then fine...I could start writing it...
Chris wrote:
I'm generally against this because I think it's more complicated and less portable than it sounds.
...it may be more "complicated" the one time you or someone writes the code for it, but it's helpful to new users cuz the current first-use experience of "WTF? Yes/No what? What did I do? Is this AutoHotkey? A Yes/No box?"...no I don't expect people to run AutoHotkey.exe without a script
alot but EVERYONE does it to begin with...you download a new program & run it...it's how you test it/experience it...
Chris wrote:
I'm a strong proponent of "Keep It Simple Stupid" (KISS), and this seems to violate it.
...it might be non-KISS-able, but it's only a string of if-else's trying to find the settings...
Chris wrote:
On the other hand, if AutoHotkey were more ambitious in scope like PHP...
...huh?...does that mean if AutoHotkey had more users?...like PHP?
Chris wrote:
However, it would need its own section in the documentation...
...own section describing the settings searching algo?
Chris wrote:
...and that part of the help file...
...which part?
Chris wrote:
...is already so long than I think most readers lose interest long before reaching the bottom.
...I don't know if length is my problem with the help file, but it's the "conciseness" you've said you don't like to repeat information & the Gui section shows it...you mention at the top what the overall syntax for the Gui command is...
Gui, sub-command [, Param2, Param3, Param4]
...ok "Param2, Param3, Param4" isn't very helpful, but lets read on...
Add, ControlType [, Options, Text]
Show [, Options, Title]
...etc...
Hide / Minimize / Maximize / Restore
...by the time you get to the bottom you forget you need "Gui" in front of all those lines...I would repeat some info...like instead of the current sub-sections I would use...
Gui, Add, ControlType [, Options, Text]
Gui, Show [, Options, Title]
...etc...
Gui, [Hide | Minimize | Maximize | Restore]
...sometimes you do need to repeat...basically it's (currently) kinda like a book, rather than a quick reference...you are intended to read from top-to-bottom & not need reminded about "which sub-list are these options for? Param2? Param3? no wait sub-command?".
Chris wrote:
The benefit/cost of all these ideas seems low when you consider how many users intentionally launch AutoHotkey.exe without specifying a script.
...every new user does, at least once...until they "figure it out"..."oh what? I have to write a script? it's not magic? damn!".
Chris wrote:
In an ideal world, a better prompt with more choices would be great. But right now...
...no!...no but...a good idea is a good idea...people need ideas to know which code to help you on...I didn't write this page of ideas as a recipe for someone else to do...I intend on writing as much of it as I can figure out how...BUT...I have to read alot of your source code, so by the time I figure out WHAT to edit, you could be done with v2 & start on these ideas...you are already swimming, I haven't jumped in yet...neither have any other developers, for one there isn't a ticketed "todo" list so people that know how to code don't know what needs done...
Chris wrote:
...the development time seems like it would be better spent on something else.
...ok, what??? v2 is a blanket term for "your vision of a better AutoHotkey"...I can't help read your mind & apply the changes you haven't gotten to yet...I need a list to know what I could chime in on...
Chris wrote:
...but someone else would probably have to develop it for it to get done anytime soon.
...I'm here to at least start trying to help, I'm a long way off from actually compiling my own AutoHotkey, but I need some pointers to get started...I can't pay for MSVC, so when I get a compiler it's going to be MinGW...if AutoHotkey doesn't compile right away, I'll have to dig into the errors, then you'll have to apply those fixes to your code, hoping they don't give MSVC errors...or just drop payware & you use MinGW too...I'll never understand why an Open Source project uses a $500 compiler, but alot do...
Chris wrote:
The current sample script is hard-coded into the program, so making it into a longer script might increase code size more than it's worth. Also, the script can't be made external to the program without impacting portability.
...make the hard-coded script be...
Code:
MsgBox, 36, , Sample script not found, download it?
IfMsgBox, Yes
{
URLDownloadToFile, http://autohotkey.com/download/AutoHotkey.ahk, AutoHotkey.ahk
Run, edit AutoHotkey.ahk, , useerrorlevel
if (errorlevel)
Run, notepad AutoHotkey.ahk, , useerrorlevel
if (errorlevel)
msgbox, 16, , Error opening sample script in editor
}
Chris wrote:
Finally, I appreciate all the ideas.
...ok...
Chris wrote:
My reluctance to give them a high priority...
...no one said "high priority"...I need to know which ones I should try to work on...
Chris wrote:
If someone would like to design and develop a better behavior for AutoHotkey version 2...
...ok where do I begin...the v1 code? what do I do about the different compiler?
Chris wrote:
...especially if it abides by the KISS principle.
...I don't know about KISS...I code to handle every possibility I can think of...if a user could ever cause my logic to fail in some way, I code for it...
Chris wrote:
Refinements are welcome.
...well, technically I like my example message box more...other than the "GUI" languange it explains the situation more...& I want a help button...