Hi guys,
I use autohotkey to download invoices from our system, however MS Office was recently updated to 2016 version and I guess that is the reason why my script doesn´t work and should be updated.
When I run it, nothing happen, no even the 1 move. Please see below hot it starts:
Start:
; ---- Allows part of the title to be different
settitlematchmode, 2
WinWait, Microsoft Excel -,
IfWinNotActive, Microsoft Excel -, , WinActivate, Microsoft Excel -,
WinWaitActive, Microsoft Excel -,
Sleep, 100
Send, {CTRLDOWN}c{CTRLUP}
Sleep, 200
Could you please advise how to update this script?
Thank a lot.
Petro
Autohotkey vs. MS Excel 2016
- Delta Pythagorean
- Posts: 627
- Joined: 13 Feb 2017, 13:44
- Location: Somewhere in the US
- Contact:
Re: Autohotkey vs. MS Excel 2016
First thing I must say, is that this is the Scripts and Functions section. If you have any questions, please post in the Ask For Help subforum.
Second, I suggest using a ComObj to connect to MS Excel. It will connect to all versions of Excel (AFAIK).
Second, I suggest using a ComObj to connect to MS Excel. It will connect to all versions of Excel (AFAIK).
[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat
Re: Autohotkey vs. MS Excel 2016
Petro wrote: I use autohotkey to download invoices from our system, however MS Office was recently updated to 2016 version and I guess that is the reason why my script doesn´t work and should be updated.
Start:
; ---- Allows part of the title to be different
settitlematchmode, 2
WinWait, Microsoft Excel -,
IfWinNotActive, Microsoft Excel -, , WinActivate, Microsoft Excel -,
WinWaitActive, Microsoft Excel -,
Sleep, 100
Send, {CTRLDOWN}c{CTRLUP}
Sleep, 200
So your script is looking for the phrase Microsoft Excel - in the titlebar. If Excel2016 has changed the format and wording of its titlebar, that could be a reason why its failing
Re: Autohotkey vs. MS Excel 2016
Here's some Window Spy shots of Excel 2013 and Excel 2016 with a blank workbook. No 'Microsoft' there anywhere.
I don't have Excel 2003 or Excel 2007, so I can't make a comparison. I bet it'll work if you remove 'Microsoft' from the script.
Regards,
burque505
Edit: Yeah, 2003 and 2007 have Microsoft in the title. Here's a shot of Excel 2003:
I don't have Excel 2003 or Excel 2007, so I can't make a comparison. I bet it'll work if you remove 'Microsoft' from the script.
Regards,
burque505
Edit: Yeah, 2003 and 2007 have Microsoft in the title. Here's a shot of Excel 2003:
- Attachments
-
- Excel16.PNG (25.9 KiB) Viewed 1261 times
Re: Autohotkey vs. MS Excel 2016
Excel 2007:
Window title (what to use in AHK): Microsoft Excel - Book1
Although the custom title bar says: Book1 - Microsoft Excel
Use AHK's WinGetTitle command to find out what you need. You could also check the alt+tab window/the taskbar button/Task Manager for the window title text.
Window title (what to use in AHK): Microsoft Excel - Book1
Although the custom title bar says: Book1 - Microsoft Excel
Use AHK's WinGetTitle command to find out what you need. You could also check the alt+tab window/the taskbar button/Task Manager for the window title text.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Who is online
Users browsing this forum: Theda and 176 guests