- Posts: 2
- Joined: Thu Feb 25, 2016 2:02 am
Hi John,
Like you I'm not a programmer but struggling to build a library so I can automate ATM from Windows PowerShell. (https://github.com/imorrish/atemlib which I branched from another project to get me started)
Just started trying to add macro support, so far to get existing macros ,I have deduced from the API...
public uint GetMacroCount()
{
this.Connect();
uint macroCount;
IBMDSwitcherMacroPool switcherMacroPool = (IBMDSwitcherMacroPool)this.switcher;
switcherMacroPool.GetMaxCount(out macroCount);
return macroCount;
}
public string GetMacro(uint index)
{
this.Connect();
string macroName;
IBMDSwitcherMacroPool switcherMacroPool = (IBMDSwitcherMacroPool)this.switcher;
switcherMacroPool.GetDescription(index, out macroName);
return macroName;
}
Don't have access to an ATEM to try this until the weekend but always complicated getting callback defined but basics for run should be...
public int RunMacro(uint index)
{
this.Connect();
IBMDSwitcherMacroControl switcherMacroControl = (IBMDSwitcherMacroControl)this.switcher;
switcherMacroControl.Run(index);