How to link your Toppy to a PC or Mac; networking your Toppy, Web-based EPG systems, DVD burning and file transfers

Moderators: Technical, Oz mods

Post Reply
nickx
Posts: 11
Joined: Sat Nov 25, 2006 10:34 pm

Mac applescript and MPEG Streamclip - how to download files

Post by nickx »

All,

Here is an applescript i wrote that uses MPEG Streamclip to download .REC files i want to save offline from my toppy to my macmini. YMMV.

i wrote this as i couldn't get puppy, ftpd-topfield or MACTF to compile or work properly. mac OSX since 10.3 has the ability to script clicks on menus and buttons and things which makes scripting an almost unscriptable application quite easy. (ie just needs universal access compiled in, which most new apps do by default).

Doing this with a well supported app such as MPEG Streamclip really shows the mac is a good companion to the toppy.

I'm a scripter by day, but this is my first major applescript, usually i write perl and shell scripts on solaris. ;) so if you find any bugs let me know in this thread.

Tested on osx 10.5.x, it won't work on anything below 10.3 (so says apple) and it checks for that anyway.

Download from here: http://www.kiwi-hacker.net/MPSC.applescript the code is too long to post in the forum.


you need to change the properties toppyFolder to where you move you saved recordings on the toppy itself. I use a folder in DataFiles called Uploads
then change the savePath to where ever you want to copy the files to, i use a external harddrive with a folder on it called movies.

you stilll need to delete the files off the toppy once saved to the mac but thats just being safe.

All the best,

nickx

ps. This is post is by way of thanks to the toppy.org.uk community. cheers everyone. :)

Code: Select all

(*

MPEG Streamclip .REC file downloader applescript (MPSC.scpt)
www.kiwi-hacker.net

v1.0 - 14may09 - NIC - initial release

*)

-- user configured static properties
property toppyFolder : "Uploads" -- folder in DataFiles to check for files to upload
property savePath : "/Volumes/exthdd/movies/" -- place to store the downloaded files from the toppy

Transmitter: Sutton Coldfield
Firmware: 5.13.65 :: BfBqC0CeEcEpErEsFGmHMhNfPcRRhRpRsSSr
AutoStart TAPs: TAP Commander 1.33 | eit2mei BETA 7.8m3 | Description Extender 2.23 | MyStuff 5.62a | Remote Extender 1.5 | TF5000 Display v1.53 | EITDupFix v0.3
nwhitfield
Site Admin
Posts: 9589
Joined: Sun Mar 20, 2005 10:11 pm
Contact:

Post by nwhitfield »

That's great; thanks.

MacTF is scriptable, but only in the older versions - something got broken in one of the newer ones. I never even looked at StreamClip to see if it was, to be honest
Support this site - make a donation to our running costs
nickx
Posts: 11
Joined: Sat Nov 25, 2006 10:34 pm

Post by nickx »

nwhitfield wrote: MacTF is scriptable, but only in the older versions - something got broken in one of the newer ones.
Ah i wondered why i was struggling. I had got MacTF 95% done and came to a point where I couldn't get any further. Though it seems the author has stopped supporting MacTF, or at least releasing newer versions, for some years.
I never even looked at StreamClip to see if it was, to be honest
Thats the beauty of OSX and universal access. StreamClip doesn't actually have applescript built in. But with OSX universal access enables applescript to click menus and buttons as if the user was doing it themselves on any newish application.

Nick
Transmitter: Sutton Coldfield
Firmware: 5.13.65 :: BfBqC0CeEcEpErEsFGmHMhNfPcRRhRpRsSSr
AutoStart TAPs: TAP Commander 1.33 | eit2mei BETA 7.8m3 | Description Extender 2.23 | MyStuff 5.62a | Remote Extender 1.5 | TF5000 Display v1.53 | EITDupFix v0.3
nwhitfield
Site Admin
Posts: 9589
Joined: Sun Mar 20, 2005 10:11 pm
Contact:

Post by nwhitfield »

The author of MacTF and ToFi is Nathan Oates; last I heard, he'd gone to work in the states, where of course they don't use DVB-T, so he was Toppyless, which I guess is something of a disincentive to further work on the code.

Applescript works in Version 1, but I think changes in 10.4 broke it.
Support this site - make a donation to our running costs
cazlar
Frequent contributor
Posts: 121
Joined: Sat Mar 26, 2005 10:25 pm
Location: Back in Sydney!

Post by cazlar »

The older v1.2, and maybe 1.3, should work fairly fine with modern macs, and AppleScript should be OK in both of those (not sure about 1.3, I forget where I changed the code and accidently broke it?). The later v2 betas are very crashy on multi-processor machines due to nasty threading bugs that were in there (as I was writing on a single-processor machine I never saw them!), and the applescript is definitely broken there (as I changed all the underlying code to use queues but never got around to re-linking all the AppleScript commands).

The good news is that I've just moved back to Oz, and as I missed my Toppy I've bought one off ebay (not here yet though). So hopefully, if I can find the time, I can rewrite MacTF to be bug free, Intel-native and fully scriptable too!

Now I just need to read up on all the firmware patches you guys have been playing with since I last had my toppy!
nwhitfield
Site Admin
Posts: 9589
Joined: Sun Mar 20, 2005 10:11 pm
Contact:

Post by nwhitfield »

Welcome back!
Support this site - make a donation to our running costs
awills61
Frequent contributor
Posts: 221
Joined: Wed Sep 20, 2006 11:02 am
Location: Winter Hill

Post by awills61 »

I was unaware that MPSC was scriptable. So I can now look at using this to script the Firmware/Mystuff update as the MacTF way was a bit hit and miss
TF5800t, , F/W: MS6 Recommended F/W 12/9/2009
TAPs: QuickJump 1.72; TF5000 Display v1.53; EIT Sub (Game) v0.6; SecCache (UK) v0.4; EPG2MEI v0.96; Font Manager 1.0d; MyStuff 6.4; MyInfo B5.5;
Sig generated by MyInfo on 20/5/11
?
Post Reply