TaranVH / 2nd-keyboard

ALL of Taran's scripts - not just for the 2nd keyboard.
https://www.youtube.com/watch?v=O6ERELse_QY
1.66k stars 534 forks source link

Simple code not working #70

Closed freduard closed 5 years ago

freduard commented 5 years ago

Hey,

So I created a simple script that if I press END the script will press HOME, Sleep 100 and then suspend itself, but for some reason, it doesn't press HOME. I don't know what's the problem... It doesn't tell me any error either. Thanks!

Code:

END:: sendinput, {Home} ;Press Home so my keyboard profile would switch in iCUE. (I made it so if I press Home iCUE switches between my 2 profiles which are Editing/Programming and Gaming)

Sleep 100 ;Wait for 100 milliseconds Suspend ;Suspend the hotkeys so if I play games i wouldn't accidentally press one of my hotkeys

freduard commented 5 years ago

Okay, so I was messing around with this and found out that for some reason AutoHotKey doesn't want to press a key if the same key is bound in another program. I got no idea why but can I somehow make it work?

TaranVH commented 5 years ago

I can't possibly know what's gone wrong without seeing all of the code. But don't send it; I can't be looking over everyone's code. No time for that. This has nothing to do with my own code, so I'm closing this. make sure you read the AHK tutorial for beginners. Read up on #ifwinactive too.