• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Visualhub and folder watching automation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Visualhub and folder watching automation


  • Subject: Visualhub and folder watching automation
  • From: Dave Meier <email@hidden>
  • Date: Mon, 26 Nov 2007 23:38:28 +0000

ok new to all this fancy scripting stuff

basically what im trying to do is  convert avi/mkv files to iPhone compatible type via an automated process
  • when i download certain files i will unrar them to another folder
  • have this folder watched for certain .avi of .mkv files (smallville, heroes, etc)
  • start the script when it finds the watched files
  • put the files into Visualhub and load my iphone settings into visualhub
  • let Visualhub convert the files and import them into iTunes
  • close Visualhub
  • delete Visualhubs copy of the file as iTunes imports a copy into its library when importing
  • display a pop up message on screen to notify that files have been converted and computer will shut down/sleep with 1 minute unless you click "ok" or something like ok
  • fade this message out with 10-20 seconds (incase it is running at night)
  • close script and shut down/sleep computer

so far i have got it working on an .avi on my desktop but not in the particular folder i want to use
this is what worked:
tell application "VisualHub" to set VisualHub to load script (scripts path of main bundle & "/automation.scpt" as POSIX file)
tell application "Finder" to set everyavi to (every file of desktop whose name extension is "avi")
tell VisualHub
AddFiles(everyavi)
LoadSettings("Mac Drive:Users:xxxxx:Movies:Vids:Editing:Hub:Profiles:iPhone.vhub")
StartConversion()
QuitApp()
end tell

and this is what i have tried hoping to point it to a specific folder:
tell application "VisualHub" to set VisualHub to load script (scripts path of main bundle & "/automation.scpt" as POSIX file)
tell application "Finder" to set everyavi to (every file of "Mac Drive:user:xxxxx:documents:quick launch:temp stuff:test" whose name extension is "avi")
tell VisualHub
AddFiles(everyavi)
LoadSettings("Mac Drive:Users:xxxxx:Movies:Vids:Editing:Hub:Profiles:iPhone.vhub")
StartConversion()
QuitApp()
display dialog "VisualHub has finished converting your avi/mkv files.Thank you"
end tell

Im running Leopard 10.5.1 if that helps

im not looking for anyone to write me a script. just point me in the right direction
tell me what im doing wrong. 
is it to do with how im typing the folder location ?
when i unrar the files they are placed in "Mac Drive:user:xxxxx:documents:quick launch:temp stuff:test" in their own folder.
so i get "Mac Drive:user:xxxxx:documents:quick launch:temp stuff:test:bionic..s01e04:bionic.s01e04.avi" for example
will the script extract avi/mkv files that are inside sub folder like above ???
do i have to write a seperate script or seperate line for the mkv files or can i just write everyavi and everymkv ???

Any help on what i need to do would be great. im sure there will be many people reading this who could do this easily in the blink of an eye.
dont just read if you got the info or know how. please comment.

Thanks in advance

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Problem with osascript command
  • Next by Date: Re: Problem with osascript command -- clarification
  • Previous by thread: Re: Problem with osascript command
  • Next by thread: Re: Repeat until ...the user chooses to stop?
  • Index(es):
    • Date
    • Thread