Thanks, helped alot.
Didn't know about $ this simple change fixed it:
Code: Select all
;Middle Click Macro
$F3::
Send, {F3}{MButton}
return
About chrome. I realised that it's only in chrome, that you can't active / deactivate the scrolling middle click feature (while moving the mouse).
Because F3 enables the "search field" in chrome. In FireFox for example it's working. Middle Click activate / deactivate the scrolling with mouse movement.
So theoretically I have 2 options now:
1. I set my mouse middle click button to default (normal middle click) and check IF I'm in World of Warcraft, and then I set my script. Which gives me MiddleClick+F3 at the same time
2. I set my mouse middle click to F3. Set my script to MiddleClick+F3 WHEN I'm in WoW. And when I'm not in WoW it's only middle click.
Not sure what I like the most.
In both variants I'll need the script running when I'm playing World of Warcraft. So I would pref 1. option.
Because then my middle click is normal behaviour everywhere in Windows. Only in World of Warcraft it will be MiddleClick+F3.
When I check World of Warcraft it shows me:
Code: Select all
>>>>>>>>>>( Window Title & Class )<<<<<<<<<<<
World of Warcraft
ahk_class GxWindowClass
GxWindowClass seems like everything with DirectX or something?!
That means this would be active in every game?! Because it's not like google chrome. When you check chrome it's
So theoretically I have to check two things.
Code: Select all
;Middle Click Macro
IF(ahk_class == GxWindowClass && WindowTitle == "World of Warcraft) {
$MButton::::
Send, {F3}{MButton}
return
}
I have to read about syntax of IF statements in AHK.
And how to check the ahk class / Window Title.
But then it should work like I want it.
So I can set middle click to default (for my mouse) and AutoHotkey script should replace the middle click with the "macro".
MiddleClick + F3 at one click.
PS:
For your question with the sleep.
I used both. I used sleep, and keydelay. Both worked. So I thought I stick with keydelay because it's a key thing im using, don't know what would be better.
But I don't need a sleep or keydelay. Because the script works with SEND without anything.
And like I know the difference between "send" and "sendinput" is, that send "types" every letter, one after another.
And sendinput sends everything at once. So when I'm using "send" it would type a long text letter by letter (like fast typing my own).
And sendinput sends the whole text completly in one second.
Could you correct me the text above (IF statement). I'll search the forum and read some docs.
So I should make it work my own anyways any time soon
A BIG thanks again <3 You really helped me.
And it's fun. For my first experience with AHK.
I already created a "nipple sound board". Like press a hotkey to play a sound:
Code: Select all
<^<+<!c::
sendinput {Media_Play_Pause}
Run, "C:\Program Files\VideoLAN\VLC\vlc.exe" --qt-start-minimized "D:\Programme\Tools\AutoHotkey\001 SoundFiles\011_Female-Vocal-Countdown.mp3"
sleep 12200
sendinput {Media_Play_Pause}
return
And it works like a charm
![Smile :-)](./images/smilies/icon_e_smile.gif)
The only thing I "don't like" is that I have to open the sound file, see how's the LENGHT of the file (time).
And then I have to set the milliseconds for the sleep :-\ I was searching for a "check if the file is done playing" auto function or something, but I didn't find anything.
But anyways. The sleep works. The script simply PAUSE the media player (when I'm listening to music), plays the sound file, and after the sound file the music continues (play again).
I'm using that for my stream. So I can play funny sounds for the viewers
![Smile :-)](./images/smilies/icon_e_smile.gif)
I mean, it's not a big deal to set the sleep by my own. I don't change the sound files every day
![Razz :-P](./images/smilies/icon_razz.gif)
But AutoHotkey is fun so far. Thanks again.
EDIT:
This works like a charm now:
Code: Select all
#IfWinActive World of Warcraft ahk_class GxWindowClass
$MButton::
Send, {F3}{MButton}
return
#IfWinActive