Retrieve duration of sound files via Apple Script - System Events

I need to get more details of my sound files into a FileMaker 10 Database as it is possible by using the FileMaker import function. There ist a complicated way by going first through iTunes and than to FileMaker. Now I found out, that part of the information displayed when pushing cmd+i can be retrieved with this:
tell application "System Events"
properties of file "/Volumes/MacHD/singsong.mp3"
end tell.
But duration, channels, bitrate are not accessible. Is this a general problem with metadata? May be if I got a hint how to retrieve meta-data from .jpg files I might be able to apply this also on .mp3

Try the AppleScript forum under OS X Technologies.

Similar Messages

  • Automatic graphic switch via Apple Script

    hi community,
    I would like to change the "Automatic graphics switching" (tick on / tick off) via an Apple Script. I made the following script and it works, except with line "click chckbox 2". Here it ticks the box "Show battery status in menu bar". With "click checkbox 1" it takes the "Lock-Button".
    I would be glad if anybode could tell me the right code for ticking the checkbox "automatic graphics switching" via Apple Script.
    Thanks a lot
    PS: Yes I know that tool gfx Status, but I wanna do this via Apple Script.
    tell application "System Preferences"
      activate
              set current pane to pane "com.apple.preference.energysaver"
              delay 0.5
              tell application "System Events"
                        tell process "Systemeinstellungen"
                                  tell window "Energie sparen"
      click checkbox 2
                                            delay 0.5
                                  end tell
                        end tell
              end tell
      quit
    end tell
    quit

    Hello
    You may try this. It works with MacBook Pro 2010 under 10.6.5.
    tell application "System Preferences"
        set current pane to pane id "com.apple.preference.energysaver"
    end tell
    tell application "System Events"
        tell process "System Preferences"
            tell window 1
                tell group 1 -- automatic graphics switching
                    tell checkbox 1 -- automatic graphics switching
                        click
                    end tell
                end tell
            end tell
        end tell
    end tell
    And the script below will set the option to the specified value.
    set_automatic_graphics_switching(0)
    on set_automatic_graphics_switching(i)
            integer i : status of automatic graphics switching
                0 : off (unchecked)
                1 : on    (checked)
        if i is not in {0, 1} then error "Invalid argument: " & i number 8000
        tell application "System Preferences"
            set _was_running to running
            set current pane to pane id "com.apple.preference.energysaver"
        end tell
        tell application "System Events"
            tell process "System Preferences"
                tell window 1
                    tell group 1 -- automatic graphics switching
                        tell checkbox 1 -- automatic graphics switching
                            if value ≠ i then click
                        end tell
                    end tell
                end tell
            end tell
        end tell
        if not _was_running then
            tell application "System Preferences" to quit
        end if
    end set_automatic_graphics_switching
    Hope this may help,
    H

  • Starting applications from a keynote via Apple Script?

    Is there any way to start an application from a keynote via Apple Script?

    Welcome to the forums!
    Keynote does not support the use of AppleScript in that fashion.

  • Is it possible to set a files label on opening via apple script?

    Hi,
    I would like to mark files which have been opened with i.e. a red lable.
    Would that be possible using apple script?
    If yes how would that script look like?
    Thanks in advance.

    I don;t know of anyway of doing this in Applescript. There is the ability to monitor files using launchd, WatchPaths,  but you need to know the files your monitoring before hand so it won't work for this.
    Again if the domain is limited, that is it's only a certain application or a certain folder you're interested in it might be possible to put something together in Applescript but as a general use, system wide, solution I don;t think it can be done.
    One other possibility would be to use the Finder and smart folders. You could look for all files in a certain folder or system wide that have been acessed in the past period and then mark those. Something along those lines is doable with eiter the Finder or a script.
    regards

  • Play dvd files via apple tv

    after backing up my dvds to a hard disk, can I play them via apple tv?

    DVD files in their native format are not supported on the Apple TV. The following formats are.
    Video formats supported
    H.264 video up to 1080p, 30 frames per second, High or Main Profile level 4.0 or lower, Baseline profile level 3.0 or lower with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
    MPEG-4 video up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
    Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format
    Audio formats supported
    HE-AAC (V1), AAC (16 to 320 Kbps), protected AAC (from iTunes Store), MP3 (16 to 320 Kbps), MP3 VBR, Audible (formats 2, 3, and 4), Apple Lossless, AIFF, and WAV; Dolby Digital 5.1 surround sound pass-through
    Photo formats
    JPEG, GIF, TIFF.

  • How can I get the size of a file with apple script

    I try to get the size of a file within an apple script. But I did not find information how to do this.

    There are two ways. I think Apple is moving toward using System Events, which is listed first.tell application "Finder"
    set myFile to selection as alias
    --this just gets a file for me to work with
    --coercing it into an alias is required for the other functions
    end tell
    tell application "System Events"
    get size of myFile
    end tell
    set myInfo to (info for myFile)
    get size of myInfo

  • How do I transfer a sound file via TCP?

    I have a .wav file that I'm trying transfer via TCP.  Using LV 8.5, I modified the "Sound File to Output.vi" example to send the data across a TCP connection to a client vi.  But, I've encountered numerous errors along the way with trying to convert the sound data which is a  1-D array of waveform double.  I've attached my server and client VI, but essentially, what I tried to do is break down the array into the y and dt components, send those over the TCP connection, rebuild the waveform client-side, and then play the waveform.  Is there something I'm missing?  Do I need the timestamp information as well and send that over too?  Please let me know how this can be accomplished.  Thanks!
    Attachments:
    Streaming Music - Server.vi ‏97 KB
    Streaming Music - Client.vi ‏65 KB

    One thing to clarify: While the Sound Output Write does not need the dt information, the dt information wouold be required when you use the Configure VI in order to set up the rate.  However, you only need to send that parameter once. Thus, it would seem to me that you want to change your client code so that it checks to see if it receives a special command or something to indicate the start of a new song that may have been sampled at a different rate. If this is the case, then you can reconfigure the sound output. Otherwise, all that you're listening for is just song data that you send along to the Sound Output Write.

  • Install and uninstall of dmg file using Apple script in Mac 10.6 and higher version.

    Hi ,
    Could anyone please help me to write a Apple script to Install dmg file and do clean uninstall in Mac 10.6.8 and higher version.
    My requirement is:
    When i run script : it has to install the dmg file which is located inside one desktop folder say 'New Folder'
    I need to do clean unistall when i run the script: i need to delete the folder in ~/Library- locate folder say  'CPSPCSHOWSERVER'' move to trash and from Terminal type in command "rm -r ~/.CPS' to completely delte this folder.
    Really appreciated all ur help!!
    Thanks,
    KT.

    http://macfidelity.de/2008/08/30/how-to-mount-a-dmg-from-terminal-in-mac-os-x/in dex.html
    http://osxdaily.com/2011/12/17/mount-a-dmg-from-the-command-line-in-mac-os-x/
    http://hints.macworld.com/article.php?story=20030614230204397
    http://www.commandlinefu.com/commands/view/2031/install-an-mpkg-from-the-command -line-on-osx

  • Open & close iTunes every night via Apple Script

    What I would like to do is have my Mac come out of sleep at 3am, open iTunes and download all my podcasts and then go back to sleep. Is this possible with Apple Script?

    In System Preferences>Energy Saver click on 'Schedule' and set 'Start Up or Wake' to 3 AM
    In iCal set up an event for 3.05, setting an alarm to Open File and selecting iTunes.
    Suppose you want to allow half an hour:
    In AppleScript Editor, write
    tell application iTunes to quit
    tell application "Finder" to sleep
    and save it somewhere as a script, not an application.
    Set up an event in iCal for 3.35 with an alarm, setting it to Run Script and selecting your script.

  • Best way to send a large sound file via e-mail?

    Hello,
    I created a sound file in Sound Studio that is 75.5 MB large. I want to e-mail it to a friend through my Hotmail account. (I have a cable connection. I do not have AOL. And I just discovered that I can play it on my computer using QuickTime.)
    What is the best way to do this? Do I need to compress it? I have heard of compressing large files to make it easy to e-mail, but I don't know how to do it. If so, will he be able to hear it when he opens up the e-mail on his end?
    If anyone could give me step-by-step instructions on how to send this, I'd be most grateful. Thank you.

    If you have Stuffit Expander check inside the folder for Drop Stuff.
    Drop the movie file onto Drop Stuff.
    This will compress the music file.
    Or
    You can send large music files through You Send It which is FREE!
    There are others but, You Send It is the easiest.
    Or
    Since you have a High-speed connection, the easiest & fastest way is through AIM (AOL Instant Messenger). You do not need to be a member of AOL.
    I send all my music & movie files this way instead of using email.
    iChat has the same ability of transferring large files as AIM.
    http://docs.info.apple.com/article.html?artnum=150934

  • Hiding Folders via Apple Script

    Good evening,
    When i installed Leopard a got up a little Issue: When i look in my harddrive i can see the the folder "var,usr,etc" ... in the normal Finder Window.
    Well i thought it would be some kind of a bug so i helped myself and used a little apple script i allreade used in Tiger to hide all these annoying folders like "Microsoft Users Data etc." You know what i mean
    My Script does this:
    +set myfile to choose file+
    +tell application "System Events" to set visible of myfile to false+
    +tell application "Finder" to update myfile+
    I should be able to pick a file (have done the same for folders, too) and hide it from the normal Finder window. Well it works fine on causaul folder and data.
    But on these UNIX Folder i mentoined it wont work. My Question: How can i get this to work? (I thought of missing admin priviledges?)

    Try the instructions in this article.
    (25833)

  • Search String in PDF file - MAC Apple Script

    I want to write a Script for Searching String in a PDF File.
    I start with Apple Script and the last 2 days i searching to eliminate the error in the Script.
    set Datei to choose file
    tell application "Adobe Acrobat Professional"
    open Datei
    activate
    find text Datei string "01.07.08"
    end tell
    The script will stopped in line from find text.
    The scrippt will be load a PDF file, activate it an i want to search "01.07.08" and marked it.
    Please help me.
    Thanks michael

    Right, I think I've got on to something here:
    1. I must not have been able to search this particular pdf document in the past, despite what I think I remember.
    2. When I select the Yamaha TDM pdf in Finder and show the Inspector window (CMD-opt-I) I see under "More Info" that Security Method is 'Password Encrypted'. In fact, try to select and copy some of the text: you can't. BUT: print the whole file to a new PDF, then save that new pdf file and use it for searching, ... ta-da! it works!
    I was a bit disappointed in ColorSync's inability to open the file and then Save it As... In the Tiger days, I had used this work-around: I took a password encrypted pdf document, opened it in ColorSync utility (in Applications/Utilities) and saved it under a new filename somewhere on the disk, and this process sort of neglected to cloak it up in its password-protection.
    Oh well, I suppose I can use the Print to PDF method which I describe just here to achieve the same goal. Until, that is, the big-wigs in the publishing companies and Apple are alerted to this fact and strip the 'functionality' from the print process.
    Thanks for posting.

  • Is it possible to smoothly play 1080p MKV movie files via Apple TV?

    I want to play 1080p mkv movies stored in my iPad Air on TV.
    Is Apple TV capable to smoothly play such a video file? Or would you suggest a HDMI-Ligthning adapter?
    Has any of you used any app for this purpose? Does Avplayer HD do this job? Or which app would you suggest for this? App should support subtitle files.

    AppleTV cannot play MKV files.
    If you have an app that can Airplay an MKV file be aware that the app will be decoding the MKV locally and then recompressing to either an h264 stream or compressing the iPad screen display and sending via Airplay - either way quality will suffer.
    AC

  • Show files with apple script

    what is the comand for showing hidden files in applescipt?
    mac book black   Mac OS X (10.4.8)  

    To display an item inside an invisible folder, you can use a script such as:
    tell application "Finder"
    reveal alias "Macintosh HD:usr:share:"
    end tell
    To set the Finder to display all invisible files:
    tell application "Finder" to quit
    do shell script "defaults write com.apple.Finder AppleShowAllFiles 1" delay 2
    tell application "Finder" to run
    If you run the first script, the folder will disappear in the Finder after the window is closed or its location is changed. The second script can be turned off by replacing the 1 with a 0.
    (18203)

  • Changing background via apple script

    Hello,
    I manage a small deployment of different macintosh products and I currently have to run 5 different images so that the background images look right on all the various resolutions. I have been working on a piece of applescript to prompt the user on first startup to select their hardware type to apply the proper background image but I am running into a few issues.
    Firstly the method I am using limits me to three options and I cant seem to find any documentation on how the list function works.
    Second, I keep getting errors saying the files can't be found.
    Here is the code (with personal details removed) that I am working with
    display dialog "Choose your hardware type" buttons {"17MBP", "15MBP", "iMac21"}
    set situation to the button returned of the result
    tell application "Finder"
              set desktop picture to {"MacOSX:Users:USERNAME:Technical:Backgroundimages:" & situation & ".gif"} as alias
    end tell
    I would really like it to automatically detect the hardware type but I don't think that is possible. The error I currently get says:
    error "File MacOSX:Users:USERNAME:Technical:Backgroundimages:15MBP.gif wasn’t found." number -43 from "MacOSX:Users:eventequipment:Technical:Backgroundimages:15MBP.gif"

    Applescript panels are limited to three buttons.  if you need more than three choices, use the choose from list command:
    choose from list {"alpha", "beta", "gamma", "delta", "epsilon"}
    however, you ought to be able to gather the information you need without user interaction.  you can base a choice on machine type using code like the following:
    set machineType to paragraph 6 of (do shell script "system_profiler SPHardwareDataType")
    if machineType ends with "MacbookPro2,2" or machineType ends with "…" then
              set situation to "MBP15"
    else if machineType ends with "…" or machineType ends with "…" then
              set situation to "MBP17"
    else if machineType ends with "…" or machineType ends with "…" then
              set situation to "iMac21"
    else
      -- set default or throw error
    end if
    or it might be more convenient to base it on screen resolution using something like the following
    set displaySize to paragraph 17 of (do shell script "system_profiler SPDisplaysDataType")
    if displaySize ends with "1440 x 900" then
              set situation to "MBP15"
    else if displaySize ends with "…" or displaySize ends with "…" then
              set situation to "MBP17"
    else if displaySize ends with "…" or displaySize ends with "…" then
              set situation to "iMac21"
    else
      -- set default or throw error
    end if

Maybe you are looking for

  • Question for sending a PDF Form with desktop mail

    Dear all, I try to create a PDF form and use it for a Workflow. Therefore I created some "Send" Buttons and put into the Properties/Actions/Submit a Form the comand "mailto: [email protected]". The second "Send" Button contains another mail adress wh

  • Print text in Bold while creating PDF

    Hi, I am mapping data in the XML to a Template designed using LiveCycle Designer ES3. I need to print some of the text in BOLD. For exmple in the following XML, when we display the text in PDF,  person names should be in BOLD. Part of the XML that is

  • HT3702 I am not able to complete a transaction on my account from castleville legends

    I am trying to buy a in app upgrade and is not going through

  • Is this scenario possible?

    My company is in the process of determing whether OAS InterConnect would be useful to us. We currently have several fixed file formats (different formats) that we get from external sources. This data needs to be put into a "holding area" until severa

  • Xpath in BPEL: How to extract from message type to string

    Hi all, I am currently trying to extract all content from a special message type to a string. The special message is really just simple XML. However, I wish to convert the special domain specific message to a string to send to another partnerlink. I