Java from 32 to 64 bit and AHKnot working anymore

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
omahk
Posts: 4
Joined: 07 Apr 2017, 07:30

Java from 32 to 64 bit and AHKnot working anymore

07 Apr 2017, 07:39

Hello,
I have the following script that worked fine on Java 32 bit in my office computer.
Yesterday it was updated to Java 64 bit and it stopped working.

Code: Select all

#IfWinActive, Viewer

; Control & Alt & F to highlight figures
!^f::
{
; wait for release of keys
   KeyWait Control
   KeyWait Alt
   KeyWait f
; reproduce sequence
   WinWaitActive, Viewer, , 2
   Send {LAlt Down}
   Send 1
   WinWaitActive, Highlight document specific, , 2
   Send f
   sleep 200
   Send o
   Send {LAlt Up}
   Return
}

#IfWinActive
I tested with a similar script to get the WinTitle and it does indeed start with "Viewer", but still it isn't recognised.

If I remove the #IfWinActive condition, it works again, however it's not what I want, since the same key sequence on other apps causes undesirable results.

How can I work around the issue? Do you need additional details?
MaxAstro
Posts: 557
Joined: 05 Oct 2016, 13:00

Re: Java from 32 to 64 bit and AHKnot working anymore

07 Apr 2017, 11:33

A screenshot of the information Window Spy gives you might be helpful. Have you tried identifying the window by class or exe instead?
omahk
Posts: 4
Joined: 07 Apr 2017, 07:30

Re: Java from 32 to 64 bit and AHKnot working anymore

11 Apr 2017, 03:34

Spy gives:

Viewer - RA12345678_Tri 3/63 - not available=0 Set 3 = X-File:AllAccumulatedResultsOrdered Presearch
ahk_class SunAwtFrame
ahk_exe java.exe
omahk
Posts: 4
Joined: 07 Apr 2017, 07:30

Re: Java from 32 to 64 bit and AHKnot working anymore

11 Apr 2017, 03:49

Using the normal IF works:

Code: Select all

;SendMode Input

!^f::
IfWinActive, Viewer
{
   ...
   Return
}
else
{
   Send !^f
   Return
}
I had to disable SendMode Input otherwise the following two were clashing:

Code: Select all

SendMode Input

CapsLock::LCtrl
>+CapsLock::CapsLock

$v::
IfWinActive, Viewer
{
;   KeyWait v
   Send v
   Send q
   Return
}
else
{
   Send v
   Return
}
Why is the
#IfWinActive, Viewer
not working while
IfWinActive, Viewer
does?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Joey5 and 345 guests