N0VEMBER

Trying to send start and stop command to OBS without the window popping up

16 posts in this topic

#1 ·  Posted

I'm new to this whole thing and am having trouble figuring out how to record videos without OBS popping up when being sent a command. what I have for that part of the script so far is

 

WinActivate("OBS")

Send("{=}")

Sleep(12000)

Send("{-}")

Sleep(250)

Super simple cause I'm new but it works except for this one part .The keys "=" and "-" are just the hotkeys I selected for recording and the times are just random times, not final. All I want to do is send a command to play the video in full screen and then send the command to OBS to record and stop recording without having the big window pop up over the video I'm trying to record.

Share this post


Link to post
Share on other sites



#2 ·  Posted

Moved to the correct forum, as the Dev Forum very clearly states:

Quote

Do not create AutoIt-related topics here, use the AutoIt General Help and Support

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted

Is there a reason you can't just use the built-in OBS hotkeys? I feel like they would have background hotkeys implemented at this point.


UHJvZmVzc2lvbmFsIENvbXB1dGVyZXI=

Share this post


Link to post
Share on other sites

#4 ·  Posted

The OBS hotkeys from what I can tell don't have that function yet

Share this post


Link to post
Share on other sites

#5 ·  Posted

45 minutes ago, N0VEMBER said:

The OBS hotkeys from what I can tell don't have that function yet

I just downloaded the newest OBS Studio to test it. If you go to File->Settings->Hotkeys and set hotkeys for start and stop recording, it works fine even when the OBS window is in the background. Have you tried that?


UHJvZmVzc2lvbmFsIENvbXB1dGVyZXI=

Share this post


Link to post
Share on other sites

#6 ·  Posted

When I run the script the OBS screen will come to the for ground still, the hot keys work fine when not running Autoit. Is it maybe the WinActivate command I'm using?

Share this post


Link to post
Share on other sites

#7 ·  Posted

Yes, that would make sense. Try it without the WinActivate.

Share this post


Link to post
Share on other sites

#8 ·  Posted

still nothing, I tried a couple different commands to no avail. I'm not sure which command to use for this. There has to be some way to run everything in the background.

Share this post


Link to post
Share on other sites

#9 ·  Posted

Have you looked into ControlSend()?

https://www.autoitscript.com/autoit3/docs/functions/ControlSend.htm

If you just get the window with Au3Info you should be able to send commands to the control while it is not active. I don't think you can use normal Send() unless the window is active, which is not what you want.


UHJvZmVzc2lvbmFsIENvbXB1dGVyZXI=

Share this post


Link to post
Share on other sites

#10 ·  Posted

I tried controlsend and it is not working still. Sorry for late reply on forum.

Share this post


Link to post
Share on other sites

#11 ·  Posted

1 hour ago, N0VEMBER said:

I tried controlsend and it is not working still. Sorry for late reply on forum.

Show us your code so that we can see what you tried.

Share this post


Link to post
Share on other sites

#12 ·  Posted

My code is at the top. That's the half that doesn't work.

Share this post


Link to post
Share on other sites

#13 ·  Posted

 

2 hours ago, N0VEMBER said:

My code is at the top. That's the half that doesn't work.

That code doesn't use ControlSend. Telling us something doesn't work without providing any additional details doesn't really get you any closing to finding a solution.

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

you would just have to replace WinActivate with controlsend right? Cause that's what I did.

Edited by N0VEMBER

Share this post


Link to post
Share on other sites

#15 ·  Posted

6 hours ago, N0VEMBER said:

you would just have to replace WinActivate with controlsend right? Cause that's what I did.

No, which explains why it didn't work for you.

Share this post


Link to post
Share on other sites

#16 ·  Posted

Well I'm running duel monitors which worked that problem out but now there's a new one. This is my code

WinActivate("widowsmediaplayer")

MouseClick("Left",975,653)

sleep(100)

MouseClick("left",133,611)

sleep(100)

MouseMove(2355,704)

WinActivate("OBS")

Send("{=}")

Sleep(1260000)

send("{-}")

I'm getting "/ErrorStdOut" and instead of recording for the 21 minutes it will recorde three minutes. I'm trying to get it to recorde for 21 minutes and then hopefully be able to make it do that process continuously 21 times or however many times I tell it to but it doesn't even want to do it once. I am a noob so the obvious isn't obvious to me with this whole thing.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now