logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
cutter07  
#1 Posted : Thursday, August 12, 2021 4:44:19 PM(UTC)
cutter07

Rank: Advanced Member

Groups: Registered
Joined: 6/2/2012(UTC)
Posts: 103
Man
Location: Germany

Thanks: 13 times
Was thanked: 10 time(s) in 9 post(s)
Is there a way run a script when vMix starts?
richardgatarski  
#2 Posted : Thursday, August 12, 2021 5:44:41 PM(UTC)
richardgatarski

Rank: Advanced Member

Groups: Registered
Joined: 2/18/2014(UTC)
Posts: 1,837
Location: Stockholm

Thanks: 144 times
Was thanked: 297 time(s) in 250 post(s)
No, but there is at least one feature request to activate a shortcut or similar when vMix is started. Search for it in the Feature Request Forum.
cutter07  
#3 Posted : Thursday, August 12, 2021 5:57:29 PM(UTC)
cutter07

Rank: Advanced Member

Groups: Registered
Joined: 6/2/2012(UTC)
Posts: 103
Man
Location: Germany

Thanks: 13 times
Was thanked: 10 time(s) in 9 post(s)
Ok, thanks.
doggy  
#4 Posted : Thursday, August 12, 2021 6:53:50 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,218
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
cutter07  
#5 Posted : Thursday, August 12, 2021 7:38:53 PM(UTC)
cutter07

Rank: Advanced Member

Groups: Registered
Joined: 6/2/2012(UTC)
Posts: 103
Man
Location: Germany

Thanks: 13 times
Was thanked: 10 time(s) in 9 post(s)
I thought maybe there is another possibility in "vMix" by now.

I did something like that some time ago. I have found it again.
Check with "Autohotkey" whether "vMix" has been started, then execute a shortcut in vMix with "Send".

Autostart Batch:
Code:
echo off
start C:\Apps\10_Streaming\10_Settings\10_Automation\vMix-start.ahk
start C:\Apps\10_Streaming\10_Settings\12_Preset\Gottesdienst.vmix


Autohotkey script:
Code:
WinWait ahk_exe vMix64.exe,
SetTitleMatchMode, 2
WinWait, .vmix, 	
IfWinNotActive, .vmix, , WinActivate, .vmix, 
	WinWaitActive, .vmix,
	Send,{F8}
doggy  
#6 Posted : Thursday, August 12, 2021 9:14:28 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,218
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: cutter07 Go to Quoted Post
I thought maybe there is another possibility in "vMix" by now.

I did something like that some time ago. I have found it again.
Check with "Autohotkey" whether "vMix" has been started, then execute a shortcut in vMix with "Send".



What say if a preset is not fully loaded yet ?
cutter07  
#7 Posted : Thursday, August 12, 2021 9:26:04 PM(UTC)
cutter07

Rank: Advanced Member

Groups: Registered
Joined: 6/2/2012(UTC)
Posts: 103
Man
Location: Germany

Thanks: 13 times
Was thanked: 10 time(s) in 9 post(s)
Good question... I don't know.
For me it worked like that, because it was a small preset, I think.
cutter07  
#8 Posted : Thursday, August 12, 2021 9:29:56 PM(UTC)
cutter07

Rank: Advanced Member

Groups: Registered
Joined: 6/2/2012(UTC)
Posts: 103
Man
Location: Germany

Thanks: 13 times
Was thanked: 10 time(s) in 9 post(s)
The only thing I did after the start was to change the category to red. Presumably this also works without a completely loaded preset.
apocnz  
#9 Posted : Thursday, August 12, 2021 11:32:29 PM(UTC)
apocnz

Rank: Member

Groups: Registered
Joined: 9/17/2015(UTC)
Posts: 15
Location: Perth

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
I do this by having a browser input in the preset that taps the http api (ScriptStart). Does the job.
thanks 1 user thanked apocnz for this useful post.
doggy on 8/13/2021(UTC)
cutter07  
#10 Posted : Friday, August 13, 2021 12:07:24 AM(UTC)
cutter07

Rank: Advanced Member

Groups: Registered
Joined: 6/2/2012(UTC)
Posts: 103
Man
Location: Germany

Thanks: 13 times
Was thanked: 10 time(s) in 9 post(s)
@ apocnz: Ingenious, that's better than my first approach:

A little lateral thinking. If one plays an audio file with -18db in a loop and thus saves the "preset", the audio file is played automatically after reopening the "preset". If you now set a "trigger" in the audio file "OnAudioMeterDB18 -> SelectCategory", the category is automatically changed after the start of the "preset". Whether this makes sense is open to question.
cutter07  
#11 Posted : Friday, August 13, 2021 1:42:31 AM(UTC)
cutter07

Rank: Advanced Member

Groups: Registered
Joined: 6/2/2012(UTC)
Posts: 103
Man
Location: Germany

Thanks: 13 times
Was thanked: 10 time(s) in 9 post(s)
Originally Posted by: apocnz Go to Quoted Post
I do this by having a browser input in the preset that taps the http api (ScriptStart). Does the job.


Could you post an example HTML?
doggy  
#12 Posted : Friday, August 13, 2021 2:51:22 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,218
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: cutter07 Go to Quoted Post
Originally Posted by: apocnz Go to Quoted Post
I do this by having a browser input in the preset that taps the http api (ScriptStart). Does the job.


Could you post an example HTML?


browser input with URL http://localhost:8088/api/?Function=ScriptStart&Value=Script164 for example or any other function (see helpfiles)

For use when starting from a preset
cutter07  
#13 Posted : Friday, August 13, 2021 4:54:37 AM(UTC)
cutter07

Rank: Advanced Member

Groups: Registered
Joined: 6/2/2012(UTC)
Posts: 103
Man
Location: Germany

Thanks: 13 times
Was thanked: 10 time(s) in 9 post(s)
Okay thanks. I thought I had to create a HTML page which automatically executes this link :-)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.