Splasm Software Discussions

a user community for the betterment of Splasmkind
It is currently Sat Sep 21, 2019 10:47 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Wed Nov 04, 2009 11:43 am 
Offline

Joined: Wed Nov 04, 2009 11:36 am
Posts: 4
I'm trying to work out a command line to get ViddyUp to process a file. I've installed CommandRunner in Vuze, and I'm trying to wire up the completed download to ViddyUp's processing. Then I can skip one more manual process.

I've successfully launched ViddyUp and opened a source file with this command:

/Applications/ViddyUp\!\ 1.8.4/ViddyUp\!.app/Contents/MacOS/ViddyUp\! /Volumes/Jester/Users/admin/Movies/mymovie.avi

.. which launches VU, and opens mymovie.avi.

However, I can't figure out how to trigger the processing. (I'd also like to change the Genre, and maybe even Quality).

Is there a command line switch that will engage the processing and perhaps set those 2 parameters?

thanks in advance.


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 06, 2009 4:20 pm 
Offline
Administrator
Administrator
User avatar

Joined: Wed May 18, 2005 11:19 pm
Posts: 532
Location: Here and There
ViddyUp! doesn't take arguments from the command line and it doesn't officially support AppleScript - but you can use AppleScript to script System Events to automate ViddyUp!'s interface, just like with most Mac OS X apps. Go to the Universal Access preferences in System Preferences and put a checkmark next to "Enable access for assistive devices", then use a tool like UIElementInspector to figure out how to access each interface element in ViddyUp!. Put it together in AppleScript Editor and see what happens.

Here's a quick test I did just to see if I could tell ViddyUp! to open a particular file, modify the Quality and Genre and start processing:

tell application "ViddyUp!"

open "/Users/keithg/Movies/5th element clip.mov"

end tell


tell application "System Events"

set the value of slider 1 of group 1 of window 1 of process "ViddyUp!" to 1 --Quality (Good is 0, Better is 1, Best is 2)

set the value of combo box 1 of group 1 of window 1 of process "ViddyUp!" to "Another Genre"

click button "Process" of group 1 of window 1 of process "ViddyUp!"

end tell


Looks like it works pretty well, unless you have ViddyUp! set to ask for an output location before processing... In your case you'll want to find a way to wire up the path of your latest download as an argument to the script. If you're going to do a lot of this you'll probably want to code a way to wait and dismiss the message that comes up at the end of the process. You can get UIElementInspector at http://developer.apple.com/mac/library/ ... index.html . Good luck!

_________________
Keith Gugliotto
Primordial Sea Captain
Splasm Software
http://www.splasm.com

Follow us on Twitter!


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 07, 2009 1:26 pm 
Offline

Joined: Wed Nov 04, 2009 11:36 am
Posts: 4
thanks, Keith, that's awesome information. I didn't realize I could script the UI this way.

say, I haven't quite got the hang of setting the Encoding popup... I tried a lot of variations of this to no avail:

set the menu of menu 1 of pop up button 1 of group 1 of window 1 of process "ViddyUp!" to "Original Encoding"

any ideas?

thanks again, this is really quite cool. not sure if UI scripting is predictable enough to use on my server scripts, but it does a great job of filling in some glue for some of my personal scripting.

thanks for all the helpful info!
cam


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 09, 2009 2:52 pm 
Offline
Administrator
Administrator
User avatar

Joined: Wed May 18, 2005 11:19 pm
Posts: 532
Location: Here and There
Popup buttons seem a little tricky...try this:

click pop up button 1 of group 1 of window 1 of process "ViddyUp!"

click menu item "Original Encoding" of menu 1 of pop up button 1 of group 1 of window 1 of process "ViddyUp!"

_________________
Keith Gugliotto
Primordial Sea Captain
Splasm Software
http://www.splasm.com

Follow us on Twitter!


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 09, 2009 4:26 pm 
Offline

Joined: Wed Nov 04, 2009 11:36 am
Posts: 4
close but no cigar... the final step doesn't work for me:

select menu item "Original Encoding" of menu 1 of pop up button 1 of group 1 of window 1 of process "ViddyUp!"

System Events got an error: Can’t get menu 1 of pop up button 1 of group 1 of window 1 of process "ViddyUp!". Invalid index.

If I drop the menu index, it doesn't crash, but it doesn't change the popup either:

select menu item "Original Encoding" of menu of pop up button 1 of group 1 of window 1 of process "ViddyUp!"


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 09, 2009 4:37 pm 
Offline
Administrator
Administrator
User avatar

Joined: Wed May 18, 2005 11:19 pm
Posts: 532
Location: Here and There
Try it with "click" instead of "select".

_________________
Keith Gugliotto
Primordial Sea Captain
Splasm Software
http://www.splasm.com

Follow us on Twitter!


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 11, 2009 1:41 pm 
Offline

Joined: Wed Nov 04, 2009 11:36 am
Posts: 4
good idea... the click command doesn't blow up, but it doesn't select the item, either. :(

so close. thanks.


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 11, 2009 2:41 pm 
Offline
Administrator
Administrator
User avatar

Joined: Wed May 18, 2005 11:19 pm
Posts: 532
Location: Here and There
Just tested again to be sure and this is working on my Mac:

tell application "System Events"

click pop up button 1 of group 1 of window 1 of process "ViddyUp!"

click menu item "Original Encoding" of menu 1 of pop up button 1 of group 1 of window 1 of process "ViddyUp!"

end tell

Is that what you have in your test there?

_________________
Keith Gugliotto
Primordial Sea Captain
Splasm Software
http://www.splasm.com

Follow us on Twitter!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 4 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:  
cron
Powered by phpBB® Forum Software © phpBB Group