Hotkey to get out of Parsec not working

Ask gaming related questions (AHK v1.1 and older)
DisIzSilly
Posts: 4
Joined: 09 Mar 2021, 10:28

Hotkey to get out of Parsec not working

26 Mar 2021, 07:17

I can use a hotkey to activate the Parsec window, but once there, I am unable to use hotkeys to activate a different window, even if running as Administrator. Suggestions?

Code: Select all

#WinActivateForce
F5::
WinActivate, Parsec
return
F6::
WinActivate, Moonlight
return
User avatar
mikeyww
Posts: 26851
Joined: 09 Sep 2014, 18:38

Re: Hotkey to get out of Parsec not working

26 Mar 2021, 08:43

Does F6 work from other windows? If so, then does Parsec use its own keyboard shortcuts? If not, then what does Window Spy show as your complete window title for Moonlight? Do results differ if you remove the initial directive? Do results differ if you do not run as admin?
DisIzSilly
Posts: 4
Joined: 09 Mar 2021, 10:28

Re: Hotkey to get out of Parsec not working

26 Mar 2021, 08:56

Does F6 work from other windows?
Yes!
If so, then does Parsec use its own keyboard shortcuts?
Parsec has a few shortcuts which use modifiers, but none involving F5, or F6.
If not, then what does Window Spy show as your complete window title for Moonlight?
Moonlight
ahk_class Qt5152QWindowOwnDCIcon
ahk_exe Moonlight.exe
ahk_pid 15452
Do results differ if you remove the initial directive? Do results differ if you do not run as admin?
No, and No
User avatar
mikeyww
Posts: 26851
Joined: 09 Sep 2014, 18:38

Re: Hotkey to get out of Parsec not working

26 Mar 2021, 09:09

OK. Parsec still might be conflicting somehow.

Is that the entire script?
Are any other scripts running at the same time?
Are there any other windows (e.g., an open Web browser page or document) also called "Moonlight"?
Does Parsec have on-top window status?
Are you able to use a hotkey to minimize the Parsec window and then activate Moonlight?

A simple test while you are using Parsec:

Code: Select all

F3::MsgBox, Test
DisIzSilly
Posts: 4
Joined: 09 Mar 2021, 10:28

Re: Hotkey to get out of Parsec not working

26 Mar 2021, 12:42

Is that the entire script?
This is the entire script I am using to test.

Code: Select all

#SingleInstance Force
#WinActivateForce
F5::
WinActivate, Parsec
return
F6::
WinActivate, Moonlight
return
F7::
WinMinimize, A
return
F3::MsgBox, Test
F8::Winactivate, Ubisoft ; Ubisoft Connect window
F9::WinActivate, New ;Microsoft Edge window
Are any other scripts running at the same time?
No
Are there any other windows (e.g., an open Web browser page or document) also called "Moonlight"?
No
Does Parsec have on-top window status?
Apparently, but I don't know how to verify this. Alt Esc succeeds in sending it to the back.
Are you able to use a hotkey to minimize the Parsec window and then activate Moonlight?
I can't use a hotkey in the script, but If I press Alt Esc, Parsec will go to the back, and I can then press F6 to activate Moonlight. I then to have to press Alt Esc in order for F5 to activate Parsec.
F7::WInMinimize, A will work for other windows when they are active, but will not work within Parsec. Nor will it work within Moonlight.
User avatar
mikeyww
Posts: 26851
Joined: 09 Sep 2014, 18:38

Re: Hotkey to get out of Parsec not working

26 Mar 2021, 13:54

Some ideas to try:

Code: Select all

F6::
PostMessage, 0x0112, 0xF020,,, Parsec ; Alternatively: Send !{Esc}
WinActivate, Moonlight
Return
DisIzSilly
Posts: 4
Joined: 09 Mar 2021, 10:28

Re: Hotkey to get out of Parsec not working

26 Mar 2021, 22:35

Some ideas to try
Neither PostMessage nor Send !{Esc} worked.
However, I set up Parsec to run in a Sandboxie-Plus window and hotkeys perform as desired. This solves my problem, nicely.
Thanks for all your input.
k1ngstire
Posts: 1
Joined: 28 Sep 2021, 08:47

Re: Hotkey to get out of Parsec not working

28 Sep 2021, 08:50

@DisIzSilly
Can you tell how you got Parsec working inside Sandboxie? I have the exact same problem like you.
But Parsec inside Sandboxie does not seem to have internet/lan access.
Would be so kind.

Edit: Apparently, just had to restart my PC to get properly Sandboxie working.
spallingerrer
Posts: 2
Joined: 07 Dec 2023, 03:30

Re: Hotkey to get out of Parsec not working

07 Dec 2023, 03:36

Hi, I struggled with this mightily for a long time, but I have a solution!

First, install the "Parsec portable app," not the full install with the server on the client machine. The portable app doesn't use the SYSTEM user and thus doesn't intercept AHK's hotkeys.

Secondly, you have to have the right class, I used the window spy and found that it's "MTY_Window" in the current version of Parsec.

Here's my whole script to swap in/out of Parsec (I use control + caps lock as my hotkey):

Code: Select all

SetTitleMatchMode, 2
#IfWinActive Parsec ahk_class MTY_Window
  ^Capslock::
    WinMinimize A
  return
#IfWinActive
#IfWinNotActive Parsec ahk_class TscShellContainerClass
  ^Capslock::
    WinActivate, Parsec
  return
#IfWinNotActive
spallingerrer
Posts: 2
Joined: 07 Dec 2023, 03:30

Re: Hotkey to get out of Parsec not working

07 Dec 2023, 11:57

Couple of adjustments to the code: I found adding some small sleeps before the activations/minizations helps a lot, and also setting the title match mode to exact (3) prevents some issues with switching to programs that happen to have the word "Parsec" in their title. Finally, I added "#WinActivateForce" which seems to make the switching pretty bulletproof.

Code: Select all

#WinActivateForce
SetTitleMatchMode, 3
#IfWinActive Parsec ahk_class MTY_Window
  ^Capslock::
    Sleep 50
    WinMinimize A
  return
#IfWinActive
#IfWinNotActive Parsec ahk_class TscShellContainerClass
  ^Capslock::
    Sleep 50
    WinActivate, Parsec
  return
#IfWinNotActive

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 39 guests