Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Hardware - Troubleshooting and Discussion > Consumer Hardware & Components > Formac Studio TVR & Applescript

Formac Studio TVR & Applescript
Thread Tools
Mac Elite
Join Date: Oct 2001
Location: Internet
Status: Offline
Reply With Quote
Aug 14, 2003, 11:38 AM
 
Can I controll the Studio TVR with Applescript? For example I want to be able to play and pause live video with Applescript?

MacBook Air 11" 1.6Ghz 4GB 128GB Backlit Keyboard, 4S, iPad 2
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Aug 14, 2003, 12:24 PM
 
That sig is quite annoying, I clicked it twice

Yes, it is scriptable, see the example scripts folder and the app's dictionary.

I don't know about pausing live video.



Code:
Class application: Formac StudioTVR's top level scripting object. Plural form: applications Elements: document by name, by numeric index, before/after another element, as a range of elements, satisfying a test document by name, by numeric index, before/after another element, as a range of elements, satisfying a test window by name, by numeric index, before/after another element, as a range of elements, satisfying a test, by ID Properties: <Inheritance> application [r/o] -- All of the properties of the superclass. Class document: A StudioTVR document. Plural form: documents Elements: studioTVRTuner by numeric index, before/after another element, as a range of elements, satisfying a test Properties: <Inheritance> document [r/o] -- All of the properties of the superclass. Class studioTVRTuner: A StudioTVRTuner. This abstract class represents the basic tuner in StudioTVR Plural form: studioTVRTuners Properties: <Inheritance> item [r/o] -- All of the properties of the superclass. channel List list -- The valid channel List. channel Name Unicode text -- The name of the current channel. NextRecMovieName Unicode text -- The name of next recorded movie. RecordMovieWithTime integer -- Captures a Movie with the length of seconds video Dimension integer -- The relative dimension of the video display (0.15 to 1.0). InsertScheduleEntry list -- Schedules a Recording: {'ChannelName', 'RecMovieName', StartDate, StopDate} channel Index integer -- The index of the current channel.
     
hadocon  (op)
Mac Elite
Join Date: Oct 2001
Location: Internet
Status: Offline
Reply With Quote
Aug 14, 2003, 12:31 PM
 
Originally posted by Diggory Laycock:
That sig is quite annoying, I clicked it twice

Yes, it is scriptable, see the example scripts folder and the app's dictionary.

I don't know about pausing live video.
Ha ha! perhaps I should put a link on my sig to a page showing how many peole I have tricked...

Anyways, thanx for the info.

Is there anyone out there that has a Formac Studio TVR? If I can't script PLAY/PAUSE I have no use for it... The Studio TVR has the ability to pause live TV right?

MacBook Air 11" 1.6Ghz 4GB 128GB Backlit Keyboard, 4S, iPad 2
     
Forum Regular
Join Date: Mar 2002
Location: Sri Lanka
Status: Offline
Reply With Quote
Aug 14, 2003, 02:24 PM
 
I don't understand why you would want to use applescript to pause the video. You can schedule recordings, wouldn't that accomplish the same thing?
     
hadocon  (op)
Mac Elite
Join Date: Oct 2001
Location: Internet
Status: Offline
Reply With Quote
Aug 14, 2003, 02:31 PM
 
Originally posted by biscool:
I don't understand why you would want to use applescript to pause the video. You can schedule recordings, wouldn't that accomplish the same thing?
I am working on some projects for the human media lab. One of the projects requires that I have this ability. Basically I want the live video to pause on an event and resume on another event. To do this easily I need Applescript-ability of these features.

MacBook Air 11" 1.6Ghz 4GB 128GB Backlit Keyboard, 4S, iPad 2
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Aug 15, 2003, 04:51 AM
 
Well - the play/pause feature is not exposed in AS.

However - you could possibly implement it via AppleScript UI Scripting (requires a beta install from Apple)

The Play/Pause button is in the window's ToolBar - so I should imagine that it can be pressed via AS UI Scripting.

I'll check on this later - (my Formac is not currently attached to the machine with UI Scripting on.)
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Aug 15, 2003, 07:48 AM
 
Just got this to work (requires UI Scripting Beta from Apple and "Enable Access for Assistive Devices" enabled in the "Universal Access" prefpane)


Code:
tell application "Formac StudioTVR" activate end tell tell application "System Events" tell process "Formac StudioTVR" tell window "Formac StudioTVR 3" tell tool bar 1 tell group 2 tell button 1 click end tell end tell end tell end tell end tell end tell
p.s. I'm not sure if it works if I have my formac toolbar setup differently to yours.
     
hadocon  (op)
Mac Elite
Join Date: Oct 2001
Location: Internet
Status: Offline
Reply With Quote
Aug 15, 2003, 01:43 PM
 
Originally posted by Diggory Laycock:
Just got this to work (requires UI Scripting Beta from Apple and "Enable Access for Assistive Devices" enabled in the "Universal Access" prefpane)

Hey, thanx! I dont have a Studio TVR, and probably wont have one for a few months yet. I still need to convince my advisor to buy one for the lab... I am not guru with Applescipt - but what you wrote will accomplish what I need?

MacBook Air 11" 1.6Ghz 4GB 128GB Backlit Keyboard, 4S, iPad 2
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Aug 16, 2003, 03:48 AM
 
Originally posted by hadocon:
Hey, thanx! I dont have a Studio TVR, and probably wont have one for a few months yet. I still need to convince my advisor to buy one for the lab... I am not guru with Applescipt - but what you wrote will accomplish what I need?
I didn't test it completely - but upon running the script on my system - caused the TVR app to behave as if you had pressed the pause button.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:12 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2