Closed kevinagius closed 1 year ago
@nyanhp @I-Am-Jakoby @StartAutomating
If you could also help me with making a Powershell script which sends the Hotkey for Key number 2 to OBS I would truly appreciate it.
@kevinagius this sounds like ThreadJob's problem.
I wonder if you have an old copy of ThreadJob.
Alternatively, I can think of a couple of other possibilities:
There's also a slightly known annoyance of getting an indexing error upon the very first connection (an issue needs to be filed for it, and, if you're falling into that rabbit hole, this would be it).
It's especially annoying because it just displays the error and then works just fine after the first command (of the very first connection).
So, let's try a few things:
@StartAutomating
I have reinstalled ThreadJob (for reference to anyone experiencing this issue: https://stackoverflow.com/questions/66305351/powershell-unable-to-update-powershellget-error-the-version-1-4-7-of-modul) and now the commandInstall-Module obs-powershell -Scope CurrentUser -Force gave me no errors as well as the Import-Module command:
Connect-Obs -WebSocketToken '
But the Get-OBSHotkey command is still giving me the same issue. Maybe it is my usage?
The sole purpose of this project is basically I have a hotkey set to NUMPADSUB and NUMPADMULT which allow me to start and stop recording. In addition I have a powershell script to compress archives which allows me to compress my videos. I would like to create a Task Scheduler event to run the script every hour or so. In the script I would like to initially have it sending the NUMPADSUB hotkey to stop recording, go through the compress archive script which I have written and then send NUMPADMULT to OBS to restart recording.
$psVersionTable output:
Can you assign Connect-OBS to a variable, and then pipe it to Receive-Job -Keep
?
Get-OBSHotKey is working for me.
My best guess is something wrong during connection.
Just got a connection:
And I can see it successfully on OBS:
I will be trying to send hotkeys now. I will keep you updated
Unbelievable! I managed to get it to work!
Recording started and stopped as required. You have no idea how happy I am. I am very grateful for your help and support, and I truly appreciate your work. You have made my life a million times easier.
Issue closed!!
I have just upgraded to PowerShell 7 to run this package however when I run the following Install-Module obs-powershell -Scope CurrentUser -Force to install it I am getting this error.
WARNING: The version '2.0.3' of module 'ThreadJob' is currently in use. Retry the operation after closing the applications.
I have closed everything, restarted my PC and this above error is still showing up.
Running Import-Module obs-powershell -PassThru -Force seems to be functioning properly
However Connect-OBS -WebSocketToken $myToken yields a "Cannot index into a null array" error
I run Get-OBSHotKey command it show me a MethodInvocationException: C:\Users\kevin\Documents\Powershell\Modules\obs-powershell\0.1.9\Commands\Send-OBS.ps1:151 with further details of Exception calling "SendAsync" with "4" argument(s): "Cannot access a disposed object. Object name: 'System.Net.WebSockets.ClientWebSocket'."
Can someone please help me with installing this package as it would help me immensely and I have been stuck on this for days now and I have searched multiple forums but I can't find anything