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 

No INI causes portability problem
Goto page 1, 2  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
Keybored as guest
Guest





PostPosted: Fri Feb 09, 2007 3:38 am    Post subject: No INI causes portability problem Reply with quote

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)
Back to top
Grumpy
Guest





PostPosted: Fri Feb 09, 2007 9:54 am    Post subject: Reply with quote

Can you provide more info on how this affects portability? What are the use cases?
Back to top
ahklerner



Joined: 26 Jun 2006
Posts: 1202
Location: USA

PostPosted: Fri Feb 09, 2007 3:14 pm    Post subject: Reply with quote

@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....
Back to top
View user's profile Send private message
Keybored as guest
Guest





PostPosted: Fri Feb 09, 2007 9:27 pm    Post subject: clarification Reply with quote

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.
Back to top
tonne



Joined: 06 Jun 2006
Posts: 1158
Location: Denmark

PostPosted: Fri Feb 09, 2007 11:47 pm    Post subject: Reply with quote

Quote:
upgrading my sister


... to sister2.0?
_________________
there's a dog barking close within the range of my ear
sounds like he wants to escape the chain
he would probably bite me to death if he could
but the chain lets me spit in his face

- Kashmir
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Sat Feb 10, 2007 12:39 am    Post subject: Reply with quote

Quote:
I have brought her up to speed
Laughing
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sat Feb 10, 2007 12:41 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
keybored



Joined: 18 Jun 2006
Posts: 89
Location: Phoenix, AZ

PostPosted: Sat Feb 10, 2007 1:39 pm    Post subject: To run or not to run? Reply with quote

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 Sat Feb 10, 2007 1:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
keybored



Joined: 18 Jun 2006
Posts: 89
Location: Phoenix, AZ

PostPosted: Sat Feb 10, 2007 1:42 pm    Post subject: Sister 2.0 Now compatible with AutoHotKey Reply with quote

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.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sat Feb 10, 2007 2:26 pm    Post subject: Re: To run or not to run? Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
corrupt



Joined: 29 Dec 2004
Posts: 2393

PostPosted: Sat Feb 10, 2007 5:56 pm    Post subject: Re: To run or not to run? Reply with quote

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".
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sun Feb 11, 2007 1:30 am    Post subject: Re: To run or not to run? Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
corrupt



Joined: 29 Dec 2004
Posts: 2393

PostPosted: Sun Feb 11, 2007 5:53 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Sun Feb 11, 2007 11:37 am    Post subject: Reply with quote

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.
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sun Feb 11, 2007 1:13 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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