Controlling the ATME Software Control Panel Display

11 posts / 0 new
Last post
Offline

Location

Bethlehem
United States
Joined: 07/03/2013
Posts: 26
Controlling the ATME Software Control Panel Display

It's been a few years since I did any work with my ATEM... Job change. 

Dug out the ATEM TVS and recently got the TVS HD.  Quickly realized how much I relied upon JM when I did use it.

I scoured the forum and couldn't find an answer. Maybe it's not possible (I find that hard to believe as John seems to always find a way!)   I was wondering if there is any way to control the BlackMagic software from JM.  All I want to be able to do is change the tab that is currently displayed:  i.e. Change from Switcher to Media to Audio to Camera.)  I typically leave the BMD Software running on my PC so I can visually see what is happening. 

I managed to get scripts setup to do just about everything I need to do with my new ATEM TVS HD.  I have a mini computer I plan on mounting on a rack tray to make this really portable.  I'd like to be able to run a gig without needing a keyboard or mouse on my desk... just my XKEYS.  The only thing I need to be able to figure out is a way to get the BlackMagic Software to show that different tab.  Simply being able to confirm that I have the right media in my bins, or to confirm the mute or audio level status visually.   

John,

 ​Even though I'm but a humble youtube streamer... I'm getting a registration out today.  Thanks for all of your work.  I, like many, couldn't do this without JustMacros!

-Brian

 

 

imorrish's picture
Offline

Location

Wellington
New Zealand
Joined: 05/01/2015
Posts: 90
Can do it easily with

Can do it easily with PowerShell.

paste this line into PowerShell ISE to get the cursor location of each tab

[System.Windows.Forms.Cursor]::Position

(with cursor blinking on the powershell code line, move the mouse to desired location and press F8)

You can then use this PowerShell function to initiate the mouse click https://gist.github.com/imorrish/42508c9e324f78e85aeedbe6e5c89740

Can probably call the PowerShell from JustMAcros (or any other number of .exe apps that might be able to do the same thing).

 

 

Offline

Location

Bethlehem
United States
Joined: 07/03/2013
Posts: 26
I'm obviously missing

I'm obviously missing something important in Justmacros as far as calling the powershell script correctly.  I did find that I needed to enable scripts to run by entering "set-executionpolicy remotesigned" in the ISE

I did run the command and got the right coordinate.  

I copied and saved the script with proper coordinates entered.  I can run that from Powershell ISE and it makes the click and the tab changes.

I can run it from the command prompt with the following and it executes and makes the 'mouse click':

powershell -command "C:\Users\Admin\Desktop\JustMacros\Powershell\MouseClick.ps1"

I've tried just about every way of calling it I can imagine.  I'm thinking there must be a problem with passing the quotes correctly, but I just can't seem to get it right.  
 

I've tried 

TaskManGKSCWinExecMin( [[C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -command "C:\\Users\\Admin\\Desktop\\JustMacros\\Powershell\\MouseClick.ps1"]]);

TaskManGKSCWinExecMin( 'C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -command "C:\\Users\\Admin\\Desktop\\JustMacros\\Powershell\\MouseClick.ps1"');

I must be missing something obvious in sending the proper command out, and I'm sure it must have something to do with the quoting of the command script... but I just cant find it.  

imorrish's picture
Offline

Location

Wellington
New Zealand
Joined: 05/01/2015
Posts: 90
Command should just

Command should just be...

 

TaskManGKSCWinMin("PowerShell -command c:\\path_toYourScript\\MouseClicks.ps1");

Offline

Location

Bethlehem
United States
Joined: 07/03/2013
Posts: 26
Tried it that way.  Tried

Tried it that way.  Tried with the script quoted.  Tried it not quoted.  No matter what I seem to do it doesn't seem to work from JustMacros.  
I'm thinking it's not passing the script parameter correctly, but I can't see why.  

I ran it from  TaskManGKSCWinExec so as to not run minimized, and I can see Powershell with red text, but it passes so fast I can't read what it says.  

Unfortunately the machine running JustMacros isn't hooked to a my mixer to be recorded as it has no HDMI output... just MiniDP which I don't have a cable for.  

I'm just running out of ways to try and debug this.   I guess I'll need to do this when I have some cameras hooked up and can record it.  

 

 

imorrish's picture
Offline

Location

Wellington
New Zealand
Joined: 05/01/2015
Posts: 90
I tested it and works for me.

I tested it and works for me. I put a start-sleep 5 in the script to keep the minimized window there for a few seconds.

Or put Pause stament on last line of script which will keep powershell host running.

Offline

Location

Bethlehem
United States
Joined: 07/03/2013
Posts: 26
I already tried putting the

I already tried putting the Pause in my script...  It never stops, which is why I am really trying to figure out why the command isn't getting passed properly from Lua.  

I even moved my script to the root of USB Flash so it will be in D:\

 

TaskManGKSCWinExecMin( "powershell.exe -command  D:\\MouseClick.ps1");

 

Same result.  I see Powershell opening but closes and never pauses.   It tells me that something isn't escaping properly but I just don't know why.  I copy the command out JustMacros into a CMD window, paste it it, delete the extra \ after D:\   Hit Enter Runs.  Mouse click applied.  Just as expected.    

 

 

imorrish's picture
Offline

Location

Wellington
New Zealand
Joined: 05/01/2015
Posts: 90
Sorry, you also have to

Sorry, you also have to do

set-executionpolicy -remotesigned

from a powershell console window which is launched with "Run as Administrator". This is a different setting than the ISE policy.

Then it should work.

Offline

Location

Bethlehem
United States
Joined: 07/03/2013
Posts: 26
YAY!!! This works now.  I

YAY!!! This works now. 
I needed to remove the extra dash before remotesigned to get the following to run on my machine.

set-executionpolicy remotesigned

Now I have a set of 4 keys on XK80 that let me switch the BMD Control to different tabs for visual confirmation of settings without needing to touch a mouse. 

 

JohnBengston's picture
Offline

Location

London
United Kingdom
Joined: 14/01/2012
Posts: 2145
Thanks Ian, and congrats

Thanks Ian, and congrats Brian, There is a pure JM way to do it, but you've got a working solution, so why bother doing it again.

Offline

Location

Münster
Germany
Joined: 15/09/2017
Posts: 14
@JohnBengston can you provide

@JohnBengston can you provide a hint for the JM internal way of switching ATEM Control Panel Tabs ?

 

I very often check the MediaTab AudioTab and then return back to the Main Tab, hence having Buttons would be nice :)

Also to bring it back to the Top, sometimes would be helpfull as well :)