Page 1 of 1

please need code for this windows

Posted: 16 Apr 2017, 08:57
by Shrewdo
please anyone can edit my code to be working on this windows only not any windows i open in front of me it work on it here my code and picture to see title which one i use
please

F2::
Loop,
{

Send w
Sleep 100
Send x
Sleep 100
}
return

Pause::Pause
F5::exitapp
memu.jpg
memu.jpg (333.03 KiB) Viewed 1529 times

Re: please need code for this windows

Posted: 16 Apr 2017, 10:21
by neomulemi6
You need the IfWinActive function. Read this: https://autohotkey.com/docs/commands/WinActive.htm

Re: please need code for this windows

Posted: 17 Apr 2017, 02:13
by Shrewdo
but how to use give me code and which title i write

Re: please need code for this windows

Posted: 17 Apr 2017, 02:46
by neomulemi6
I can't tell what the title of the window is from the screenshot you posted, it's pretty grainy, but try this. Put it at the very top of your script.

Code: Select all

SetTitleMatchMode, 2
#IfWinActive, 2.9.6
You can also use the title of the game's executable like this:

Code: Select all

#IfWinActive, ahk_exe program.exe

Re: please need code for this windows

Posted: 18 Apr 2017, 10:56
by Shrewdo
windows title is Memu 2.9.6 - MEmu
so how to use which one please answer me i tried many ways but it never works in inactive windows it only does when i select it the memu windows and it send lot of keys not only w x it send shift ?

Re: please need code for this windows

Posted: 18 Apr 2017, 11:46
by neomulemi6

Code: Select all

SetTitleMatchMode, 2
#IfWinActive, Memu
Can you show me your entire script?

Re: please need code for this windows

Posted: 19 Apr 2017, 10:48
by Shrewdo
you mean i start code like that

SetTitleMatchMode, 2
#IfWinActive, Memu
F2::
Loop,
{

Send w
Sleep 100
Send x
Sleep 100
}
return

Pause::Pause
F5::exitapp

its correct?

Re: please need code for this windows

Posted: 21 Apr 2017, 10:17
by neomulemi6
Yes that's right.