Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

v1.0.42 released: Better context-sensitive hotkeys


  • Please log in to reply
27 replies to this topic
Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.42.01:

Fixed the following variables to work correctly when concatenated onto other strings: A_DetectHiddenWindows, A_DetectHiddenText, A_AutoTrim, and A_StringCaseSense. [thanks jballi]

Fixed KeyWait and GetKeyState in the subroutines of hook hotkeys (broken by 1.0.39) [thanks Laszlo & TobStro]. For example:
~LControl::
if not GetKeyState("LControl")
	ToolTip LControl is not down as expected (this bug affected some systems but not others).
return


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.42.02:

Fixed UpDown controls to snap onto the right control when inside a Tab control that contains a ListView. [thanks Thalon]

Improved the Hotkey command with an "Off" option (typically used to create a hotkey in an initially-disabled state).

Improved A_Cursor not to interfere with double-clicking. [thanks Shimanov]

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
At last, the A_Cursor limitation is fixed :D

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.42.03:

Fixed crash of WinActivate in certain rare circumstances. [thanks twhyman]

Changed hotstrings to require the mouse hook by default (see next item). This can be prevented via #Hotstring NoMouse.

Improved hotstrings to take into account mouse clicks. This allows a hotstring to fire when the user's click focuses a new control or moves the caret.

Improved the Random command with a means to set a new seed. [thanks Laszlo]

Improved #ClipboardTimeout to reattempt data reading when the first attempt fails. Previously, only the opening of the clipboard was reattempted.

Added built-in variable A_LastError for DllCall and Run/RunWait. It contains the result from the OS's GetLastError(). [thanks Shimanov and PhiLho]

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004

Added built-in variable A_LastError for DllCall and Run/RunWait. It contains the result from the OS's GetLastError(). [thanks Shimanov and PhiLho]

Does this mean that GetLastError() will be called after each call? If yes, could this be made optional?

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
According to benchmarks, calling GetLastError() does not measurably impact performance (since the difference couldn't be measured, it's probably below 0.1%). I benchmarked it with GetTickCount because it's known to be a very fast function:

SetBatchLines -1

StartTime := A_TickCount
Loop 500000
	var := DllCall("GetTickCount")
Elapsed := A_TickCount - StartTime

MsgBox %Elapsed%
The result after the change was the same as it was before. Did you have some concern other than performance?

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004

The result after the change was the same as it was before. Did you have some concern other than performance?

Although performance was the main concern, it seems a bit unnecessary to add an extra call every time.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Calling GetLastError() unconditionally bothered me a bit too because it clearly isn't useful for most functions. However, even a non-API function can call SetLastError() as a means of returning extra info to its caller, so there is some value added there.

Also, it seems likely that GetLastError() is implemented a lot like GetTickCount() in the sense that it instantly returns a value from a fixed memory address. Such functions have the fastest possible execution time, almost as fast as a single line of inline code. In fact, the compiler might translate such functions into inline code (on the other hand, maybe it only does that for C-library functions like strlen).

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005

Added built-in variable A_LastError for DllCall and Run/RunWait. It contains the result from the OS's GetLastError(). [thanks Shimanov and PhiLho]

Eh, sometime I wait for upgrading, skipping some minor releases, but this time, I run to download the latest version!
Thank you Chris.
I guess the first scripts will have to test for emptiness of the variable, for compatibility with old versions of AHK.
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.42.04:

Fixed ClipboardAll when used with apps such as Word and Excel (broken by previous version). [thanks Roussi Nikolov]

Fixed ClipboardAll to prevent appearance of bookmarks in MS Word. [thanks Laszlo & 02clams]

Fixed A_TimeIdlePhysical being disrupted by simulated AltGr keystrokes. [thanks skrommel]

Fixed Send{Blind} causing sticking Win/Ctrl/Alt/Shift when the user released such a key in the middle of a Send.

Improved the Send command not to press and release the shift key after each uppercase letter (e.g. Send ABC).

Improved SoundSet/Get to support ComponentType "Headphones". [thanks Tobias Winkler]


I didn't get much coding done lately because the rehosting of autohotkey.com took a lot of time. Hopefully that's almost all taken care of now.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
v1.0.42.05 is functionally identical to the previous release, whose EXE and BIN were about 1% larger than they should have been due to a compiler quirk.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.42.06:

Fixed crash of A_ScriptDir (broken by 1.0.42.01).

Fixed Run/RunWait's passing of an extra space character at the end of the parameter list when launching shortcuts. [thanks arbe]

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
In v1.0.42.07, a crash of functions that recursively pass ByRef parameters was fixed. [thanks PhiLho]