| View previous topic :: View next topic |
| Author |
Message |
Andreas Borutta as Guest Guest
|
Posted: Wed Sep 14, 2005 11:02 am Post subject: New default: "application data" for ini file and s |
|
|
| Comment from moderator: See next post. |
|
| Back to top |
|
 |
Andreas Borutta
Joined: 23 Jan 2005 Posts: 47
|
Posted: Wed Sep 14, 2005 11:04 am Post subject: |
|
|
Hi,
I suggest a new default for autohotkey.
The default is typical for many other applications and should make it easier for users to activate new scripts.
What do I suggest?
When AHK is installed, a directory will be created:
| Code: | | %AppData%\Autohotkey\ |
In Windows XP this could be for example:
| Code: | | C:\Documents and Settings\[User Name]\Application Data\Autohotkey\ |
This profile will contain all user-specific files. For example:
The INI file and all scripts which should be aktivated automatically when AHK is started.
Of course the neccessary code inside the ini file then should exist.
All what a new user has to do, when he likes to add a script, which he wants to be automatically activated, is: paste it into his autohotkey profile
My motivation:
I wish that the great benefits of AHK will reach as much "normal users" as possible - without disadvantages for more experienced users.
What do you think about this suggestion? _________________ Andreas
http://borumat.de/autohotkey-autotexte-und-makros-tipps (german)
http://borumat.de/thunderbird-email-tipps (german)
http://borumat.de/firefox-browser-tipps (german) |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Wed Sep 14, 2005 4:33 pm Post subject: |
|
|
I realize the AutoHotkey.ini file isn't multiuser friendly. But due to simplicity and more importantly backward compatibility, perhaps it should be retained.
I might be failing to see the full benefit of an approach such as "[User Name]\Application Data". I don't see how it helps the typical user very much. Therefore, I'd welcome comments from anyone about the specific benefits and about how the new default would work. |
|
| Back to top |
|
 |
Andreas Borutta
Joined: 23 Jan 2005 Posts: 47
|
Posted: Wed Sep 14, 2005 5:23 pm Post subject: |
|
|
My motive is not the benefit for a group of users, which use one computer.
My motive is a classical one from the usability:
Welcome the user with concepts they know. Don't surprise them.
The most applications store there options in the path "... \application data\[application name]\".
This makes it easy to keep the overview, it makes it easy to backup your system.
But I do not know anything of the complexity, which is may be neccessary to implement all these stuff to provide profiles (like in firefox or thunderbird for example).
A profile manager will be neccessary etc.
But I could concentrate my suggestion on my main issue:
The ease of adding a new script for an unexperienced user.
New suggestion:
almost everything keeps as it is now. Only a subdirectory "autostart-scripts" will be created, when autohotkey is installed.
And the ini file will contain the appropriate code to activate all scripts which nest inside this subdirectory.
BTW: I tried to create the appropriate code in the ini file on my own, until now without success. If someone likes to give me a hint, that would be nice.
My scripts:
E:\autohotkey-autostart-scripts\
Path for application and ini file:
D:\autohotkey\autohotkey.exe
D:\autohotkey\autohotkey.ini
My try in the ini file:
Loop, autohotkey\*.ahk run, E:\autohotkey\ _________________ Andreas
http://borumat.de/autohotkey-autotexte-und-makros-tipps (german)
http://borumat.de/thunderbird-email-tipps (german)
http://borumat.de/firefox-browser-tipps (german) |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Fri Sep 16, 2005 1:20 am Post subject: |
|
|
To launch a series of scripts, you could do:
| Code: | Loop C:\My Autostart Scripts\*.ahk
Run %A_LoopFileFullPath% | Thanks for posting your ideas. |
|
| Back to top |
|
 |
Andreas Borutta
Joined: 23 Jan 2005 Posts: 47
|
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Fri Sep 16, 2005 1:08 pm Post subject: |
|
|
| Andreas Borutta wrote: | | When the directory "My autostart scripts" is in the same path as "autohotkey.exe", is it possible to use a relative path then? |
Yes, since AutoHotkey.exe is the same folder as AutoHotkey.ini, you could do:
| Code: | Loop %A_ScriptDir%\My Autostart Scripts\*.ahk
Run %A_LoopFileFullPath% |
|
|
| Back to top |
|
 |
Andreas Borutta
Joined: 23 Jan 2005 Posts: 47
|
Posted: Mon Sep 19, 2005 5:28 pm Post subject: |
|
|
| Chris wrote: | | Code: | Loop %A_ScriptDir%\My Autostart Scripts\*.ahk
Run %A_LoopFileFullPath% |
|
Very nice. Thank you. I will add this into my tip-collection.
What do you think about this behaviour as default for a fresh AHK installation, which contains a subdirectory "automatically actived scripts" and a the following default code in the autohotkey.ini?
| Code: | ; activates all scripts inside the sub-directory "automatically activated scripts"
; the sub-directory has to exist in the same directory as "autohotkey.exe"
Loop %A_ScriptDir%\automatically activated scripts\*.ahk
run %A_LoopFileFullPath% |
_________________ Andreas
http://borumat.de/autohotkey-autotexte-und-makros-tipps (german)
http://borumat.de/thunderbird-email-tipps (german)
http://borumat.de/firefox-browser-tipps (german)
Last edited by Andreas Borutta on Tue Sep 20, 2005 6:14 am; edited 2 times in total |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Tue Sep 20, 2005 2:14 am Post subject: |
|
|
I don't think most beginners keep multiple scripts running all the time. Even if they do, encouraging that would probably be sending the wrong message because it's not memory efficient.
Also, the built-in OS mechnism (Start Menu's Startup folder) would probably be a more appropriate way to launch scripts. By contrast, the INI file is intended only as a quick way to get started with simple hotkeys and macros.
I realize that AutoHotkey isn't as accessible as it could be to those who have few computer skills. I'm just not sure that expanding the scope of the INI file is an appropriate way to make the program easier to use. |
|
| Back to top |
|
 |
Andreas Borutta
Joined: 23 Jan 2005 Posts: 47
|
|
| Back to top |
|
 |
dserodio
Joined: 08 May 2006 Posts: 1
|
Posted: Mon May 08, 2006 8:16 pm Post subject: More "non-Administrator-friendly" |
|
|
Storing configuration under %AppData% would make it easier for non-Administrator (limited account) users to edit their AutoHotkey settings. On a typical corporate PC, users are not allowed to change files under %ProgramFiles%.
It also makes it easier for users to backup their files. I have just switched computers, and I almost "lost" my autohotkey.ini because I had only backed up my %AppData% folder. Lucky for me, my former computer hadn't been formatted yet when I missed my autohotkey.ini so I was able to restore it. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Tue May 09, 2006 12:00 am Post subject: |
|
|
That's a good point. I've made a note to look into ways of having a new default script location without breaking things for existing users who already have an INI file in AutoHotkey.exe's startup directory (typically ProgramFiles).
Thanks. |
|
| Back to top |
|
 |
corrupt
Joined: 29 Dec 2004 Posts: 2397
|
Posted: Tue May 09, 2006 3:55 am Post subject: Re: More "non-Administrator-friendly" |
|
|
| dserodio wrote: | Storing configuration under %AppData% would make it easier for non-Administrator (limited account) users to edit their AutoHotkey settings. On a typical corporate PC, users are not allowed to change files under %ProgramFiles%.
It also makes it easier for users to backup their files. I have just switched computers, and I almost "lost" my autohotkey.ini because I had only backed up my %AppData% folder. Lucky for me, my former computer hadn't been formatted yet when I missed my autohotkey.ini so I was able to restore it. |
You could always create a new directory in a location of your choice and add a single line in the .ini file to run a script in that directory. The script that launches could then launch any/all the other scripts that you want to run. That way you would only have to replace one line in the .ini file if you had to completely reinstall. You could also backup the .ini file to a different directory that you know will be backed up.
You could also place a script in your startup folder that launches other scripts when you login. or in the registry, etc...
I'm not sure I understand the importance of putting the .ini file in another location as the.ini file doesn't serve much of a purpose as far as I remember. It just runs the code in the .ini file if AutoHotkey.exe is run without any params doesn't it? No special configuration settings that affect other scripts?... Maybe there's a reason that I'm not understanding for a typical user to use the .ini file. I find it just as easy and more flexible to start a script by double-clicking it or by using a shortcut... |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Tue May 09, 2006 4:14 am Post subject: |
|
|
That about sums it up. I think a lot of people wind up using an INI file because after downloading the program, they launch AutoHotkey.exe without reading the tutorial. This creates a sample AutoHotkey.ini file to help them get started.
Of course, you could argue that anyone who installs AutoHotkey in the Program Files folder also has write-access to that folder by definition. So the issue of write-permission probably doesn't come up too often for typical users. |
|
| Back to top |
|
 |
|