Welcome, Guest. Please login or register.
September 09, 2010, 10:45:49 AM
Home Help Search Login Register
News: QuipTracks.com | "Dragonball Evolution" now available! | Look for us on Facebook! | Check out QuipTracks: The Blog! | A  stream of funny: QuipTracks: the Twit!

+  QuipTracks
|-+  Support
| |-+  Appletini Town (Moderator: monkeyplusplus)
| | |-+  Adventures in Applescripting
« previous next »
Pages: [1] Print
Author Topic: Adventures in Applescripting  (Read 637 times)
monkeyplusplus
Moderator
Electrical-powered bastard
*****
Posts: 3



View Profile WWW
« on: November 13, 2008, 10:23:07 AM »

For those who care to give it a whirl, I hacked together a little applescript for helping to sync a QuipTrack with a movie file.

Warning:
1. It's a total hack job. I'm not really any good at applescript, but it seems to work on my mac.
2. It assumes that two files are open - one being the QuipTrack, and the other being a movie file. I use handbrake to create the movie file.

Here's how to use it:
1. Open the two files in Quicktime.
2. Bring the QuipTrack mp3 to the front (make it the active movie. I'm not smart enough to be able to detect which one is the mp3 file yet, but I'll work on figuring this out)
3. Make sure at least one of them is not playing, and is at the very beginning.
4. Activate the script. I just open it up in the Script Editor and hit 'Run'
5. Enter the first syncpoint of the QuipTrack in seconds. (again, I'm not smart enough yet to parse minutes:seconds. I'll work on this too) - so, 1:17 (one minute, seventeen seconds) would equal '77'
6. Enter the first syncpoint of the Movie file in seconds
7. Enjoy!

Sometimes you might have to tweak the QuipTrack time a couple seconds forward or backward to account for the slight delay between starting the two files. On my system it seems to run quick enough to make it a non-issue.

If you want a break from the hilarity, just run the script again. It'll detect that the files are already playing, and will pause them both. When you're ready to start it up again, just run the script one more time, and it'll unpause them both for you again.

If anybody here is an applescript ninja, then please, by all means, help me to build a better script! In the mean time, I hope at least one other 'mactard' gets a kick out of it.  Grin

Logged
invader_quirk
Riffer
Administrator
Madam Narf
******
Posts: 403


I'm surrounded by a fool!


View Profile
« Reply #1 on: November 13, 2008, 01:42:55 PM »

Interesting. I'm not a Mac guy, so it's lost on me. Hopefully this is helpful to somebody.
« Last Edit: November 13, 2008, 01:50:51 PM by invader_quirk » Logged
monkeyplusplus
Moderator
Electrical-powered bastard
*****
Posts: 3



View Profile WWW
« Reply #2 on: November 13, 2008, 01:59:32 PM »

To be honest, it's kinda lost on me as well... have you ever read applescript? It's pretty goofy.

On the plus side, you can often just guess and the syntax will work - note the first line:

Code:
set myMovies to every document of application "QuickTime Player"

This actually creates an array of the open documents in QuickTime. Maybe easy for someone who has never written a script in their life, but for anybody familiar with any other language, it's a bit insane.

Cool that it works, though!
Logged
The Don
Guest
« Reply #3 on: November 16, 2008, 01:08:34 PM »

MAC's suck just wanted to say that.
Logged
Asbestos Bill
Riffer
Administrator
Madam Narf
******
Posts: 315



View Profile
« Reply #4 on: November 17, 2008, 06:36:10 AM »

Stop trolling, The Don.
Logged

The Don
Guest
« Reply #5 on: November 17, 2008, 06:54:10 AM »

I wasn't trying to just was joking around. If I wanted to raise my post count i would do it in my own post of quote of the day. Sorry if that was the way it looked.
Logged
Asbestos Bill
Riffer
Administrator
Madam Narf
******
Posts: 315



View Profile
« Reply #6 on: November 23, 2008, 01:05:22 AM »

I think the one guy who used Macs on this forum (to my knowledge) left. I feel bad seeing "downloaded 0 times" next to your script though, so I think I'll try this sometime at school...
Logged

Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!