Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 12:34 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Keystroke
PostPosted: September 18th, 2019, 2:33 pm 
Offline

Joined: May 16th, 2008, 4:50 pm
Posts: 368
Location: Berghem The Netherlands
Opus: Opus Pro 9.75
OS: Windows 10
System: `HP
Hi,
I have an ATEM video switcher that can be controlled by the keys of the computer keyboard.
Now i want to make a program to log the keystrokes and the possibility to play it back.

Is there a way to do that?

_________________
Opus Pro v9.75
Windows 10 on HP EliteBook i7
http://www.csnmedia.nl


Top
 Profile Visit website  
 
 Post subject: Re: Keystroke
PostPosted: September 21st, 2019, 12:42 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
If you're only checking a few key strokes, then it might be easier to use the Opus actions but if they don't do what you need then you can register your own event handler:

Code:
var myEvent = this.RegisterEventHandler("keypress", this.keyCheck)


This causes an event to fire whenever a key is pressed. The event calls the function named - 'keyCheck' so you'll have to define that to do something:

Code:
function keyCheck(e) {
var keycode = e.key;
Debug.trace(keycode);
}


This function receives the event as 'e' and from that extracts the key that was pressed and stores the value in the 'keycode' variable.

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Keystroke
PostPosted: September 22nd, 2019, 7:05 am 
Offline

Joined: May 16th, 2008, 4:50 pm
Posts: 368
Location: Berghem The Netherlands
Opus: Opus Pro 9.75
OS: Windows 10
System: `HP
Thanks Mac,
I found this function on the script help page but didn't get it work.
The recorded keystroke must control an external device when play back. With this function
it writes the recorded in a variable... am i right, or not smart enough?

Kind Regards,
Ad

_________________
Opus Pro v9.75
Windows 10 on HP EliteBook i7
http://www.csnmedia.nl


Top
 Profile Visit website  
 
 Post subject: Re: Keystroke
PostPosted: September 22nd, 2019, 11:06 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Does your Opus application control the external device already?

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Keystroke
PostPosted: September 24th, 2019, 8:46 pm 
Offline

Joined: May 16th, 2008, 4:50 pm
Posts: 368
Location: Berghem The Netherlands
Opus: Opus Pro 9.75
OS: Windows 10
System: `HP
Hi Mac,
No, not yet.

What i like to make is a program as CuePilot. That is a very expensive piece of software to control high end broadcast switchers.
A lot of people use the popular ATEM video switcher and therefor i like to make a kind of automation.
This is a video of CuePilot works. You can download a full version to play with but it can't control a switcher.
https://www.youtube.com/watch?v=GTZDn1BwVuQ

This is the website of CuePilot
https://www.cuepilot.com/

_________________
Opus Pro v9.75
Windows 10 on HP EliteBook i7
http://www.csnmedia.nl


Top
 Profile Visit website  
 
 Post subject: Re: Keystroke
PostPosted: September 25th, 2019, 8:46 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Opus doesn't include that sort of functionality directly.

It supports, if you can source or write one, DLLs that would allow simulating of key presses and communication with external hardware.

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Keystroke
PostPosted: September 26th, 2019, 11:34 am 
Offline

Joined: May 16th, 2008, 4:50 pm
Posts: 368
Location: Berghem The Netherlands
Opus: Opus Pro 9.75
OS: Windows 10
System: `HP
So i need a DLL. Or write one...

_________________
Opus Pro v9.75
Windows 10 on HP EliteBook i7
http://www.csnmedia.nl


Top
 Profile Visit website  
 
 Post subject: Re: Keystroke
PostPosted: September 26th, 2019, 5:20 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Yes A or B should do :-)

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Keystroke
PostPosted: September 28th, 2019, 6:46 am 
Offline

Joined: May 16th, 2008, 4:50 pm
Posts: 368
Location: Berghem The Netherlands
Opus: Opus Pro 9.75
OS: Windows 10
System: `HP
Hi Mack
Do you have a dll solution in your magic toolkit?
My skills are not that good enough to make it myself.

_________________
Opus Pro v9.75
Windows 10 on HP EliteBook i7
http://www.csnmedia.nl


Top
 Profile Visit website  
 
 Post subject: Re: Keystroke
PostPosted: September 30th, 2019, 9:25 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Sorry, but the DLL hasn't been touched since the last update in 2017 when I added the latest round of features and Uno support.

If I can find some time and recall how the process works, I may be able to add a sendkeys function but direct access to an external device would require more specific understand that I don't have.

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


For this message mackavi has been thanked by : Ad Mulders


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group