Netflix launch with ahk (windows 10) Topic is solved

Ask gaming related questions (AHK v1.1 and older)
LegzRwheelz
Posts: 56
Joined: 04 Nov 2019, 17:46

Netflix launch with ahk (windows 10)

05 Feb 2020, 16:23

Hello, I am trying to create a script to launch Netlfix and have it go to full screen mode by sending Win shift enter
I can get it to launch, however, it will not go to fullscreen, I can hear an error sound like its sending it at the wrong time or with the wrong window open. I know I am close... i would also like the script to close once i press escape to close netflix and if possible, make this script portable. So i can have it in any directory. Thank you in advance. For your patience and genius. Here is my script.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

run, E:\Downloads\kodi shit\Windows Shortcuts and roms\Netflix
WinWait, Netflix ahk_class ApplicationFrameWindow
WinActivate, Netflix ahk_class ApplicationFrameWindow
Send, {sleep} 1000, #{Down}+Enter::
Escape::
    send, !{f4}
Return
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: Netflix launch with ahk (windows 10)

05 Feb 2020, 16:33

try:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

run, E:\Downloads\kodi shit\Windows Shortcuts and roms\Netflix
WinWait, Netflix ahk_class ApplicationFrameWindow
WinActivate, Netflix ahk_class ApplicationFrameWindow
Sleep, 1000
Send, {LWin Down}{Shift Down}{Enter}{Shift Up}{LWin Up}
return

Esc::
    send, !{f4}
    ExitApp
return
LegzRwheelz
Posts: 56
Joined: 04 Nov 2019, 17:46

Re: Netflix launch with ahk (windows 10)

05 Feb 2020, 19:24

excellent, it works perfectly. thank you!. Can you tell me what to put in the end so the script closes when netflix is closed? It continues to run in the system tray
HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: Netflix launch with ahk (windows 10)  Topic is solved

05 Feb 2020, 19:26

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

run, E:\Downloads\kodi shit\Windows Shortcuts and roms\Netflix
WinWait, Netflix ahk_class ApplicationFrameWindow
WinActivate, Netflix ahk_class ApplicationFrameWindow
Sleep, 1000
Send, {LWin Down}{Shift Down}{Enter}{Shift Up}{LWin Up}
WinWaitClose, Netflix ahk_class ApplicationFrameWindow
ExitApp

Esc::
    send, !{f4}
    ExitApp
return
LegzRwheelz
Posts: 56
Joined: 04 Nov 2019, 17:46

Re: Netflix launch with ahk (windows 10)

05 Feb 2020, 19:43

Perfect, thank you so very much! I did have to edit it just a little bit though. the script wasn't responding to my ESCAPE keypress. Here is what I did

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

run, E:\Downloads\kodi shit\Windows Shortcuts and roms\Netflix
WinWait, Netflix ahk_class ApplicationFrameWindow
WinActivate, Netflix ahk_class ApplicationFrameWindow
Sleep, 1000
Send, {LWin Down}{Shift Down}{Enter}{Shift Up}{LWin Up}
return
Escape::
    send, !{f4}
WinWaitClose, Netflix ahk_class ApplicationFrameWindow
ExitApp

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 105 guests