Page 1 of 1

my script do not work anymore

Posted: 13 Apr 2018, 13:02
by ahk123
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 

Re: my script do not work anymore

Posted: 14 Apr 2018, 07:35
by noname
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