I want to write a script, so that when Kmplayer windows is activated, When I press
f , if the video on Kmplyer is plying then pause it (for example by sending
space) then do the functions I defined and if it is already paused, then not sending
space but do the functions. Here is the script that send space and do the functions but when the video is paused it send space and do the functions (which is my issue I want those functions be done when the video is paused)
Code: Select all
#IfWinActive ahk_class KMPlayer 64X
f::
Sendinput,{space}
sleep,50
Sendinput,{enter}
sleep,50
if WinExist("Oxford Advanced Learner's Dictionary")
WinActivate
sleep,50
Click,178,136
sleep,50
Sendinput,^a{Delete}
sleep,50
return