my script do not work anymore

Get help with using AutoHotkey and its commands and hotkeys
ahk123

my script do not work anymore

13 Apr 2018, 13:02

Hi guys,

i have this little script to detect fullscreen mode in firefox for videos to remap keys. This worked like a charm for a long time.
Now, since a couple of days it does not work anymore? Maybe one can help me. I absolutlley do not know why this is not working anymore? Could it be something with a new resolution? or driver?

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.  
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance force



#Persistent
SetTimer, check_fs, On
check_fs:
IfWinExist, ahk_class MozillaWindowClass

{
  WinGetPos, x, y, w, h
    If (x=0 && y=0 && w=A_ScreenWidth && h=A_ScreenHeight)
      {
		User  := "User1"
      }
	  else User  := "User0"
		
}

#if (User = "User1")
   WheelUp::Right
   WheelDown:: Left  
#if 
User avatar
noname
Posts: 509
Joined: 19 Nov 2013, 09:15

Re: my script do not work anymore

14 Apr 2018, 07:35

I tried it and it worked ( fullscreen moves 5sec with mousescroll )

Here is the code with tooltip ( only shows if fullscreen ) to get dimensions of window versus screen maybe there is a difference?

Code: Select all


#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.  
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance force

#Persistent
SetTimer, check_fs, on

check_fs:
tooltip
IfWinExist, ahk_class MozillaWindowClass

{
  WinGetPos, x, y, w, h
    If (x=0 && y=0 && w=A_ScreenWidth && h=A_ScreenHeight)
		User  := "User1"
	  else
    User  := "User0"
	  
tooltip %  w " " h	"`n" a_screenwidth " " a_screenheight	
}

#if (User = "User1")
   WheelUp::Right
   WheelDown:: Left  
#if 
soundcloud.com/user-32706894

Return to “Ask For Help”

Who is online

Users browsing this forum: Albireo, boybenqn, doncole, Google [Bot], Mipha, rspai and 166 guests