Creating keywords from AppleScript

Hi!
I am trying to create and assign keywords using AppleScript.
I have searched the web and found lots of dated articles. The gist is that assigning keywords requires for them to created first. In past versions of iPhoto this was impossible for lack of a "make new keyword" command.
iPhoto'11 does seem to be able to create new keywords from AppleScript. I just can't get it to work.
In its most basic version, my script looks like this:
tell application "iPhoto"
make new keyword with properties {name:"myTest"}
assign keyword string "myTest"
end tell
This fails with the message "The at parameter is missing for make."
Now I wonder where "at" I should create the keyword.
Is the "make new keyword" command still broken?
Best,
Pierre

May get an answer here but probably more likely in the using SL forum - http://discussions.apple.com/forum.jspa?forumID=1339&start=0
LN

Similar Messages

  • How to Create PDF from Illustrator CS3 by using applescript?

    Hi Guys,
    Do some one knows how to create PDF from Illustrator CS3 by using apple script. If know, please give me the scripting.
    HARI

    Have you tried File>Scripts>SaveDocsAsPDF? There should be a folder of sample scripts installed in your AICS3 folder and a folder of documentation which contains an Illustrator AppleScript Reference which has examples.

  • Can I create "keyword list" from keywords in EXIF data?

    Hi - I'm still a Mac and Aperture noob, so please excuse me if the question is dumb or ill-formed...
    I used to use Photoshop Elements on a PC. I made pretty extensive use of "tags" (keywords, in Aperture lingo) for categorizing my photos. I wrote all the tags into the exif data of my photos, then copied everything over to Aperture.
    Now, when I pull up an existing photo in Aperture browser, I can see the keywords that I already added. Great...but, is there a way to extract all the existing keywords from all my photos, and build a "library" of keywords that I can pick and choose from for tagging future photos?
    Alternatively - if I could export a keyword list from Photoshop Elements (in txt or XML format, whatever) is there a way that I can import that into Aperture?
    From the reading I've done so far, it seems like I have to manually enter keywords on each photo or do a batch update (and, again, manually enter them). I'd much prefer to have a list of keywords that I can scroll down, then just click to select. Is that asking too much of Aperture?

    jtj3 wrote:
    Hi - I'm still a Mac and Aperture noob, so please excuse me if the question is dumb or ill-formed...
    Welcome to the list and Mac's. Don't woory about your questions, veteran Mac and Aperture users here frequently post dumb and ill-formed questions.
    I used to use Photoshop Elements on a PC. I made pretty extensive use of "tags" (keywords, in Aperture lingo) for categorizing my photos. I wrote all the tags into the exif data of my photos, then copied everything over to Aperture.
    Now, when I pull up an existing photo in Aperture browser, I can see the keywords that I already added. Great...but, is there a way to extract all the existing keywords from all my photos, and build a "library" of keywords that I can pick and choose from for tagging future photos?
    I tried what you described to see what would happen. I opened an image in Preview and added a keyword to it (one I was sure wasn't in my Aperture) saved the file and imported into Aperture. The new keyword was bot in the EXIF data field of the image and in Apertures keyword list.
    Are you familiar with the *Keywords HUD* (*Window->Show Keyword HUD*)? If you look there do you see your keywords from your imported images?
    Alternatively - if I could export a keyword list from Photoshop Elements (in txt or XML format, whatever) is there a way that I can import that into Aperture?
    There is a way to import and export keywords see *+Exporting and Importing Keyword Lists+* in the +Aperture Users Manual+ (get to it by *Help->Aperture Help*)
    From the reading I've done so far, it seems like I have to manually enter keywords on each photo or do a batch update (and, again, manually enter them). I'd much prefer to have a list of keywords that I can scroll down, then just click to select. Is that asking too much of Aperture?
    Not at all, ask away (you may not always like the answer )

  • Easy way to remove a keyword from select images

    Is there an easy way to remove a keyword?
    I want to remove a single keyword from nearly 100 images that have multiple keywords. The single keyword I want to remove exists in other images that I don't want it removed from.
    Any ideas?
    Thanks!

    Create a keyword button set and then either use the menu option to remove that keyword or the shortcut key.
    RB

  • Can you extract 'keywords' from a pdf document?

    Is there a way of extracting intelligent 'keywords' from a pdf document in order to use for cataloguing.
    If not, is there any sotware available compatible with Adobe PDF document that can extract 'keywords'  automatically?
    Any advice would be welcomed.
    Many Thanks

    It might be possible, but will require creating a custom-made script,
    plugin or stand-alone tool. You'll also need to better define based on what
    those keywords should be found.

  • Can we move a keyword from an event to the other ?

    Hi everyone,
    Here's the situation...
    I'm editing a TV show. Everything have been import and put on a drive. After a week of loggind and editing, we decide to clone the drive so we can give the clone to another editor so he can edit some scenes directly at home.
    The drive came back. It was pretty easy to transfer is project to the first drive and to open the event etc. Everything is working well, because it's a clone. BUT, he keyword a lot of important clips that I will need to use in a near future.
    Does somebody knows how to transfer a keyword from an event to the other.
    Oh yeah also, I can't open both event at the same time, even if I'm changing one event name. FCPX is not letting me do it because it's "the same event"
    Thanks.

    Playlists that you create on the Touch with iOS 4 will sync back to iTunes if you auto-sync.
    If you're manually managing the Touch I suspect that these playlists are like the old "On The Go" playlists and can't be transferred back to iTunes unless you use a 3rd party application.

  • Custom tag cloud webpart based on keywords from a Term Set in the Term Store .

    Hi Guys
    Does anyone have developed a custom Tag Cloud webpart in SharePoint 2010? I'm
    looking for a custom Tag cloud based on keywords from a Term Set in the Term Store.
    Unfortunately
    out of the box Tag Cloud Web Part only reference the Social Tags from the User.
    in my case editors have created pages and tagged a page using terms from the Term store.
    What I would like to see is a web part which could display “Top Keywords”, and the output is something like this:
    http://electronicdiscovery.info/what-additional-features-would-you-like-to-see-in-sharepoint-word-cloud-survey-electronic-discovery/
    Thanks In advance
    Tanaji Chavan

    Hi  Ramakrishnaraja ,
    Thanks for sharing the links , i tried using web part in second link but that’s not working , have also gone through the code of that web part seems like it is referring to some list like
    "Categories" and "Posts"
    however I'm looking for a custom Tag cloud based on keywords from a Term Set in the Term Store .
    Thanks 

  • Assign keywords from excel

    Hi there, I was wondering if anyone might have a suggestion for me: All our product images are named with a 9-digit ID number. All the item numbers and product information (name, color, gender, category, view, etc.) are stored in an Excel workbook for each photoshoot. Typically, we generate a list of keywords from the excel doc (using applescript), then import that list into Bridge before manually assigning keywords to each image. This seems like a perfect opportunity for automation. Is it possible for Bridge to open the Excel doc, find the cell with the name of the image, and assign the associated keywords from the same row? seems easy enough, but I'm not sure where to start.
    -S

    For gereral JavaScript array functionality :-
    http://www.w3schools.com/js/js_obj_array.asp
    There are a few examples of complete scripts here :-
    http://www.ps-scripts.com/bb/viewtopic.php?f=19&t=2320&sid=ad12f973f1d32fd1d4870ebc47cbefd 5

  • Running a Excel VBA Addin from Applescript

    Hi,
    I have created a VBA script in Excel 2011.  I want this scripot to be availbale to any workbook I open up in Excel so I have set the script as an Add-in.  Then I want to be abke to run this script from Applescript.  The final plan is to have an automater workflow which allows me to drag and drop an excel file onto it which will open the file, run the script I have told it to run and save the file again.
    I think it is a referencing issue I have, I'm using the "run VB macro" command but I am getting the referencing wrong somewhere along the line.  If anyone can help or point me in the direction of some good documentation it would be really helpful.
    Thanks

    the problem is that you keep trying to open the workbook when it is already open. in the attached code you will that I search to see if the workbook is open. If it is then I set it to be the active workbook and run the macro. If not then i open it and then run the macro.
    try the attached code and see if it works for you. You will hace to make sure that all the references are closed and that the comparison functionality works for you. I just kinda hacked this together as a proof of concept for you.
    Message Edited by Joe_H on 11-17-2009 12:04 PM
    Joe.
    "NOTHING IS EVER EASY"
    Attachments:
    excel_run_macro without open.vi ‏20 KB

  • Aperture Keywords From iPhoto

    1) I have imported my iPhoto Library
    2) I realize that iPhoto keywords are distinct from apeture keywords and I need to select photos by keywords.
    a) I have selected the old iphoto keyword via the smart setting library. The old photos appear. I then add new aperture keyword. (ie Sally Smith). This is easy.
    b) Then I delete the old iPhoto keyword via the most annoying thing of creating the keyword (see previous posts). Then shift enter the keyword away (see previous posts).
    c) HERE IS THE QUESTION. But it remains in the "not so" smart keyword library. Now I will have twice the number of keywords and have to remember which are old dead iPhoto keywords. I tried the plist trick (no luck). What do i do? Stay with iPhoto. This kind of *****.
    j
    Quad G5 with 30 inch   Mac OS X (10.4.4)   twin 500 gig drives

    I suspect that Aperture writes the keywords to the images or their version copies. to get rid of the old iPhoto keywords, make sure that they're no longer in the Keyword HUD and then rebuild the Aperture database. this will probably remove unused keywords from the filter list.
    while launching Aperture, press and hold option-command.

  • Removing keywords from multiple images when the keyword isn't in the list?

    So, I know that the method for removing a keyword from multiple images is to select the images, type the keyword in the inspector and press Shift-Return.
    However, that doesn't seem to work if the keyword I want to remove is not in the keyword database (i.e. it's not in the keyword HUD).
    For example, I deleted the iPhoto keyword group from the keyword HUD because I decided I didn't like that. I've got a bunch of photos that still have keywords like "Beach (iPhoto)". Typing "Beach" Shift-Return does nothing. Typing "Beach (iPhoto)" Shift-Return does nothing.
    Adding an iPhoto group back to the HUD and a child keyword of Beach and then Typing "Beach" Shift-Return works, but I can't believe that's how it's supposed to work.
    Is that the only way to do this? I've got a lot of those old iPhoto keywords to remove and that's going to be a major pain... there must be a better way.
    PowerMac Dual G5 2.0   Mac OS X (10.4.6)  

    I don't know if this will help you or not but it contains the roots of what you would need to script the removal of unwanted and unlisted keywords.
    -- script begins
    tell application "Aperture"
      -- set the target to the "Smart beetles" album at the top level of the library.
      tell album "Smart beetles" of folder ""
        -- get a list of the images in the album.
        set x to every image version
        -- move through the images one by one, deleting and creating the appropriate keywords
        repeat with i from 1 to x's length
          tell x's item i
            -- Note. if the keyword is top level, then the parents value is "".
            delete (every keyword whose name is "Australia" and parents is "Location")
            make new keyword with properties {name:"Sydney", parents:"Location"}
          end tell
        end repeat
      end tell
    end tell
    -- script ends

  • Automator: Create folder from filename

    I am trying to use Automator to query a file in a foldr, then create a folder based off of the filename, then move the file into the newly created folder. I am not as savvy as I thought that I was when it comes to Automator. Even thinking that Automator might not be the correct tool for the job. Each file has a different name or this would be a lot easier. Any help would be greatly appreciated.

    You can use a Run AppleScript action to do the work, and feed items to it by using a service workflow, an Ask for Finder Items action, etc - for example:
    1) Service receives selected files or folders in Finder
    2) Get Folder Contents
    3) Run AppleScript
    on run {input, parameters} -- create folders from file names and move
      set output to {} -- this will be a list of the moved files
      repeat with anItem in the input -- step through each item in the input
        set {theContainer, theName, theExtension} to (getTheNames from anItem)
        try
          set destination to (makeNewFolder for theName at theContainer)
          tell application "Finder"
            move anItem to destination
            set the end of the output to the result as alias -- success
          end tell
        on error errorMessage -- duplicate name, permissions, etc
          log errorMessage
          # handle errors if desired - just skip for now
        end try
      end repeat
      return the output -- pass on the results to following actions
    end run
    to getTheNames from someItem -- get a container, name, and extension from a file item
      tell application "System Events" to tell disk item (someItem as text)
        set theContainer to the path of the container
        set {theName, theExtension} to {name, name extension}
      end tell
      if theExtension is not "" then
        set theName to text 1 thru -((count theExtension) + 2) of theName -- just the name part
        set theExtension to "." & theExtension
      end if
      return {theContainer, theName, theExtension}
    end getTheNames
    to makeNewFolder for theChild at theParent -- make a new child folder at the parent location if it doesn't already exist
      set theParent to theParent as text
      if theParent begins with "/" then set theParent to theParent as POSIX file as text
      try
        return (theParent & theChild) as alias
      on error errorMessage -- no folder
        log errorMessage
        tell application "Finder" to make new folder at theParent with properties {name:theChild}
        return the result as alias
      end try
    end makeNewFolder
    4) other actions as desired

  • Pulling keywords from Index and putting them at bottom of topics

    I have a variable in my topic template that displays the last modified date of the topic like this:
    <p class=footertext><span style="font-size: x-small; font-style: italic; x-condition: Not_Print;">Last
    modified: <variable name=date x-format=default x-constant=TRUE x-value=40381.572928>July 23, 2010</variable></span>
    I don't recall where I got it from, but I'm sure it was in this forum. I'm wondering if whoever wrote that knows how to create a similar variable that would grab the index keywords from the topic (e.g., <meta name=MS-HKWD content="System Requirements">, <meta name=MS-HKWD content="Exchange Server 2007">, etc.) and paste them at the bottom of the topic like this: "Keywords: System Requirements, Exchange Server 2007" (An example of something similar is in our knowledgebase articles: http://kb.globalscape.com/KnowledgebaseArticle10369.aspx, but they use the term "Tags." That's "canned" software, so I don't know how they did it, except that I have to type the tags one at a time in a form that populates the bottom of the article.)
    WHY? Because I have all the keywords anyone would possibly want to search for (I hope) in various topics (which were entered manually or with Smart Index), but the only words that get results in the search are words that are actually IN the article. The words appear in the Index, as expected, and link to the proper article, as expected, but typing the word in the Search box in WebHelp does not return the article unless the word is displayed in the article. Some people use different words for the same idea, so they might not always search on the word that is in the article. (e.g., .bat, batch file, script, vbs, code, command...) So the simplest solution is to add the list of keywords at the bottom of the topic, but there are 1000s of topics and I'd rather not do that manually. (And no, I don't want to use ZoomSearch or other 3rd-party tools, thereby negating the "single-source" idea.)
    OH, for those of you who prefer to ask questions rather than answer them: I'm using RoboHelp 7 on Windows XP and generating WebHelp, HTMLHelp, Word docs, and JavaHelp. My computer has all of the latest updates and fixes for all of my software. Everything in the help works absolutely perfect, I just want to know how/if it's possible to create a variable as I describe.
    Thanks for any and all assistance!
    Karla

    As a forum member who "prefer[s] to ask questions rather than answer them," have you read the "Index Basics" topic in the RH 8 help?
    In there, you'll see that Index keywords and Topic keywords are different:
    Topic keywords appear the same as index file (HHK) keywords, but they are stored within individual HTML topics.
    Index file keywords are saved in the project index file (HHK) rather than in the code of individual HTML topics.
    Unless you can find some technical resource in your organization, your assessment of a manual solution is probably accurate. For an automated solution, you would need to run some type of script (before or after runtime?) to pull the Index keyword from the HHK file and place it inside the topic.
    For example, the Index keyword, the topic title, and the topic file name all appear in the HHK in this manner:
      <item name="Add-on Premium">
      <section name="Add-on Premium for Derivatives Exposure" link="add-on.htm">
      </section>
      </item>
    Another question: have you considered cross-references or user-defined variables in the Index? (See the "Add and link index keywords" help topic.) That's another manual solution, but would require less maintenance issues in the future.
    Good luck,
    Leon

  • Remove Keyword from Filter dialog box help

    When I imported my iPhoto library of about 5,000 photos Aperture created two keyword filters (visible when I open the FILTER dialog box and select "All Images" under the main Project Library. It created "iPhoto Edited" and "iPhoto Original" keywords. each of my imported iphoto photos had one of the keywords attached to them. I found originally that filtering through all images took forever - so I removed these two keywords from all of the imported iPhoto files.
    Question: how do I remove these two keywords from the FILTER dialog box? Note that these two keywords do not appear in the Keyword HUD at any time.

    Here is the code:
    var cResponse = app.response({ cQuestion: "Enter the Month & Year of Published Ad (i.e. August 2008)", cTitle: "Published Ad"});
    if (cResponse == null) app.alert("Process Cancelled");
    else ConvertToPA();
    function ConvertToPA() {
    var size = this.getPageBox("Media"); if ((size[0] == 0) & (size[1] == 612) & (size[2] == 792) & (size[3] == 0))
    { this.addWatermarkFromFile ({bOnTop: true, nHorizAlign: app.constants.align.left , nVertAlign: app.constants.align.bottom , nHorizValue: 184, nVertValue: 12,
    cDIPath: "/Macintosh HD/Users/ben/Desktop/Printer's Final PDF's/Printer's Final (Flyer Stamp).pdf"});
    this.addWatermarkFromText ({cText: cResponse + " Published Ad", cFont: "Arial,Bold", nFontSize: 24, aColor: [ "G", 0.5 ], bOnTop: true,
    nHorizAlign: app.constants.align.center, nHorizValue: 72, nVertAlign: app.constants.align.top, nVertValue: -42}); }; // Flyer Ad Horiz
    var size = this.getPageBox("Media"); if ((size[0] == 0) & (size[1] == 792) & (size[2] == 612) & (size[3] == 0))
    { this.addWatermarkFromFile ({bOnTop: true, nHorizAlign: app.constants.align.left , nVertAlign: app.constants.align.bottom , nHorizValue: 184, nVertValue: 12,
    cDIPath: "/Macintosh HD/Users/ben/Desktop/Printer's Final PDF's/Printer's Final (Flyer Stamp).pdf"});
    this.addWatermarkFromText ({cText: cResponse + " Published Ad", cFont: "Arial,Bold", nFontSize: 24, aColor: [ "G", 0.5 ], bOnTop: true,
    nHorizAlign: app.constants.align.center, nHorizValue: 72, nVertAlign: app.constants.align.top, nVertValue: -42}); }; // Flyer Ad Vert

  • Caml query to retrive keyword from rich text field

    hi friends
    i am using below caml query to retrieve data from title field and Rich text field(Definition) 
    <View>
    <Query>
    <Where>
    <And>
    <Or>
    <Eq>
    <FieldRef Name=\'Title\'/>
    <Value Type=\'Text\'>'+letter+'</Value>
    </Eq>
    <Contains>
    <FieldRef Name=\'Definition\' />
    <Value Type=\'Note\'>'+letter+'</Value>
    </Contains>
    </Or>
    <Neq>
    <FieldRef Name=\'status\' />
    <Value Type=\'Text\'>Not approved</Value>
    </Neq>
    </And>
    </Where>
    <OrderBy><FieldRef Name=\'Title\' /></OrderBy>
    </Query>
    </View>
    this query is working fine. But it is retrieving some extra fields also which doesn't have the queried string. and even it is retrieving keyword from image urls which are present in rich text field. 
    Please help me to retrieve key word from plain text of rich text field.

    Hi,
    According to your post, my understanding is that you want to use caml query to retrive keyword from rich text field
    By design, when specifying a ViewFields clause, values for these fields are returned, together with a few system columns like ID, Created and Modified.
    If you query rich text field, it will return the field with HTML tags.
    To retrieve key word from plain text of rich text field, you need to use regular expression to remove the HTML tags.
    You can use the code below:
    using (SPSite site = new SPSite("http://sitename"))
    using (SPWeb spWeb = site.OpenWeb())
    SPList spList = spWeb.Lists.TryGetList("ListName");
    SPQuery qry = new SPQuery();
    if (spList != null)
    qry.Query =
    @" <Where>
    <Contains>
    <FieldRef Name='Rich_x0020_Text' />
    <Value Type='Note'>caml</Value>
    </Contains>
    </Where>";
    qry.ViewFields = @"<FieldRef Name='Title' /><FieldRef Name='Rich_x0020_Text' />";
    SPListItemCollection listItems = spList.GetItems(qry);
    foreach (SPListItem item in listItems)
    string src = item["Rich_x0020_Text"].ToString();
    Regex htmlReg = new Regex(@"<[^>]+>", RegexOptions.Compiled | RegexOptions.IgnoreCase);
    src = htmlReg.Replace(src, string.Empty);
    Console.WriteLine(src);
    Console.ReadKey();
    The result is as below:
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

Maybe you are looking for

  • Multiple clients on Windows 7?

    I currently have a 64-bit Oracle 11gR2 client on Windows 7 64-bit desktop accessing an Oracle 10g database. This set-up works fine to reach the database either via SQL-PLUS or via a QlikView 64-bit desktop client. The problem is that Toad for Data An

  • How To Get Internal Modem Set Up in the Fax List - G4 AGP

    Recently installed OS 10.4.8 on my friend's upgraded G4 AGP (Sawtooth). Tried to set up his Mac's internal modem for faxing (no internet connection, he has cable modem for that). Got the fax set up to receive without problem. Tested it and it acknowl

  • Specifying number of decimal places in Jtable

    Hi, I have implemented a table and require a number to be displayed with four digit precision eg. 0.7827 Any suggestions on how to do this? I can't seem to work out how to do it using cellRender Thanks, Dave

  • Listing product numbers and linking related pdf

    I need to create a web page that just lists our product numbers and link a pdf for each. We are having problems with our original website where no changes can be made (including pricing). I am building a new one and although I have our shopping cart

  • ORA-01799: a column may not be outer-joined to a subquery

    Hi, How to solve this problem below?      and id2.invoice_line_id*(+)*=(select min(invoice_line_id)           from TW.invoice_detail           where invoice_id=239917           and (bl_amount_currency='USD' AND actual_amount_currency='VND'