Need applescript to search Itunes then prompt for a selection from the results of the search.

I have included my script below:
set myPrefsFile to (choose file with prompt "Select a file to read:")
set notfound to ((path to desktop folder) as string) & "notfound.txt"
open for access notfound with write permission
open for access myPrefsFile
set AppleScript's text item delimiters to {","}
set prefsContents to read myPrefsFile using delimiter {","}
close access myPrefsFile
set x to 0
set theplaylist to "Temp"
tell application "iTunes"
  make new user playlist with properties {name:"Temp-1"}
end tell
repeat number of items in prefsContents times
          set x to x + 1
          set track_name to item x of prefsContents
          tell application "iTunes"
                    get view of front window
                    tell library playlist 1
                              set search_results to (search for track_name)
                              copy search_results to theplaylist
                    end tell
                    repeat with a_track in search_results
  duplicate a_track to playlist "Temp-1"
                    end repeat
          end tell
          if search_results = {} then write track_name to file notfound
end repeat
close access file notfound

Proximity will become available if you're using a index (Tools > Document Processing > Full Text Index with Catalog), which you can create with Acrobat Pro for just this single document if you place it in a folder by itself. You will also have to select "match all words" or whatever the exact wording is in the advanced seach panel.

Similar Messages

  • When ipod starts up, shows usb cable to connect to itunes then asks for my lock password but cannot get into ipod to put in password.  any ideas?

    when ipod starts up, shows usb cable to connect to itunes then asks for my lock password but cannot get into ipod to put in password.  any ideas?

    You may need to connect the iPod in Recovery Mode and then restore it via iTunes.  See this article for instructions on getting your iPod into Recovery Mode.;
    http://support.apple.com/kb/ht1808
    B-rock

  • What is happening to 7.0.3? why do we need to connect to itunes and restore for 2 hours?

    what is happening to 7.0.3? why do we need to connect to itunes and restore for 2 hours? such a waste of time.

    No clue as you've provided not details.
    What exactly is the problem that was occuring that prompted you to restore via iTunes?

  • Trying to subscribe to a secure podcast, but I am never prompted for login information, instead I just get the gray "i". Is there something in iTunes 10.4 i can change to fix this?

    Trying to subscribe to a secure podcast, but I am never prompted for login information, instead I just get the gray "i". Is there something in iTunes 10.4 i can change to fix this?
    Notes: The RSS feed of the podcast works just fine. When I enter the podcast URL into the firefox bar, I am prompted and am able to access the page. The problem is with iTunes not giving me the prompt.

    Mountain Lion Supported Machines
    Supported
    Models
    iMac (Mid 2007 or newer)
    MacBook (Late 2008 Aluminum, or Early 2009 or newer)
    MacBook Pro (Mid/Late 2007 or newer)
    Xserve (Early 2009)
    MacBook Air (Late 2008 or newer)
    Mac mini (Early 2009 or newer)
    Mac Pro (Early 2008 or newer)
    Requirements
    General Requirements
    OS X v10.6.8 or later
    2GB of memory
    8GB of available space
    Some features require an Apple ID; terms apply.
    Some features require a compatible Internet service provider; fees may apply.

  • I have problem with my wifi in 4 S, i cant connect to any wifi itried resetting network setting and reset all setting but the result was the same, its only keeps searching for wifi and cant find any, itried to use OTHER but also didnt work.please help me

    i have problem with my wifi in 4 S, i cant connect to any wifi itried resetting network setting and reset all setting but the result was the same, its only keeps searching for wifi and cant find any, itried to use OTHER but also didnt work.please help me???

    If Join was on then your home wi-fi must be set to Non-Broadcast.  If you did not set this up (maybe your provider did) then you will need to find the Network Name they used, and any password they used.  The SSID is Security Set ID and to see more try http://en.wikipedia.org/wiki/SSID .  Basically it is the name used to identify your router/network.  A lot of times the installer will leave it set as LinkSys, or Broadcom or whatever the manufacturer set it as for default.  Your best bet is to get whoever installed it to walk you through how they set it up, giving you id's and passwords so you can get in.  HOWEVER, if you are not comfortable with this (if you set security wrong, etc.) you would be well ahead of the game to hire a local computer tech (networking) to get this working for you.  You can also contact the vendor of your router and get help (if it is still in warranty), or at least get copies of the manuals as pdf files.  Sorry I can't give you more help, I hope this gives you an idea where to go from here to find more.

  • TS1292 hi, I've got itunes music card for my birthday and when I scratch the back to redeem the code everything gone, so no code, what can I do?

    hi, I've got itunes music card for my birthday and when I scratched the back to redeem the code everything gone, so no code, what can I do? I've been to tesco to customer service and they told to contact itunes support

    These are user-to-user forums. If the page that you posted from doesn't help then you can try contacting iTunes Support via this page (you will probably need to give them images of the front and back of the card, and possibly its receipt) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then iTunes Cards And Codes

  • Prompt for Directory Selection when deploying in WEB

    I have created a Java code to prompt for directory selection and it works when alone. When I get the code with the JavaBean in the forms 6i application, no dialog prompt appears when clicking the "Get_directory" button. The Java code is listed below.
    (A) File DDialog.java
    package oracle.forms.intex;
    import java.awt.*;
    import javax.swing.*;
    import java.beans.*;
    import java.io.File;
    public class DDialog extends Canvas {
    private String directory_name ;
    private PropertyChangeSupport pcs;
    public DDialog() {
    directory_name = "";
    pcs = new PropertyChangeSupport(this);
    public void set_directory_name() {
    JFrame frame = new JFrame("Get Directory");
    javax.swing.JFileChooser OpenDlg = new JFileChooser();
    OpenDlg.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
    int returnVal=OpenDlg.showOpenDialog(frame);
    String old_directory_name = directory_name;
    if(returnVal == JFileChooser.APPROVE_OPTION)
    File selectedFile = OpenDlg.getSelectedFile();
    if (selectedFile.isDirectory())
    directory_name=selectedFile.getPath();
    pcs.firePropertyChange("directory_name", old_directory_name, directory_name);
    public void addPropertyChangeListener(PropertyChangeListener pcl) {
    pcs.addPropertyChangeListener(pcl);
    public void removePropertyChangeListener(PropertyChangeListener pcl) {
    pcs.removePropertyChangeListener(pcl);
    public static void main(String args[]) {
    new DDialog();
    (B) File DDialogPJC.java
    package oracle.forms.intex;
    import java.awt.*;
    import java.awt.event.*;
    import java.beans.*;
    import oracle.forms.properties.ID;
    import oracle.forms.handler.IHandler;
    import oracle.forms.ui.CustomEvent;
    import oracle.forms.ui.VBean;
    public class DDialogPJC extends VBean implements PropertyChangeListener{
    private Component mComp;
    private IHandler mHandler;
    private static final ID SHOWDIRECTORYDIALOG = ID.registerProperty("showdirectorydialog");
    private static final ID DIRECTORYNAME = ID.registerProperty("directoryvalue");
    private static final ID DIRECTORYCHANGEEVENT = ID.registerProperty("directorychangeevent");
    public DDialogPJC() {
    super();
    try{
    ClassLoader cl = getClass().getClassLoader();
    Object obj = Beans.instantiate(cl,"oracle.forms.intex.DDialog");
    mComp = (Component)obj;
    mComp.setVisible(true);
    mComp.setEnabled(true);
    ((oracle.forms.intex.DDialog)mComp).addPropertyChangeListener(this);
    // add the component to this
    add("Center",mComp);
    catch(Exception e){
    e.printStackTrace();
    public void init(IHandler handler)
    super.init(handler);
    mHandler = handler;
    public boolean setProperty(ID pid, Object value)
    if(pid ==SHOWDIRECTORYDIALOG) {
    ((oracle.forms.intex.DDialog)mComp).set_directory_name();
    return true;
    else
    return super.setProperty(pid,value);
    public void propertyChange(PropertyChangeEvent pce) {
    String new_directory_name=(String)pce.getNewValue();
    try {
    mHandler.setProperty(DIRECTORYNAME, new_directory_name);
    catch(Exception e) {}
    CustomEvent ce = new CustomEvent(mHandler, DIRECTORYCHANGEEVENT );
    dispatchCustomEvent(ce);
    (C) In the form, there is the button "GET_DIRECTORY" with code in WHEN_BUTTON_PRESSED trigger.
    declare
    DDialog_Bean Item;
    begin
    DDialog_Bean:=find_item('DDIALOG_BEAN');
    if not id_null(DDialog_Bean) then
    set_custom_item_property(DDialog_Bean,'showdirectorydialog',1);
    end if;
    end;
    (D) In the same form, there is the javabean area "DDIALOG_BEAN" with code in WHEN_CUSTOM_ITEM_EVENT trigger.
    declare
    DDialog_Bean Item;
    BeanValListHdl ParamList;
    paramType Number;
    EventName varchar2(20);
    directory_name varchar2(255);
    begin
    DDialog_Bean:=find_item('DDIALOG_BEAN');
    BeanValListHdl:=get_parameter_list(:system.custom_item_event_parameters);
    EventName:=:system.custom_item_event;
    if (EventName='directorychangeevent') then
    get_parameter_attr(BeanValListHdl,'directoryvalue',ParamType,directory_name);
    :directory_name:=directory_name;
    end if;
    end;
    Please advise where the problem is and fix it, much thanks.
    SK

    Hello there SK. actually i have same problem with you. i am only new to Forms6i. Itried your code DDialog.java and the DDialogPJC.java
    Ive got an error when i compile the DDialogPJC.java using the java complier.
    here is the err:
    package oracle.forms.properties does not exist
    package oracle.forms.handler does not exist
    package oracle.forms.ui does not exist
    package oracle.forms.handler does not exist
    how can i solve this problem. you said that it works properly in your machine.
    please help me on this, i also want to try fixing your problem, but i need this to be fixed first. thank you and more power

  • There is  Red Icon at the top bar and it says I have a virus and things keep popping up saying I have a virus and need to do a scan and pay for some sort of software to complete the scan, someone told me that this is a virus in. How do I get rid of it?

    There is  Red Icon at the top bar and it says I have a virus and things keep popping up saying I have a virus and need to do a scan and pay for some sort of software to complete the scan, someone told me that this is a virus in. How do I get rid of it?

    This could well be the notorious Mac Defender - which is an annoying program that tricks you into thinking that your Mac is infected with a virus, when the only infection is Mac Defender itself.
    When surfing the web never EVER click on a link that says "Free anti-virus scan" or "Scan now" - they are nearly always scams which will end up infecting your computer.  Although Macs are resistant to viruses, they're not resistant to user stupidity.
    If you Google "Mac defender" then you'll find plenty of sites with instructions on how to remove this minor nuisance.  Take this as a warning that you need to be more careful in your surfing habits.
    Bob

  • I began to purchase songs off iTunes, a prompt message appears whether you want to buy the song after the first click... I ticked the box to say I didn't want this warning again... But now I wish I had that - Anybody know how to get that message back???

    I began to purchase songs off iTunes, a prompt message appears whether you want to buy the song after the first click... I ticked the box to say I didn't want this warning again... But now I wish I had that - Anybody know how to get that warning/prompt message back???

    Sign-in to your iTunes Store account (Store menu > View my account).
    At the bottom of the Account Information page is a Reset box to click to reset all warnings for buying and downloading.  Click the "Done" button when you're finished.

  • Do I need to buy a new printer, dedicated for my Mac or can I use the same one we use for our PCs?

    Do I need to buy a new printer, dedicated for my Mac or can I use the same one we use for our PCs?

    Hello stacksofamber and welcome to Apple Support Communities,
    You should be able to find a Mac OSX driver for that printer. Did you check with the manufacturer/'s website?

  • Why is itunes too big for my screen? i'm on the highest resolution. i'm on windows 7 on a sony vaio ! please help !!

    why is itunes too big for my screen? i'm on the highest resolution. i'm on windows 7 on a sony vaio ! please help !!

    Resize it.

  • I have followed the suggested methods of restoring my iphone by placing it into recovory mode, however itunes keeps asking for a response from my iphone except it is disabled

    i have followed the suggested methods of restoring my iphone by placing it into recovory mode, however itunes keeps asking for a response from my iphone except it is disabled and thus the restoration willnot continue

    There's a whole lot to read in your post, and frankly I have not read it all.
    Having said that, this troubleshooting guide should help:
    http://support.apple.com/kb/TS1538
    In particular, pay attention to the mobile device support sections near the bottom, assuming you have already done the items above it.

  • HT203167 If I bought music in itunes then my ipod was stolen can i still retreive the music?

    If i bought music in itunes then my ipod was stolen, can i still retrieve the music?

    It'll still work. Once you've downloaded it, you can play it from anywhere in the world.
    (80940)

  • How can I find itunes 10.1 for windows.  I don't want the cloud in newer version.

    How can I find iTunes 10.1 for windows.  I don't want the cloud, and my iPod touch won't go back to prior versions.

    Had the same problem. Also worked fine on my MacBook, but not on my new iMac. Here's what I did to fix it:
    Archive and Reinstall Mac OS (takes about 40 minutes). This reverted my system back to 10.6.2. Just pop in your Mac OS disc that came with your computer. Mine had 10.6.2 on it, and "Archive and Install" is the default option. When it's done, run software update and update everything. Now it all works fine.
    Somewhere along the way, some file got corrupted somehow. But doing an "archive and install" of your OS undoes whatever file damage was incurred, and allows everything to update normally via Software Update as it should.

  • How to search XML data from a HTTPMultiService and display the result on the Spark List

    Hello all,
    I am totally new to Flash Builder and Actionscript and hope someone might be able to help me out. I basically create a mobile app with a single view. The view has a TextInput as a search box and a search button. I conntected a Data/Service using a local XML file and bind the Data to a Spark List. Innitally the List will show nothing until the user enter the search term and hit the button. The List suppose to show the XML data that match the search term.
    Now is my problem. I cannot make the List to show the data that match the search text. The List just shows ALL the data.
    Here are my MXML code:
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:shopping="services.shopping.*"
            title="Search">
        <fx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
                protected function button1_clickHandler(event:MouseEvent):void
                    navigator.popView();
                protected function list_creationCompleteHandler(event:FlexEvent):void
                    getDataResult.token = shopping.getData();
                protected function seach_clickHandler(event:MouseEvent):void
                    getDataResult.token = shopping.getSearchData(searchTxt.text);
            ]]>
        </fx:Script>
        <fx:Declarations>
            <s:CallResponder id="getDataResult"/>
            <shopping:Shopping id="shopping"/>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <s:actionContent>
            <s:Button height="79" label="Back" click="button1_clickHandler(event)"/>
        </s:actionContent>
        <s:List id="list" left="0" right="0" top="111" bottom="0"
                creationComplete="list_creationCompleteHandler(event)" labelField="english">
            <s:AsyncListView list="{getDataResult.lastResult}"/>
        </s:List>
        <s:TextInput id="searchTxt" x="80" y="34" width="250" height="49" enabled="true"
                     prompt="search..."/>
        <s:Button id="search" x="338" y="35" width="72" height="49" label="s"
                  click="seach_clickHandler(event)"/>
    </s:View>
    Here is the _Super_Shopping.as file:
    * This is a generated class and is not intended for modification.  To customize behavior
    * of this service wrapper you may modify the generated sub-class of this class - Shopping.as.
    package services.shopping
    import com.adobe.fiber.core.model_internal;
    import com.adobe.fiber.services.wrapper.HTTPServiceWrapper;
    import com.adobe.serializers.xml.XMLSerializationFilter;
    import mx.rpc.AbstractOperation;
    import mx.rpc.AsyncToken;
    import mx.rpc.http.HTTPMultiService;
    import mx.rpc.http.Operation;
    import valueObjects.Shop;
    [ExcludeClass]
    internal class _Super_Shopping extends com.adobe.fiber.services.wrapper.HTTPServiceWrapper
        private static var serializer0:XMLSerializationFilter = new XMLSerializationFilter();
        // Constructor
        public function _Super_Shopping()
            // initialize service control
            _serviceControl = new mx.rpc.http.HTTPMultiService();
             var operations:Array = new Array();
             var operation:mx.rpc.http.Operation;
             var argsArray:Array;
             operation = new mx.rpc.http.Operation(null, "getData");
             operation.url = "assets/data/shopping.xml";
             operation.method = "GET";
             operation.serializationFilter = serializer0;
             operation.properties = new Object();
             operation.properties["xPath"] = "/::shop";
             operation.resultElementType = valueObjects.Shop;
             operations.push(operation);
             operation = new mx.rpc.http.Operation(null, "getSearchData");
             operation.url = "assets/data/shopping.xml";
             operation.method = "GET";
             operation.resultFormat = "text";
             argsArray = new Array("item");
             operation.argumentNames = argsArray;
             operation.properties = new Object();
             operation.properties["xPath"] = "/::shop";
             operation.resultElementType = valueObjects.Shop;
             operations.push(operation);
             _serviceControl.operationList = operations;
             preInitializeService();
             model_internal::initialize();
        //init initialization routine here, child class to override
        protected function preInitializeService():void
          * This method is a generated wrapper used to call the 'getData' operation. It returns an mx.rpc.AsyncToken whose
          * result property will be populated with the result of the operation when the server response is received.
          * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value.
          * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
          * @see mx.rpc.AsyncToken
          * @see mx.rpc.CallResponder
          * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
        public function getData() : mx.rpc.AsyncToken
            var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("getData");
            var _internal_token:mx.rpc.AsyncToken = _internal_operation.send() ;
            return _internal_token;
        public function getSearchData(item:String) : mx.rpc.AsyncToken
            var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("getSearchData");
            var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(item);
            return _internal_token;
    The getSearchData() supposed to return XML data that match the search text, but it doesn't. Can anyoen help?
    Thank you!

    Hi,
    are you able to change dynamically the  operation.url = "assets/data/shopping.xml";?
    i need to do that based on the users input.
    Thanks in advance,

Maybe you are looking for

  • Saving a .pdf file into the network shared drive from Outlook 2013

    Hello sirs, I have one client that having the file saving issue into the shared drive from outlook 2013. I have isolated the network portion and confirmed that there is nothing to do with the network. They have 1 host server which has 2 VMs inside (D

  • "ORLive" broadcast error message says "install Flash" Is there a workaround for Flash?

    Hi - I know that Flash doen't work on my ipad, and I know there are still a lot of websites out there that require Flash in order to show their content.  I'm okay with taking my viewing elsewhere most of the time, but the government (Medline - the NI

  • New Mac Mini didn't come with Snow Leopard.

    Hi all. I went to the apple store today in Bethesda, MD and bought the $599 Mac Mini. On the site it says "Now Includes Snow Leopard" for the Minis, but this one I bought in the store doesn't have it and none of the DVDs it came with is an upgrade di

  • Is keeping Bridge current necessary while using the Lightroom-CS6 Workflow

    Hi Folks, I totally get and daily use the LR4 to CS6 workflow, although I'd consider myself not much more than a beginner with PS.  My question is - is there a need when adding photos to the LR database, to at the same time (or at some point), make s

  • Sql plus password typing problem

    Hello there I'm trying to access sql plus 11g on windows 7, i correctly write the username but when i try to type the password, nothing is typed at all, not letters nor asteresks!! plz help meee