Page 1 of 1

Adobe flash fullscreen with ctrl+f  Topic is solved

Posted: 05 Feb 2014, 04:46
by atotmtm
Hello everyone!
First of all great program , great forum!

I am really new to autohotkey and I ama trying to figure out how I could create a script that checks if Adobe flash Player is out of fullscreen mode and if this happens focus on flash window and give it a ctrl+f keystroke just to go back in fullscreen.
Would that be possible with autohotkey?
Please if anyone could guide me through this that would be much appreciated!
Thank you in advance

Re: Adobe flash fullscreen with ctrl+f

Posted: 05 Feb 2014, 04:59
by Sjc1000
Hi atotmtm,

This should work.

Code: Select all

WinGetPos, winX, winY, winWidth, winHeight, ahk_class ShockwaveFlash

if ( winX = 0 && winY = 0 && winWidth = A_ScreenWidth && winHeight = A_ScreenHeight )
{	MsgBox, The window is full screen
	WinActivate, ahk_class ShockwaveFlash
}

Re: Adobe flash fullscreen with ctrl+f

Posted: 05 Feb 2014, 05:11
by Sjc1000
Sorry, i had it backwards..

This is what you want :P

Code: Select all

SetTimer, Check, 1000
return


Check:
	WinGetPos, winX, winY, winWidth, winHeight, ahk_class ShockwaveFlash

	if !( winX = 0 && winY = 0 && winWidth = A_ScreenWidth && winHeight = A_ScreenHeight )
	{	ControlSend,, ^f, ahk_class ShockwaveFlash
		WinActivate, ahk_class ShockwaveFlash
	}
Return

Re: Adobe flash fullscreen with ctrl+f

Posted: 05 Feb 2014, 06:34
by Guest
Unfortunatelly can't launch the script with doubleclick...
I tried the example in the tutorial section which works with doubleclick What am I doing wrong?

Re: Adobe flash fullscreen with ctrl+f

Posted: 05 Feb 2014, 06:58
by atomtm
Ok I managed to run it with #Persistent

Code: Select all

#Persistent
SetTimer, Check, 1000
return

Check:
   WinGetPos, winX, winY, winWidth, winHeight, ahk_class ShockwaveFlash

   if !( winX = 0 && winY = 0 && winWidth = A_ScreenWidth && winHeight = A_ScreenHeight )
   {   ControlSend,, ^f, ahk_class ShockwaveFlash
      WinActivate, ahk_class ShockwaveFlash
   }
Return
Otherwise it doesn't work.
Is there anything wrong with using #Persistent?

Re: Adobe flash fullscreen with ctrl+f

Posted: 05 Feb 2014, 07:09
by TLM
hey atomtm I was watching this in IRC with you and Sjc1000.

There is nothing wrong with using #Persistent

Re: Adobe flash fullscreen with ctrl+f

Posted: 05 Feb 2014, 07:47
by atomtm
Thank you for your answers!
Big help, appreciate it !