[v1.1.28.01 solved] AutoHotkey doesn't work on Excel Topic is solved

Report problems with documented functionality
vane42
Posts: 11
Joined: 24 Jan 2018, 02:56

[v1.1.28.01 solved] AutoHotkey doesn't work on Excel

20 Feb 2018, 21:59

Hi,

I found AutoHotkey 1.1.28.00 doesn't work on Excel 2010x64. Does Anybody encounter the same problem?
Last edited by vane42 on 02 Apr 2018, 19:50, edited 1 time in total.
gregster
Posts: 8886
Joined: 30 Sep 2013, 06:48

Re: AutoHotkey doesn't work on Excel

21 Feb 2018, 00:05

What doesn't work? Clicking around in it or the COM interface? I can only imagine the first - you might have to run your script as admin.
vane42
Posts: 11
Joined: 24 Jan 2018, 02:56

Re: AutoHotkey doesn't work on Excel

21 Feb 2018, 00:09

gregster wrote:What doesn't work? Clicking around in it or the COM interface? I can only imagine the first - you might have to run your script as admin.
Hotstrings do not work.
gregster
Posts: 8886
Joined: 30 Sep 2013, 06:48

Re: AutoHotkey doesn't work on Excel

21 Feb 2018, 00:13

What does that mean? Also, if you run the string as admin?
vane42
Posts: 11
Joined: 24 Jan 2018, 02:56

Re: AutoHotkey doesn't work on Excel

21 Feb 2018, 00:35

gregster wrote:What does that mean? Also, if you run the string as admin?
For example:
If I type the two characters "]r", it should be replaced with current date "2018/02/21".
However, the replacement does not take effect on Excel.

P.S. I run my script as admin.
guest3456
Posts: 3453
Joined: 09 Oct 2013, 10:31

Re: AutoHotkey doesn't work on Excel

21 Feb 2018, 10:41

so does 1.1.27 work? and 1.1.28 fails?

User avatar
tankuser
Posts: 26
Joined: 29 Sep 2013, 16:04

Re: AutoHotkey doesn't work on Excel

21 Feb 2018, 12:14

Hotstrings require an end character such as Space or Enter for example. if you are typing and clicking then the hotstring would not work.
vane42
Posts: 11
Joined: 24 Jan 2018, 02:56

Re: AutoHotkey doesn't work on Excel

21 Feb 2018, 12:30

Since I use this software, all versions work except for 1.1.28.
FrillyBits
Posts: 1
Joined: 12 Aug 2016, 19:59

Re: AutoHotkey doesn't work on Excel

21 Feb 2018, 23:47

I think I have the same problem with Excel Home 2013 version 15.0.4989.1000 and the recent update to 15.0.5007.1000
AHK version 1.1.27 worked ok, this only started happening since the AHK update to version 1.1.28 on February 11th

When I use any script in an Excel cell, date stamp, word replacement etc hotstrings do not work as they should (they do not 'fire')
But if I type anything then Backspace then EG: ds or wfsl (see examples below) etc then it works
If I type a Space then ds or wfsl etc then it works

I have never needed to run as Admin in the past but I tried it and there was no change
I do put the end character Space and tried Enter etc but no change
Some hotstrings include * so no end character required but they don't work as they should either
See examples below

Date stamp, end character required

Code: Select all

:C:ds::
Send, %A_YYYY%-%A_MM%-%A_DD% 
Return
WiFi password, no end character required

Code: Select all

:*CO:wfsl::1234567abcdef
All scripts work as they should in MS Word and Notepad and Wordpad (Jarte) :?
Edit: They work here in this reply box as well
photek
Posts: 1
Joined: 26 Feb 2018, 13:50

Re: AutoHotkey doesn't work on Excel

26 Feb 2018, 14:04

I just joined the forum looking for help with this, I use tons of hotstrings in excel and last week, after updating to the 1.1.28 version (i was using a really old version) hotstrings didn't work.

What i found out is that on excel the first character is ommited by ahk, if i start typing and later on i type a hotstring it works, but if the hotstring is the first thing I type it won't work. If I double click the cell or press F2 (entering edit mode on excel) the hotstring works as expected.

Hotkeys work as always, it is only the hotstrings that fail.
User avatar
tankuser
Posts: 26
Joined: 29 Sep 2013, 16:04

Re: AutoHotkey doesn't work on Excel

27 Feb 2018, 09:53

@Lexikos
LastDavid
Posts: 6
Joined: 27 Feb 2018, 23:57

Re: AutoHotkey doesn't work on Excel

28 Feb 2018, 01:26

I think I am having a similar problem, however it is not that the autoreplace script does not work at all, within Excel, it is that it does not work when it is the first character typed in a cell.

For example if I had a autoreplace that replaced td with today's date and i typed "td Item Repairs" the td would not be replaced, however if I typed "Item Repairs for td" then the autoreplace would work.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: AutoHotkey doesn't work on Excel

12 Mar 2018, 16:33

I'm having the same problem.
E.g. :*:abc::def
It works fine in Notepad and MS Word. But on Excel 2007 (on Windows 7) it fails the first time, but if I press space and try again, it works. If I do F2 then type the trigger, it works first time.
The hotstring works fine with v1.1.27.00, but not with v1.1.28.00. Thanks.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
lexikos
Posts: 9494
Joined: 30 Sep 2013, 04:07
Contact:

Re: AutoHotkey doesn't work on Excel

13 Mar 2018, 02:43

Does the focused control change when you press the first key?
gregster
Posts: 8886
Joined: 30 Sep 2013, 06:48

Re: AutoHotkey doesn't work on Excel

13 Mar 2018, 03:22

When you type the first key, the cell goes into edit mode.
But it seems, the cell has to be already in edit mode when the first key of the hotstring is pressed, to make it work. So backspacing and re-typing works, but also clicking the formula bar at the top before you start to type the first key of the hotstring, A third way is double-clicking the cell before typing the hotstring. All these methods cause 'edit mode' before the first key is typed. Without that, it fails.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: AutoHotkey doesn't work on Excel

13 Mar 2018, 08:43

- (For Excel 2007:)
- Navigate between cells with arrow keys, Excel says 'Ready', EXCEL71 is focused.
- Start typing, Excel says 'Enter', EXCEL61 is focused. First hotstring fails.
- Press F2, Excel says 'Edit', EXCEL61 is focused. Hotstring works first time.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
jmnm00
Posts: 2
Joined: 16 Mar 2018, 09:31

Re: AutoHotkey doesn't work on Excel

16 Mar 2018, 09:32

I'm having the same issue with Excel 2016. I downgraded to 1.27 and my hotstrings work again.
lexikos
Posts: 9494
Joined: 30 Sep 2013, 04:07
Contact:

Re: AutoHotkey doesn't work on Excel

17 Mar 2018, 18:55

jeeswg wrote:- Navigate between cells with arrow keys, Excel says 'Ready', EXCEL71 is focused.
- Start typing, Excel says 'Enter', EXCEL61 is focused.
So that's a "yes". That would explain it.
Changed hotstring recognizer to reset when focus changes instead of just when the active window changes.
Reverting this is probably the safest option, if not the only feasible one.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: AutoHotkey doesn't work on Excel

17 Mar 2018, 19:15

- The thing is, if the hotstring recogniser is resetting *more* times than it used to, then in theory there wouldn't be a problem. Or am I missing something.
- Oh, perhaps it changes control focus as you type the first letter. So it's reset to blank *after* you've typed the first letter. The behaviour of the hotstrings below appears to coincide with this idea, type 'abc', get 'abbb'. (It's been baffling me for a few days.)

Code: Select all

:*?:abc::aaa
:*?:bc::bbb
:*?:def::ddd
- I never personally felt the need for hotstrings to reset when the control focus changes, perhaps for some users/programs this would be useful, so maybe it could be an optional setting.

- Two other possible minor bugs:
unexpected return values using StrReplace as a BoundFunc object - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=43868
FileAppend to stdout/stderr - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 39#p206739
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
lexikos
Posts: 9494
Joined: 30 Sep 2013, 04:07
Contact:

Re: AutoHotkey doesn't work on Excel  Topic is solved

31 Mar 2018, 05:06

v1.1.28.01 reverts the reset behaviour. See if that fixes Excel.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 25 guests