AutoHotkey Community

It is currently May 24th, 2012, 5:46 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: February 9th, 2007, 3:38 am 
When downloading zip Version 1.0.46.08 I have noticed it does not make an ini file as before. Instead it creates a ahk file in My Documents. This affects portability when running from a network drive or USB key.

My current workaround is to manually make an ini file in the same folder.

Thanks, Eric (Keybored)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 9th, 2007, 9:54 am 
Can you provide more info on how this affects portability? What are the use cases?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 9th, 2007, 3:14 pm 
Offline

Joined: June 26th, 2006, 6:14 pm
Posts: 1379
Location: USA
@Grumpy.....Previously AHK would create the ini in the directory which ahk was in. Now it will create the file in the My documents folder. I can see where this could be a problem in situations where users can not or should not save files to the hard drive. I use ahk from a flash drive at work and do not particularly want files with funny file extentions floating around...Just something else for someone to ask questions about...

I would like to request that the ahk file be created in the application directory and not in the my documents folder.

Of course I do understand that this is only an issue when ahk is ran directly (without a script being called)...I do do that on occasion to have the help & ASW handy....


Report this post
Top
 Profile  
Reply with quote  
 Post subject: clarification
PostPosted: February 9th, 2007, 9:27 pm 
Grumpy thanks for the question.
When you unzip to a USB drive
Edit your auhothotkey from tray
Unplug and move to a new pc
None of your edits are available. Definite portability problem if it goes unnoticed by the user.

Another consequence is when upgrading my sister was confused because she was only aware of the ini type file. I have brought her up to speed on the change.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 9th, 2007, 11:47 pm 
Offline

Joined: June 6th, 2006, 3:19 pm
Posts: 1654
Location: Denmark
Quote:
upgrading my sister


... to sister2.0?

_________________
RegEx Powered Dynamic Hotstrings
COM
AutoHotkey 2


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 10th, 2007, 12:39 am 
Quote:
I have brought her up to speed
:lol:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 10th, 2007, 12:41 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
This change was made primarily because it's more compatible with Windows Vista. In addition, I think My Documents is a more useful default for most people.

If anyone can think of another approach that has a better cost/benefit for the general public, please post here. Also, if there's any other reason this is being reported as a bug (i.e. something that should be fixed), please let me know.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: To run or not to run?
PostPosted: February 10th, 2007, 1:39 pm 
Offline

Joined: June 18th, 2006, 8:47 am
Posts: 346
Location: Phoenix, AZ
I agree let's see what others think. Is this important to other people?

The reason I thought it should change is other sites are referring to the portability and ability to run from USB. Just unzip and run.

To run or not to run?
Currently when running AHK the first time it gives you the choice of creating the file in the My Document folder. When you choose not to it fails to work.

Perhaps changing the prompt to include 2 radio button to select where?


Last edited by keybored on February 10th, 2007, 1:42 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
PostPosted: February 10th, 2007, 1:42 pm 
Offline

Joined: June 18th, 2006, 8:47 am
Posts: 346
Location: Phoenix, AZ
tonne
Quote:
... to sister2.0?

My Sister will be glad to know she has been upgraded to Sister 2.0 all thanks to a punctuation error on my part.

Sister 2.0 Now compatible with AutoHotKey.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: February 10th, 2007, 2:26 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
keybored wrote:
Currently when running AHK the first time it gives you the choice of creating the file in the My Document folder. When you choose not to it fails to work.
This "default script" behavior was originally added just to make things easier for those who hadn't read the Quick-start Tutorial. I'd never envisioned that anyone would run AutoHotkey.exe directly just to get access to the tray menu of the sample script.

So assuming that most people who double-click AutoHotkey.exe are new users, creating the sample script in My Documents seems superior because the file is more easily found and edited. Furthermore, Windows Vista doesn't allow a program to create a publicly-accessible script in the Program Files directory. Instead, such a script would become private to the program, which would make it difficult to edit.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: February 10th, 2007, 5:56 pm 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2537
Chris wrote:
So assuming that most people who double-click AutoHotkey.exe are new users, creating the sample script in My Documents seems superior because the file is more easily found and edited. Furthermore, Windows Vista doesn't allow a program to create a publicly-accessible script in the Program Files directory. Instead, such a script would become private to the program, which would make it difficult to edit.
While I understand that the change was made mainly for Windows Vista users (I run AHK on Vista also), I also disagree with saving to the the Documents folder by default. A better approach might be to:

- Check whether an .ini file exists in the program directory first then detect whether the user is using Vista

- If the user is using Vista, the .ini file doesn't exist in the application's directory, and AHK is being run from the default Program Files directory then prompt whether to create the file in the documents directory or whether to attempt to create it in AHK's directory. If AHK isn't run from the Program Files location then it doesn't make much of a difference and the previous method of saving in AHK's directory should likely be used for the reasons mentioned above.

You may not be aware but it is possible for an application to create files in the Program Files directory in Vista if the application is "run as administrator".


Report this post
Top
 Profile  
Reply with quote  
PostPosted: February 11th, 2007, 1:30 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
corrupt wrote:
A better approach might be to:
- Check whether an .ini file exists in the program directory first
For backward compatibility, it does indeed check for AutoHotkey.ini in the current directory, and runs it if found.

corrupt wrote:
...then detect whether the user is using Vista
It might be best to have consistent behavior across all OSes:
1) Dual-boot systems would otherwise experience results that differ depending on OS.
2) The rules are simpler and easier to remember.
3) Vista will gradually begin crowding out XP systems, just as XP crowded out Win9x and 2000. So it might be best to get people used to the current behavior in case they later upgrade to Vista. Otherwise, upon upgrading the behavior would suddenly change, which might be counterintuitive.

corrupt wrote:
You may not be aware but it is possible for an application to create files in the Program Files directory in Vista if the application is "run as administrator".
Yes, though I don't see how it directly helps.

corrupt wrote:
I also disagree with saving to the the Documents folder by default.
But no particular reasons beyond those already mentioned?

If you or anyone still thinks some other method is better for the general public, please give details explaining why.

Thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 11th, 2007, 5:53 am 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2537
I guess what I'm saying is that I'd prefer to be prompted to optionally save in the Documents directory only if saving in the current directory is not possible. It's probably more a matter of personal taste though and I'll likely have to comply with Vista's methods eventually. I like to keep my egss in their own baskets whenever possible. I tend to store only documents in document folders and they are usually in descriptive folders within the Document directory. To be fair though, this change doesn't have much an effect for me as I don't usually intentionally run AHK without any params.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 11th, 2007, 11:37 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Perhaps AHK should drop the idea of creating a file by itself when run without parameter. This way, no question asked, or perhaps, if user agree, open the help at the tutorial section. Otherwise, it can just execute a default script with only one instruction: #Persistent, providing access to help and window spy.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 11th, 2007, 1:13 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
It's a good alternative, but the sample-script method might be more valuable (assuming the user can get past the confusion of the Yes/No dialog). This is because the user gets to see an actual script, and they can see that it's a plain text file, etc. Furthermore, the user can easily learn-by-example from the sample script and then make more hotkeys via the Run command, which would avoid the need for them to read the Quick-start Tutorial.

I know what it's like trying new software, especially how frustrating it can be when you can't get up and running quickly. I think the sample script is good because it allows users to get up and running with some basic hotkeys in only 5 minutes.

Contrary opinions are welcome.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 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