Page 1 of 1

send macro to ATEM Television Studio HD?

PostPosted: Fri Aug 04, 2017 3:27 pm
by Günter Trojan
Hello!
Is it possible to send macros (XML terms edited in atem Software control) without this Interface?
Or is it only possible when i learn c++ ?
In other words: how can i send over the Network commands to ATEM Television Studio HD?
Thank you

Re: send macro to ATEM Television Studio HD?

PostPosted: Fri Aug 04, 2017 4:08 pm
by Pavel Lavrov
Have you looked into JustMacros ?
Really nice software, use it all the time.


Sent from my iPhone using Tapatalk Pro

Re: send macro to ATEM Television Studio HD?

PostPosted: Fri Aug 04, 2017 6:27 pm
by Jack Fairley
The Powershell modules from Ian Morrish are probably an option too.

Re: send macro to ATEM Television Studio HD?

PostPosted: Fri Aug 04, 2017 7:05 pm
by Ian Morrish
Pavel Lavrov wrote:Have you looked into JustMacros ?
Really nice software, use it all the time.


Sent from my iPhone using Tapatalk Pro
You can also use Windows PowerShell to send commands to ATEM using https://ianmorrish.wordpress.com

Sent from my SM-G950F using Tapatalk

Re: send macro to ATEM Television Studio HD?

PostPosted: Fri Aug 04, 2017 10:12 pm
by Günter Trojan
wow!
this opens worlds for me!
will check this with my testsystem on monday :o :D

Re: send macro to ATEM Television Studio HD?

PostPosted: Tue Aug 08, 2017 8:21 am
by Günter Trojan
Thank you very much for this hints, but this doesnt work for me.
I have a user Interface written in AutoHotKey an therefore i must start the processes in ATEM with command-lines.
In JustMacros i must run Justmacros as admin - if not, the macros doesnt work...
AND:
I cant start Macros from JustMacros from the commandline - or is there any possibility?
@ianmorrish:
this way should work, but i cant include switherlib.dll in powershell - it seems to be a wrong Version (i have win7 and powershell 1.0)

has anyone a idea how to start macros (stored on ATEM) from the command line?
thank you so much for hints:-)

Re: send macro to ATEM Television Studio HD?

PostPosted: Tue Aug 08, 2017 7:41 pm
by Ian Morrish
Hi, you should certainly upgrade PowerShell (it is always in a v1 directory but probably v3. Get-Host command will confirm this)
To use PowerShell with switcherlib, you should follow these steps https://ianmorrish.wordpress.com/powershell/

You also have to check the DLL is not blocked by right clicking on it and selecting properties (see unblock button).
Then it would be a simple script to run a macro

add-type -path 'C:\Users\[your directory]\Source\Workspaces\VISE_ATEMLib\SwitcherLib\bin\Debug\SwitcherLib.dll'
$Global:atem = New-Object SwitcherLib.Switcher("192.168.1.240")
$atem.Connect()
$atem.RunMacro(5) #starts from 0 so this is macro in position 6

If this works then I can help you change the script to take command line parameter for the macro number you wish to run and not use ISE.

Re: send macro to ATEM Television Studio HD?

PostPosted: Wed Aug 09, 2017 3:44 pm
by Günter Trojan
Dear Ian,
THANK YOU, thank you, thank you...
it works.
I have updated powershell to Version 4 (higher Versions are not really working for win7 without rebuilt system - then it is much better to upgrade to win 1o... :D )
...and your switcherlib.ddl works without failure-messages
the macro runs!
Am i right when i call this with:
powershell -file [mypath]\[mymacrofile].ps1
as commandstring?
yours sincerely gt

Re: send macro to ATEM Television Studio HD?

PostPosted: Wed Aug 09, 2017 4:26 pm
by Günter Trojan
the commandline works, but the macro will not always start.
i think, the Connection to atem will not always established...

Re: send macro to ATEM Television Studio HD?

PostPosted: Wed Aug 09, 2017 8:24 pm
by Ian Morrish
I have not had issues with connection in the past but I should put some better detection of dropped connection.
It was developed with the assumption that the PowerShell runspace would be active for long periods of time and relies on .Net cleanup when the object is destroyed (when PowerShell exits).
I should add a disconnect method to be safe.

I have also created a few .exe utilities that use switcherlib for command line use, such as an Aux port switcher, so it might be better for me to create a runmacro.exe for this purpose. Will be a couple of days before I can do that.