How come some time ahk doesn't work

Get help with using AutoHotkey and its commands and hotkeys
ethanross1a
Posts: 16
Joined: 18 Sep 2019, 18:36

How come some time ahk doesn't work

21 Sep 2019, 09:20

This applies to most scripts, it seems sometimes a script doesn't work. and I'd have to click the taskbar, then it works. Is it a focus thing?
ilhom
Posts: 52
Joined: 19 Aug 2019, 17:58

Re: How come some time ahk doesn't work

21 Sep 2019, 12:08

Can you post an example script that stops working for you?
What program do you have in focus where it stops working, and then starts working when you click the task bar?
ethanross1a
Posts: 16
Joined: 18 Sep 2019, 18:36

Re: How come some time ahk doesn't work

23 Sep 2019, 06:26

Here's one that didn't work just then, until i click on the taskbar, then it worked.

Code: Select all

#d::Run, C:\Users\A\Dropbox

i'm not sure if the above code IS the problem, since many many other scripts have the same issue. Can the following script be causing this problem?

Code: Select all

~WheelUp::mouseWheelVolume("+4")
~WheelDown::mouseWheelVolume("-4")
mouseWheelVolume(step)
{  mouseGetPos,mx,my,wnd
   wingetClass,cls,ahk_id %wnd%
   if cls=Shell_TrayWnd
   {  SoundSet %step%
      soundSet 0,,mute
      soundGet vol
      ifInString,vol,.
         stringMid,vol,vol,1,% inStr(vol,".")-1
      tooltip, Volume:%vol%`%,% mx+8,% my+8,19
      setTimer removeVolumeTip,2000
   }
   return
removeVolumeTip:
   tooltip,,,,19
   settimer removeVolumeTip,OFF
   return
}

#MaxHotkeysPerInterval 200

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], c7aesa7r and 60 guests