Jump to content

Applescript for Omnia / iTunes users


Recommended Posts

Posted

I whipped together this script for our mac users that also use the omnia.

you nee to make sure your Omnia is NOT in active sync, but ,mass storage mode.

On run, this script checks the property OmniaDeviceName and this value must be equal to name of the omnia data partition on your desktop, note, you can change this in the finder to whatever you want, and the name will stick.

It then looks for a folder called "My Ringtones" on this drive, if it doesnt exist, it will create the folder, and the script will start over.

Once all this checking is done, it will look to see what the selected track is in itunes, and transfer the file to the My ringtones folder. (Note, no registry hack to move the ringtones, on the omnia, this folder existing will populate the internal list in the ringtones selection on the omnia

if the script sees the Omnia is not attached, it will save the list of songs you wants to copy over, and next time you move over a file, with the omnia attached, it will also copy over thoe files.

Im sure theer are bugs (like not having anything sleected in itunes) but My hope is by posting this, we can make it lots better.

Save this script as an application, and save to ~/Library/iTunes/Scripts/

This should then be listed in the Scripts menu in itunes.

Enjoy.

-identd aka oscar

--If you add to this, please post the changes back, and incrment the script version number, thank you.


*)

property scriptVER : "081231"

property OmniaDeviceName : "My Storage:" --Note, if you change this, make sure there is a : at the end

property savedfilestocopy : {}

on run {}

	--	if ringtonesfolder = {} then

	--		set ringtonesfolder to choose folder with prompt "Choose your Omnia i910 Ringtone Folder"

	--	end if


	tell application "Finder"

		if exists (OmniaDeviceName) then

			set OmniaDeviceNameEXIST to true

			if not (exists (OmniaDeviceName & "My Ringtones")) then

				set archiveFolder to make new folder at OmniaDeviceName with properties {name:"My Ringtones"}

				run {}

			end if

		else

			set OmniaDeviceNameEXIST to false

			using terms from application "iTunes"

				tell application "iTunes"

					set sel to a reference to selection

					repeat with aTrack in sel

						set end of savedfilestocopy to location of aTrack

					end repeat

				end tell

			end using terms from

			display dialog "Please make sure your Omnia data partition is named \"" & OmniaDeviceName & "\" and the phone plugged into your computer"

		end if

	end tell

	if OmniaDeviceNameEXIST = true then

		tell application "iTunes"

			set trackdata to name of selection

			set fpath to location of selection

			set thekind to kind of selection

			set pleaseskip to false

			repeat with i from 1 to (length of trackdata)

				--display dialog (length of fpath) default answer thekind as string

				if (item i of thekind as string) is "Protected AAC audio file" or (item i of thekind as string) is "Purchased AAC audio file" or (item i of thekind as string) is "Protected MPEG-4 video file" then

					if pleaseskip is false then

						set bresult to button returned of (display dialog "\"" & item i of thekind & "\" will not work, so skipping this file..." with title (item i of trackdata) buttons {"Cancel", "Skip All", "Next..."})

						if bresult is "Skip All" then

							set pleaseskip to true

						end if



					end if

				else

					tell application "Finder" to duplicate (item i of fpath) to (OmniaDeviceName & "My Ringtones") with replacing

					--display dialog "copy"

					if savedfilestocopy ≠ {} then

						repeat with i from 1 to (length of savedfilestocopy)

							--	display dialog i

							tell application "Finder" to duplicate (alias i of savedfilestocopy) to (OmniaDeviceName & "My Ringtones") with replacing

						end repeat

						set savedfilestocopy to {}

					end if

				end if

			end repeat

		end tell

	end if

end run

Guest identd
Posted

Would this be more desriable as a pre compiled file, and such, no one seems to be interested

  • 1 month later...
Guest NewKlNGjames
Posted

If there was anyway to get this to work on a vista machine, I would be all over it.

Guest smilepak
Posted
If there was anyway to get this to work on a vista machine, I would be all over it.

Use iTunesExport

1) Export iTunes library as XML file

2) Use iTunes Export to bring that over to Windows Media Player

3) Use WMP to sync with Omnia

ahahah long method, but it works

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.