Read/write keywords using applescript and iMagine Photo

Does anyone know if applescript & iMagine Photo are capable of reading/writing to the IPTC keywords?
I can't seem to figure it out. I use
{exif type:info, exif unicode:gImageInfoText}}
to modify description ({exif type:info, exif unicode:gImageInfoText}) field of the IPTC data but can't understand how to write to the keywords field.
Does anyone know to simply read the keywords form the IPTC data?
Thanks.
Pedro

You could install [ExifTool|http://www.sno.phy.queensu.ca/~phil/exiftool>, and then use “do shell script” commands such as in the following examples:
*do shell script "exiftool -keywords=AppleScript -keywords=\"iMagine Photo\" -keywords=IPTC ~/Desktop/myPicture.jpg"*
--> " 1 image files updated"
*do shell script "exiftool -keywords ~/Desktop/myPicture.jpg"*
--> "Keywords : AppleScript, iMagine Photo, IPTC"
Message was edited by: Pierre L.

Similar Messages

  • Asynchronous read & write by using Asynchronous api provided in nio-java 7

    HI,
    I am trying to write a small program to implement **asynchronous read & write by using Asynchronous api provided in nio in java 1.7** in windows machine.
    i tried the following code to write a small string to a file asynchronously.file is getting created but the contents are not dispalying.
         static long startTime = System.currentTimeMillis();
         static long endTime;
         static long execTime;
         public static void main(String[] args) {
              String path = "C:\\AsynchWrite.txt";
              Path file = Paths.get(path);
              final AsynchronousFileChannel channel;
              long pos = 1;
              try {
                   OpenOption[] options = { StandardOpenOption.CREATE,
                             StandardOpenOption.WRITE, StandardOpenOption.SYNC };
                   channel = AsynchronousFileChannel.open(file, options);
                   ByteBuffer buffer = ByteBuffer.allocate(1000);
                   String writeThis = "Testing by writing a line";
                   byte[] src = writeThis.getBytes();
                   buffer.put(src);
                   channel.write(buffer, pos, null,
                             new CompletionHandler<Integer, Object>() {
                                  @Override
                                  public void completed(Integer result, Object attachment) {
                                       System.out.println("completed successfully");
                                       System.out.println("start time :" + startTime);
                                       endTime = System.currentTimeMillis();
                                       System.out.println("end time : " + endTime);
                                       execTime = endTime - startTime;
                                       System.out.println("Execution Time :" + execTime);
                                       System.out.println("Execution Time(ms) :"
                                                 + execTime);
                                       try {
                                            channel.force(true);
                                            channel.close();
                                       } catch (IOException e) {
                                            // TODO Auto-generated catch block
                                            e.printStackTrace();
                                  @Override
                                  public void failed(Throwable exc, Object attachment) {
                                       // TODO Auto-generated method stub
                                       System.out.println("failed!!");
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         }Please help me out
    Thanks in advance,
    Ravi

    It looks like you are missing buffer.flip() after your put as otherwise the buffer position will be at 25 (not 0 as you expect).

  • How I generate index markers using Applescript and tagged text!

    One of the challenges I've faced in automating the book making process using Applescript with inDesign is that there don't seem to be any AS commands for making new index markers (anyone please correct me I if I'm wrong about this).
    I've tried various js scripts which do an OK job, but they don't make the actual native markers. This means you have to wait until the book (consistiing of multiple ID files) is complete (so that all the page numbers have been established) to generate the index.
    Recently, I read a tweet from someone with a link to a technique which uses tagged text and find and replace with GREP to edit the tags, inserting the tagged text index tags in the text file and then re-placing the text file in the ID page. In itself, this works great. But I'm dealing with literally thousands of separate text frames, none of them connected in a story.
    The books typically consist of around 1200 pages with almost that many people, each of whose names I need to index with "Lastname, Firstname" references. And those particular strings don't (can't) appear anywhere on the pages. There will also be about 50 ID files all combined into one book. So it is imperative that I have ID generate the native index markers. To help keep things straight and efficient, I'm creating separate small text frames to hold the lastname, firstname strings. I created an object style for these frames which sets the attributes to "nonprinting", and I place the frames in the margin.
    Then I realized that I don't actually have to have ID export the tagged text files for each. I exported one prototype and copied its tags to properties in my script, and then I concatenate them with the respective list item values I import from the database.
    At the proper point in the page building script, I tell "textwrangleer" to make a new document, set its contents to the index string for the current record, save it to disk, overwriting the previous one, and then tell ID to "place" it in the index text frame, which generates the ID index mark.
    I actually got an AS error when I first tried this: "file doesn't exist" or some such. Then I realized that the "place" command was happening too soon, so I inserted a .5 sec delay in the script, and it worked.
    This is actually my first major script for actual work, and I'm so excited about it! I promises to cut production time down to about a thenth of what it was.
    I still have to add some logic to branch between handlers with slightly different parameters for five different page formats, but the same page building handler will work on all of them.

    A note on this:
    Daniel Swanson wrote:
    I've tried various js scripts which do an OK job, but they don't make the actual native markers. This means you have to wait until the book (consistiing of multiple ID files) is complete (so that all the page numbers have been established) to generate the index.
    These scripts typically search for words and immediately write out the page numbers they are found on -- one shot indexing.
    The solution is to add both the topic and its page reference to the current document's index:
    if (app.activeDocument.indexes.length == 0)
        app.activeDocument.indexes.add();
    app.activeDocument.indexes[0].topics.add(app.selection[0].contents).pageReferences.add(app.selection[0]);
    The first lines only make sure there is an index to add to (per default, a new document has none).
    The last line adds a selected word to the index (it must be a plain text string, hence the use of its 'contents'), and then adds a reference to the selection in the text itself.
    Adding the same word a second time will for a change (quite untypically for ID's Scripting) not result in an error but simply add another page reference to the existing one.
    When doing this in a loop: remember to work backwards, because the index marker itself gets inserted into the running text, and that will throw off your text indices.

  • When I open the browser, it says as an alert regarding the profile directory and says that read/write should be changed and it doesn't work then.i uninstalled and re-installed firefox6.0.2.how can i overcome this problem

    could not initialize the application's security component .the most likely cause is problems with files in your application's probile directory.please check that this directory had no read/write restrictionsand ur hard disk is not full or close to full .It is recommended that you exit the application and fix the problem.if you continue to use this session ,you mightsee incorrect application behaviour when accessing security features....THIS IS THE ALERT I GET WHENEVER I TRY TO OPEN FIREFOX.

    See:
    *https://support.mozilla.com/kb/Could+not+initialize+the+browser+security+component

  • Reading XML file using BAPI and then uploading that xml file data into SAP

    I am getting a xml file from Java server. I need to take
    data from this file using BAPI and need to upload into SAP using SAP.
    Please tell me how to read XML files using BAPI's.

    <b>SDIXML_DATA_TO_DOM</b> Convert SAP data (elementary/structured/table types) into DOM (XML
    <b>SDIXML_DOM_TO_XML</b>  Convert DOM (XML) into string of bytes that can be downloaded to PC or application server
    <b>SDIXML_DOM_TO_SCREEN</b> Display DOM (XML)
    <b>SDIXML_DOM_TO_DATA</b>
    data: it_table like t001 occurs 0.
    data: l_dom      TYPE REF TO IF_IXML_ELEMENT,
          m_document TYPE REF TO IF_IXML_DOCUMENT,
          g_ixml     TYPE REF TO IF_IXML,
          w_string   TYPE XSTRING,
          w_size     TYPE I,
          w_result   TYPE I,
          w_line     TYPE STRING,
          it_xml     TYPE DCXMLLINES,
          s_xml      like line of it_xml,
          w_rc       like sy-subrc.
    start-of-selection.
      select * from t001 into table it_table.
    end-of-selection.
    initialize iXML-Framework          ****
      write: / 'initialiazing iXML:'.
      class cl_ixml definition load.
      g_ixml = cl_ixml=>create( ).
      check not g_ixml is initial.
      write: 'ok'.
    create DOM from SAP data           ****
      write: / 'creating iXML doc:'.
      m_document = g_ixml->create_document( ).
      check not m_document is initial.
      write: 'ok'.
      write: / 'converting DATA TO DOM 1:'.
      CALL FUNCTION 'SDIXML_DATA_TO_DOM'
        EXPORTING
          NAME               = 'IT_TABLE'
          DATAOBJECT         = it_table[]
        IMPORTING
          DATA_AS_DOM        = l_dom
        CHANGING
          DOCUMENT           = m_document
        EXCEPTIONS
          ILLEGAL_NAME       = 1
          OTHERS             = 2.
      if sy-subrc = 0.  write  'ok'.
      else.             write: 'Err =', sy-subrc.
      endif.
      check not l_dom is initial.
      write: / 'appending DOM to iXML doc:'.
      w_rc = m_document->append_child( new_child = l_dom ).
      if w_rc is initial.  write  'ok'.
      else.                write: 'Err =', w_rc.
      endif.
    visualize iXML (DOM)               ****
      write: / 'displaying DOM:'.
      CALL FUNCTION 'SDIXML_DOM_TO_SCREEN'
        EXPORTING
          DOCUMENT          = m_document
        EXCEPTIONS
          NO_DOCUMENT       = 1
          OTHERS            = 2.
      if sy-subrc = 0.  write  'ok'.
      else.             write: 'Err =', sy-subrc.
      endif.
    convert DOM to XML doc (table)     ****
      write: / 'converting DOM TO XML:'.
      CALL FUNCTION 'SDIXML_DOM_TO_XML'
        EXPORTING
          DOCUMENT            = m_document
        PRETTY_PRINT        = ' '
        IMPORTING
          XML_AS_STRING       = w_string
          SIZE                = w_size
        TABLES
          XML_AS_TABLE        = it_xml
        EXCEPTIONS
          NO_DOCUMENT         = 1
          OTHERS              = 2.
      if sy-subrc = 0.   write  'ok'.
      else.              write: 'Err =', sy-subrc.
      endif.
      write: / 'XML as string of size:', w_size, / w_string.
      describe table it_xml lines w_result.
      write: / 'XML as table of', w_result, 'lines:'..
      loop at it_xml into s_xml.
        write s_xml.
      endloop.
      write: / 'end of processing'.
    end of code
    Hope this will be useful.
    regards
    vinod

  • Using Applescript and Automator to manage files and folders

    Hi all.
    I need to make a simple action via applescript and-or automator to take the file it's been applied to (via the services) create a folder around it with the same name as the file.
    So far, I've searched the web, found some solutions but none are really working.
    Here's the script I found :
    set myFolder to findFolder()
    tell application "Finder" to set myFiles to files of myFolder as alias list
    repeat with aFile in myFiles
      set bName to my baseName(aFile)
      tell application "Finder"
      set folderExists to exists folder bName of myFolder
      if not folderExists then make new folder at myFolder with properties {name:bName}
      move aFile to folder bName of myFolder
      end tell
    end repeat
    ---------------- HANDLERS ----------------
    on baseName(myFile)
      tell application "System Events" to set {fileName, fileExt} to {name, name extension} of myFile
      return text 1 thru ((get offset of "." & fileExt in fileName) - 1) of fileName
    end baseName
    on findFolder()
      activate application "SystemUIServer"
      -- Bug pointed out by Lauri Ranta http://www.openradar.me/9406282
      tell application "Finder"
      activate
      set mySelection to (get selection)
      if mySelection ≠ {} then
      set mySelection to first item of (get selection)
      if mySelection's class = folder then
      set currentFolder to mySelection
      else if mySelection's class = document file then
      set currentFolder to parent of mySelection
      else if mySelection's class = alias file then
      set currentFolder to original item of mySelection
      end if
      else
      set currentFolder to target of front Finder window
      end if
      end tell
      return (currentFolder as alias)
    end findFolder
    And here's a page where they explain how to use automator and the Services to do what I <allmost> want, with some adaptation.
    But it still doesn't work.
    http://hbase.net/2011/08/17/move-selected-files-into-a-new-folder-using-applescr ipt-and-automator/
    So if anybody has an idea n how I could do this ?
    It It could either be a folder action (I drag and drop the files into a folder and boom, they get their folder around them)that I would set on a folder on a network drive, or locally, it doesn't matter, or a service (right clic on the file and boom folder around it.
    So if anyone could help with this I'd be grateful...

    Hi,
    Make an Automator Service (Service receives selected "Files or Folders"  in the "Finder.app").
    Use this script in the "Run AppleScript" action:
    on run {input, parameters}
        tell application "Finder"
            repeat with aFile in input
                if class of (item aFile) is not folder then
                    set {tName, fileExt} to {name, name extension} of aFile
                    if fileExt is not missing value and fileExt is not "" then
                        set tName to text 1 thru -((count fileExt) + 2) of tName
                        tell (get container of aFile)
                            if not (exists folder tName) then make new folder at it with properties {name:tName}
                            move aFile to folder tName
                        end tell
                    end if
                end if
            end repeat
        end tell
    end run
    This script work on files with a name extension.

  • Reading result table using LDB and event get payroll

    Hi Technical experts,
    I need help regarding reading cluster RT using logical database pnp and event get payroll.
    Please help me out.
    Best Regards.
    Priyaranjan

    Suresh, I also have one more question.  
    If I use GET pernr or GET payroll inside a subroutine after start of selection, it gives error saying "Before the statement "GET" , the structure introduced by FORm shuld be ended by END FORM, which is already ended correctly.
    When I move the Get events outside the subroutines, i dont get this error. 
    Does that mean, these events cannot be used in the subroutines?

  • Adobe acrobat reader 9 problem saving forms and copying photos

    I used adobe acrobat reader 6 at
    work and I have a form that I save with new data. I am also able to copy text and photos using version 6.
    When I try to save edited forms and copy files from versiion 9 It wont allow me to do that.
    Is their any way that I can copy text, photos and save forms in Adobe version 9?
    When I try to save forms in version 9 it states that I am unable to save the form. When I try to copy text or photos it will not allow me to copy.

    Are you talking about Reader or Acrobat. These are two different programs and Reader definitely has restrictions. Reader used to be called Acrobat Reader before version 6, but that has been gone a long time. The change was likely because of the confusion between Acrobat and Reader. The problems you indicate are suggestive of Reader, not of Acrobat.

  • Unable to read/write bytes using 9870 with cRio 9151

    Hi everyone,
    I'm currently having some problems trying to use 2 ports of module NI 9870. I'm unable to read bytes even if I try to send some datas (I always get a Timeout) and I'm also unable to write some datas( I can't see nothing on Hyperterminal).
    Please find enclosed a snapshot of my Fpga code.
    Regard,
    Nicolas Kaminski, Toulouse France
    Attachments:
    ReadBytes.jpg ‏93 KB
    WriteBytes.jpg ‏30 KB

    Hello,
    Can you give us some other details:
    Are you sure that you provide power to the 9870 module?
    Do you have tested your system with an example? (NI-987x Serial Loopback.lvproj)
    DO you get something through that loopback?
    Regards,
    Mathieu P. | Certified LabVIEW Associate Developer
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Journées techniques : des fondamentaux aux dernières technologies pour la mesure et le contrôle/comm...

  • HT5129 using apeture and moving photos selected or event to apeture from iphoto

    how do I move an event to apeture from iphoto? They will not stay open together for me to drag? or slideshow or a photo, anything that may help?

    If you're using iPhoto 11 and Aperture 3 there's no need to move anything. Just open the Library with your preferred app.

  • Read/Write ints using 2bytes

    Hi. I was wondering if anyone can help me read and write one interger using two bytes. I have an interger between 500-800 that I need to write. Normally I would use...
    OUT.writeByte(int)
    But as 500 is above one byte (256) I was wondering how to write this, and then later read it back.
    As since one int would be spread over two bytes, I have no idea how to read it, normally I would use
    IN.readByte()
    And I have no idea how to do this. Can anyone help me please?

    You were told how to do this using individual bytes in your other thread here:
    http://forum.java.sun.com/thread.jspa?threadID=576927&tstart=0
    If you don't know how to write the code and are not willing to use the Java Tutorial to learn how to do it, then write it as a short, which is 2 bytes.
    (You write the code, we comment on the problems, not the other way 'round)

  • Creating triggers in SQLJ using the keywords using :New and :Old

    Hey all,
    it seems that my SQLJ compiler treats the oracle value :New as if :New was a variable passed in through Java as opposed to being intrinsic to the database.
    #sql {
    CREATE OR REPLACE TRIGGER MyTrigger BEFORE INSERT OR UPDATE ON MyTable
    DECLARE
    BEGIN
    select Value into :new.rowstamp from OtherTable;
    END;
    of course these are all dummy table and variables, but I just can't seem to get this to compile due to :New variable being treated as a variable that is passed through java.
    any help would be greatly apperciated.

    David,
    Two years later... :-)
    I assume you've already resolved this, but I figured this could help others that may encounter the same problem.
    The only way I know to do this is to use native dynamic SQL (NDS).
    For example:
    #sql {
    declare
      L_SQL  varchar2(2000);
    begin
      L_SQL :=
    'create or replace trigger MY_TRIGGER
    before insert or update on MY_TABLE
    begin
    select VALUE into :new.ROWSTAMP from OTHER_TABLE;
    end;';
      execute immediate L_SQL;
    end;
    };Good Luck,
    Avi.

  • Read / Write Security from Query and Display Templates

    When you assign a role to the READ access of the Security tab of either the Query or Display template, this means the user can only view the report on the screen.
    My question is...
    When you assign a role to the WRITE access of the Security tab of either the Query or Display template, DOES this means the user can enter information on the screen?  Or is there another meaning to the WRITE section?

    Please look at the bottom of this page:
    <a href="http://help.sap.com/saphelp_xmii115/helpdata/en/Getting_Started/Template_Editor/Query_Editor.htm">http://help.sap.com/saphelp_xmii115/helpdata/en/Getting_Started/Template_Editor/Query_Editor.htm</a>
    Writer Roles is a design time template editor permission to make physical changes to the template itself.
    Regards,
    Jeremy Good

  • Slow read/write over Thunderbolt and SSD

    Hey all,
    I recently picked up a Seagate GoFlex Thunderbolt sled and a 256GB Toshiba SSD for it.
    I am wanting to use it as my Lightroom 5 catalog and Smart Preview drive, and leave the main HD clean.
    When transfering all the info over from my main HDD, (158GB) I checked on Activity Monitor to see the real time read/write to the drive, and it only topped out at 150MB/sec.  What gives?
    I tested with an external FW800 and got 50-60MB/sec
    Then tested with esata drive and got 80MB/sec
    Both of these are platter drives.
    I was expecting WAAAYYY more from the Seagate TB and SSD combo.
    Did I set something up wrong?  Have I been reading data wrong?
    2011 i7 MBP
    16GB ram
    Toshiba SSD
    Seagate GOflex Thunderbolt Adapter
    Thank you

    Hey,
    I have the Seagate GoFlex Thunderbolt.  And C300 SSD connected to it.  The speed at which I am getting the SSD write at 196.5 MB/s and to read 323.4 MB/s.
    You can use something call blackmagic disk speed to monitor how fast your drive is actually reading and writing.
    The speed limitation you see may be from the actual SSD or copying from HDD to SSD.  This will test direct reading and writing on the SSD, and will give you a better/truer speed.
    Hope that helps
    Ed

  • Using Automator and Applescript to search and move files to flash drive

    I've used applescript and automator to do simple tasks like watch folders and move files and rename files, but that is about the extent. I am wondering if it is possible to set up a automator service or app that will do several things.
    When a flash drive is plugged it, it will ask for a file to be searched for, then it will search a predetermined directory for files with the word or number in them and then it will copy the found files to the mounted flash drive.
    Any help would be greatly appriciated!
    Thanks!

    As a start, you can use launchd to run a script when a volume is mounted:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
              <key>Label</key>
              <string>com.tonyt.LaunchOnVolMount</string>
              <key>ProgramArguments</key>
              <array>
                        <string>LaunchOnVolMount.sh</string>
              </array>
              <key>QueueDirectories</key>
              <array/>
              <key>StartOnMount</key>
              <true/>
              <key>WatchPaths</key>
              <array/>
    </dict>
    </plist>
    You can then have the LaunchOnVolMount.sh script perform the tasks you need.
    You can incorporate Applescript within the Bash script with osascript:
    #!/bin/bash
    answer=$( osascript -e 'tell app "System Events" to display dialog "What file do you want to search for?" default answer "" ' )
    echo $answer
    I beleive that you can also call an Applescript from launchd

Maybe you are looking for