#ifwinactive can't recognize clover window how to fix it ?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
woshichuanqilz72
Posts: 117
Joined: 05 Oct 2015, 21:23

#ifwinactive can't recognize clover window how to fix it ?

21 Jun 2017, 07:49

I use the code below but it can't work when Clover windows is active and I press ^o


the widnow info is this :"下载 - Clover ahk_class Clover_WidgetWin_0"

Code: Select all

#IfWinActive,  - Clover
{
    ^o::
    {
        Return
    }

    Return 
}
User avatar
DyaTactic
Posts: 221
Joined: 04 Apr 2017, 05:52

Re: #ifwinactive can't recognize clover window how to fix it ?

21 Jun 2017, 07:58

Put this code in the top section (autoexecutesection) of you script. That should help

Code: Select all

SetTitleMatchMode, 2
Let me know how that worked.
SirRFI
Posts: 404
Joined: 25 Nov 2015, 16:52

Re: #ifwinactive can't recognize clover window how to fix it ?

21 Jun 2017, 08:58

Maybe detect it by exe?

Code: Select all

#if (WinActive("ahk_exe something.exe))
^o::
; ...
Return
Use

Code: Select all

[/c] forum tag to share your code.
Click on [b]✔[/b] ([b][i]Accept this answer[/i][/b]) on top-right part of the post if it has answered your question / solved your problem.
User avatar
DyaTactic
Posts: 221
Joined: 04 Apr 2017, 05:52

Re: #ifwinactive can't recognize clover window how to fix it ?

21 Jun 2017, 09:24

That is certain a possibility. It is written different however. Not sure if this works, it seems legit.

Code: Select all

#IfWinActive, ahk_exe something.exe
^o::
; ...
Return
SirRFI
Posts: 404
Joined: 25 Nov 2015, 16:52

Re: #ifwinactive can't recognize clover window how to fix it ?

21 Jun 2017, 10:17

DyaTactic wrote:That is certain a possibility. It is written different however. Not sure if this works, it seems legit.
It's expression style, and You can put anything after #If, like it's actual if. Luckily obsolete command syntax gets removed in v2 :)
Use

Code: Select all

[/c] forum tag to share your code.
Click on [b]✔[/b] ([b][i]Accept this answer[/i][/b]) on top-right part of the post if it has answered your question / solved your problem.
User avatar
DyaTactic
Posts: 221
Joined: 04 Apr 2017, 05:52

Re: #ifwinactive can't recognize clover window how to fix it ?

22 Jun 2017, 02:54

Alright.
Does the ahk_exe title work?
woshichuanqilz72
Posts: 117
Joined: 05 Oct 2015, 21:23

Re: #ifwinactive can't recognize clover window how to fix it ?

24 Jun 2017, 01:53

DyaTactic wrote:Alright.
Does the ahk_exe title work?
No I change the code to this, it doesn't work fine.

Code: Select all

#IfWinActive, ahk_exe Clover.exe
{
    ^o::
    {
        MsgBox xixi
        Return 
    }
    
    Return
}
woshichuanqilz72
Posts: 117
Joined: 05 Oct 2015, 21:23

Re: #ifwinactive can't recognize clover window how to fix it ?

24 Jun 2017, 01:57

DyaTactic wrote:Alright.
Does the ahk_exe title work?
The code works fine when I click the window again, I don't know why but it works~
User avatar
DyaTactic
Posts: 221
Joined: 04 Apr 2017, 05:52

Re: #ifwinactive can't recognize clover window how to fix it ?

24 Jun 2017, 16:24

Alright, good luck with further coding.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ccqcl, Descolada, Google [Bot], inseption86, mebelantikjaya and 344 guests