AutoHotkey Community

It is currently May 27th, 2012, 4:09 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: May 7th, 2011, 4:51 am 
I updated to latest version 1.1.0.0, and cannot work OK in my some hotkeys.

I reinstall the old version such as 1.0.97.2, is OK.

In the old(right) version, %ProgramFiles% represents the vaule "program files" in windows system, but the Ver. 1.1.0.0 change it with "programdata", therefore, press this hotkey, it pops up a error dialog.

thanks!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 7th, 2011, 11:44 am 
Offline

Joined: October 2nd, 2009, 12:43 pm
Posts: 283
Use A_ProgramFiles


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 7th, 2011, 2:29 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
I believe it was changed here:

Lexikos wrote:
2.0-a011-177f85e:

  • Removed ProgramFiles built-in variable (use A_ProgramFiles instead).
  • Renamed ComSpec built-in variable to A_ComSpec.
  • Changed Object.Insert(i,...) to return the number of items inserted. (It still returns an empty string on failure; i.e. when out of memory.)
  • Changed obj.func() to pass obj unconditionally as the first parameter.
  • Changed Object() and {} to avoid invoking __Set (when base is non-NULL).
  • Changed FileOpen to enable EOL translations by default when the Flags parameter is a string. Use "*" to disable EOL translations.
    Renamed FileRemoveDir to DirDelete and the other File*Dir commands to Dir*.
  • Added DirExist().
  • Changed short-circuit operators to yield more useful values. &&/||/and/or yields whichever operand determined the result, instead of a boolean value. So for example, ("" or "default") == "default".
  • Merged with v1.1, which includes a fix for the bug noee reported. (The actual cause was a class var declaration without any executable lines such as x:=y or MsgBox preceding the class definition.)

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 8th, 2011, 6:31 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Not quite. The merge was one-way, from v1.1 to v2.

Actually, I noticed this issue when I removed the "ProgramFiles" variable, but forgot that it also applied to v1.1. Obviously it's not an issue for v2. Part of this change is the cause:
Quote:
Fixed A_MyDocuments etc. to use SHGetFolderPath instead of undocumented registry keys.
It will be fixed. For now, just use A_ProgramFiles.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 8th, 2011, 3:53 pm 
Offline
User avatar

Joined: February 17th, 2011, 6:48 pm
Posts: 427
Location: peering out from behind my favorite rock
Lexikos wrote:
It will be fixed. For now, just use A_ProgramFiles.

After it's fixed, is there reason to use ProgramFiles rather than A_ProgramFiles? (Other than it's two less characters? ;) )


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 8th, 2011, 5:47 pm 
Offline

Joined: October 2nd, 2009, 12:43 pm
Posts: 283
Backward compatibility.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 9th, 2011, 8:01 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
There is no good reason to use ProgramFiles. "Backward compatibility" is the answer to a different question: What reason is there to support ProgramFiles in v1.1?


Report this post
Top
 Profile  
Reply with quote  
 Post subject: A_ProgramFiles_x86 ?
PostPosted: June 25th, 2011, 10:37 pm 
Offline

Joined: November 16th, 2004, 6:38 am
Posts: 153
Location: New York
Might be a good idea to provide the variable A_ProgramFiles_x86 or similar in AutoHotkey_L (would have the same value as A_ProgramFiles in the 32-bit version). The system variable "%ProgramFiles(x86)%" can't be used directly because AutoHotkey balks at the presence of the parentheses.

Jacques.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 26th, 2011, 11:27 am 
Offline

Joined: October 13th, 2009, 10:09 pm
Posts: 1389
Use it in an expression instead.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 30th, 2011, 4:02 am 
FYI, EnvGet can be used to retrieve ProgramFiles(x86).


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

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