Problem with AppleScript command "Duplicate"?

Hi all.
I'm relatively new to AppleScript so I hope I can get some help here.
I'm writing a script for Aperture 3.0.3 that
1. Makes 4 new versions of the currently selected image
2. Applies 4 different image adjustment presets to the new versions.
3. Presents the 4 adjusted versions on screen.
Making duplicate versions with AppleScript was easy enough, but how do I get an ID for the newly created versions? The "Duplicate" command doesn't return any information at all.
How do I talk to image versions created with the duplicate command?
Can anyone help?
Message was edited by: Monostratos

Hi,
I'm also interested in a script like that. Have you had any success?
I've found this site, where you can purchase a similar script:
http://www.apertureexpert.com/storedetails/applescript-4-up-auto-levels-curves-r gb-luminance.html
/Christian

Similar Messages

  • Problems with 'df' command

    Hello folks,
    I'm having some problems with df command:
    Output:
    [nenemfromhell@myhost ~]$ df -h
    Filesystem Size Used Avail Use% Mounted on
    udev 999M 4.0K 999M 1% /dev
    none 999M 4.0K 999M 1% /dev
    /dev/sda8 133G 125G 2.0G 99% /media/DU
    shm 999M 0 999M 0% /dev/shm
    First: It doesn't show my root partition, but i can check it in gparted.
    Second: /dev/sda8 is a NTFS partition that its size is 12GB
    Thanks.
    Last edited by nenemfromhell (2012-01-20 03:37:30)

    Please include some detail as to how you solved the problem: https://wiki.archlinux.org/index.php/Fo … way_Street

  • Problem with shell commands and scripts from an Applescript Application

    Hi-
    I am fairly new to OSX software development. I am trying to build an application that creates a reverse SSH tunnel to my computer and starts OSXvnc. The idea is that my Mom or anyone else who needs help can connect to me without having to tinker with their firewalls.
    There are plenty of resources on how to do this, and I have found them. What I have a problem with is the following.
    I am building this application in Xcode as an Applescript application, because Applescript and shell scripting are the only forms of programming I know. I use an expect script to connect through SSH, and a "do shell script" for the raw OSXvnc-server application to allow screen sharing.
    The problem is that when I click on the button to launch OSXvnc-server or the button to launch SSH, the application freezes until the process it spawns is killed or finishes. For example, I can set SSH to timeout after 60 seconds of no connection, and then the Applescript application responds again. I even tried using the ssh -f command to fork the process, but that doesn't seem to help.
    I am also using "try" around each of the items.
    What am I doing wrong? How can I make the buttons in my app launch SSH and OSXvnc-server without hanging the application while it waits for them to finish?
    Thanks so much!

    See here for an explanation of the syntax.
    (20960)

  • Problem with applescript dates from Numbers

    Can anyone explain this to me please?
    tell application "Numbers" to tell table 1 of sheet 1 of front document
              set value of cell ("C2") to "=NOW()"
              set nowDate to (value of cell "D2")
      log nowDate
    end tell
    results in 
    26 Mar, 2013 5:10 PM
    appearing in cell C2, but the log tells me
    (*date Wednesday, 27 March 2013 6:10:14 AM*)
    I realise that the date formats will differ - and  one of Yvan Koenigs's useful postings explains that when we extract a date from a Numbers table we get a UTC date time value. He also showed how to get rid of  that problem with the formula :
    ="" & ref_to_date_time_cell
    But the UTC time when I obtained the above result  was 4:10 am on 26th March,  not 6:10 am on 27th March.  Why is this?
    Incidentally, is there a better way of putting the current date into an applescript variable?

    If your local time is 5:10 PM on the 26th when the UTC time is 4:10 AM on the 26th, your local time is apparently 13 hours ahead of UTC. Therefore, if the UTC time were 5:10 PM on the 26th, your local time would be 6:10 AM on the 27th. There is nothing inconsistant here. Numbers' value is a local time, but AppleScript thinks it is UTC and converts it.
    In general, the current date command in AppleScript would be the best way to put the current date into an AppleScript variable; no need to involve Numbers:
    set nowDate to current date
    (See the Miscellaneous Commands section of the Standard Additions dictionary in your AppleScript Editor.)

  • Problem with issuing command via CustomScriptExtension

    I am trying to issue a CustomScriptExtension command to an Azure virtual machine from within my C# application. The CustomScriptExtension is installed in the VM and working. I verified this by issuing a test command via PowerShell. Essentially I am trying
    to execute what would be the equivalent to the PowerShell command Set-AzureVMCustomScriptExtension, but in code.
    Below is the code segment that I am having problems with:
    ComputeManagementClient client = new ComputeManagementClient(AzureSessionInfo.CloudCredentials);
    IList<ResourceExtensionReference> extReferences = new List<ResourceExtensionReference>();
    IList<ResourceExtensionParameterValue> extParamValues = new List<ResourceExtensionParameterValue>();
    string account = "{\"storageAccountName\":\"" + AzureSessionInfo.StorageAccount + "\",\"storageAccountKey\": \"" + AzureSessionInfo.StorageAccountKey + "\"}";
    string scriptfile = "{\"fileUris\": [\"" + "https://teststorageaccount.blob.core.windows.net/testcontainer" + "\"], \"commandToExecute\":\"powershell -ExecutionPolicy Unrestricted -file " + "ScriptName.ps1" + "\"}";
    byte[] bytes1 = System.Text.Encoding.UTF8.GetBytes(account);
    bytes1 = System.Text.Encoding.UTF8.GetBytes(account);
    string ScriptPrivateConfig = Convert.ToBase64String(bytes1);
    byte[] bytes2 = System.Text.Encoding.UTF8.GetBytes(scriptfile);
    bytes2 = System.Text.Encoding.UTF8.GetBytes(scriptfile);
    string ScriptPublicConfig = Convert.ToBase64String(bytes2);
    ResourceExtensionParameterValue extRef_Parameter1 = new ResourceExtensionParameterValue()
    Key = "CustomScriptExtensionPrivateConfigParameter",
    Value = ScriptPrivateConfig,
    Type = "Private"
    ResourceExtensionParameterValue extRef_Parameter2 = new ResourceExtensionParameterValue()
    Key = "CustomScriptExtensionPublicConfigParameter",
    Value = ScriptPublicConfig,
    Type = "Public"
    extParamValues.Add(extRef_Parameter1);
    extParamValues.Add(extRef_Parameter2);
    ResourceExtensionReference extRef_CustomScript = new ResourceExtensionReference
    Name = "CustomScriptExtension",
    Publisher = "Microsoft.Compute",
    Version = "*",
    ReferenceName = "CustomScriptExtension",
    ResourceExtensionParameterValues = extParamValues
    extReferences.Add(extRef_CustomScript);
    AzureSessionInfo.CloudServiceName = "CS1000001";
    AzureSessionInfo.VMName = "CS1000001";
    AzureSessionInfo.ImageFamilyName = "Windows Server 2012 R2 Datacenter";
    client.VirtualMachines.Update(AzureSessionInfo.CloudServiceName,
    AzureSessionInfo.VMName,
    AzureSessionInfo.VMName,
    new VirtualMachineUpdateParameters
    RoleName = AzureSessionInfo.VMName,
    ResourceExtensionReferences = extReferences
    I receive the following error message back from the call:
    BadRequest: Invalid extension reference parameter value in JSON configuration data for the Role: CS1000001, Reference name: CustomScriptExtension.
    I could only find very little documentation on this. Any help would be appreciated.

    Thanks Mekh... after many hours of researching and trial/error, I figured it out.
    The MSDN article I used previously led me down the wrong path. (see article here: http://msdn.microsoft.com/en-us/library/azure/dn781373.aspx). This may work for RESTful calls but not for .NET API calls.
    The part of the code that was hurting me was where the command strings (account and
    scriptfile) were being converted to Base64 encoding. This is NOT correct for .NET calls. Once I removed that, everything worked fine.
    I came across this after researching the same commands used by Linux scripts. They don't convert to Base64 either so I wonder why this is included in the documentation at all.
    In either case, I figured it out, but the documentation is very poor in this area (or all together non-existent). I don't even see where it is documented as to which JSON parameters names are supposed to be used, or even that JSON is required.
    Also, related to the Update command, if you are truly "updating" the config, you must include everything about the original config (whether it changed or not) along with the changes you want to make. If not then you will undo ALL but the changes
    you issued via the command.

  • Problem with runas command. Elevation error

    Running on Win 8.1 Pro I'm facing a problem with runas.
    What I'm trying to do is launch an mmc as my domain admin account.
    Therefore I type this command from an elevated cmd (Right-click "Run as Administrator"):
    runas /user:Contoso\MyDomainAdmin /noprofile mmc
    This worked like a charm in Windows 7, and on my Win81Pro client it yields:
    RUNAS ERROR: Unable to run - mmc
    740: The requested operation requires elevation.
    The account I'm logged in with, is local admin, and the UAC slider is set in the bottom.
    In the eventviewer, I only see some special logons where my normal account is trying to impersonate my domain admin account, and the next event, the domain admin's session is destroyed.
    If this is by design, how would I then run mmc as my domain admin and at the same time avoid its credentials being stored on the local machine?
    Thanks in advance!

    yes, you need to be local admin to be able to elevate!
    I've tested this on a system here and I reproduce the issue you encountered. Some investigation showed running a program that requires elevation using runas is not  possible http://msdn.microsoft.com/en-us/library/bb756922.aspx
    MCP/MCSA/MCTS/MCITP

  • Problems with AppleScript Editor.app in Snow Leopard

    I have been using the Satimage.osax scripting addition with Script Editor.app in Leopard without problem. After I upgraded to Snow Leopard, the Script Editor.app was replaced by AppleScript Editor.app in which the following one-line script
    change "," into "." in "3,1416"
    compiles without error but it gives an error when I try to run it: as if AppleScript Editor.app was not able to load the ScriptingAdditions (despite the fact that it correctly shows the dictionary for the Satimage.osax scripting addition).
    When I decided to get back the old "Script Editor.app" and use it in Snow Leopard to run the above script, I found... no error! It ran correctly.
    Anybody observed similar problems with the AppleScript Editor.app and ScriptingAdditions?
    Can anybody offer a solution other than trash the new AppleScript Editor.app and stick to the old Script Editor.app?

    Post to the AppleScript forum under OS X Technologies and send a message to Satimage.

  • Problem with java commands

    Hello,
    I am able to run the java command on the command promt, but other commands like javap,javac are not working, its saying
    "javap not recognized and internal or external command operable program or batch file"
    what could be the problem?
    thanks in adv
    vakvarma

    thanks for ur reply
    its the problem with my path settings and i have corrented it

  • Small problem with applescript

    Hello Again,
    Every day I use a morning script to launch my programs I have to use... and some more things...
    Aldo I have a problem with Golive.
    When I try to type activate in the editor it makes a bigg A.
    Also with cut and past.
    and when i run the applescript-program it does all I need ( The golive part is at the end... but when I place it in the middle it's just stops.
    I get this fault message : Can't continue <event Coreactv>
    and i guess it has something to do with the A-ctivate
    Is this a bugg? Or can someone explain this?
    I would like to do more after launching Golive..
    tell application "Extensis Suitcase X1"
    activate
    end tell
    tell application "Mail"
    activate
    end tell
    tell application "Adobe Photoshop CS"
    activate
    end tell
    tell application "QuarkXPress Passport"
    activate
    end tell
    tell application "Adobe GoLive CS"
    Activate
    end tell

    Some apps don't respond well to tell blocks. I don't have that app to test, but you could try using something like launch "TextEdit" or tell app "Finder" to open posix file "/Applications/TextEdit.app" to improve your results. Sometimes an ignoring application responses block can help too.

  • Problem with applescript for Numbers

    I am new to Applescript and am haveng problems with what seems to be a pretty simple task.  I want to check the value of each cell to test for a certain condition and then based on the results increment another cell.  I keep getting the following error:
    error "Numbers got an error: Can’t make {4, 5} into type integer." number -1700 from {4, 5} to integer
    Here is my script:
    tell application "Numbers" to tell document 1 to tell sheet "Sheet 1" to tell table "Table 1"
              set fNineStart to 4
              set fNineEnd to 12
              set bNineStart to 14
              set bNineEnd to 22
              repeat with irow from 8 to 40
                        set skinscount to 0
                        repeat with jcol from fNineStart to fNineEnd
                                  set minscore to value of cell (jcol & 5)
                                  if value of cell (jcol & irow) is equal to minscore and the value of cell (jcol & 6) is equal to 1 then
                                            set skinscount to skinscount + 1
                                  end if
                        end repeat
                        set the value of cell (27 & irow) to skinscount
              end repeat
    end tell
    Here is the spreadsheet:
    Name
    1
    2
    3
    4
    5
    6
    7
    8
    9
    Front
    Nine
    10
    11
    12
    13
    14
    15
    16
    17
    18
    Back
    Nine
    Total
    Net
    ESC
    score
    Skins
    Par
    4
    4
    4
    5
    3
    4
    5
    3
    4
    36
    4
    5
    3
    4
    5
    3
    4
    4
    4
    36
    birdie
    3
    3
    3
    4
    2
    3
    4
    2
    3
    27
    3
    4
    2
    3
    4
    2
    3
    3
    3
    27
    eagle
    2
    2
    2
    3
    1
    2
    3
    1
    2
    18
    2
    3
    1
    2
    3
    1
    2
    2
    2
    18
    low score
    3
    4
    4
    3
    3
    4
    5
    3
    4
    4
    4
    3
    4
    5
    3
    4
    4
    4
    # of people with min.
    1
    3
    1
    1
    1
    2
    4
    1
    2
    16
    2
    1
    2
    3
    3
    2
    1
    4
    2
    Skins
    HCP
    Joe
    y
    3
    3
    4
    5
    5
    3
    4
    5
    4
    5
    38
    5
    5
    4
    4
    5
    3
    4
    4
    5
    39
    77
    74
    Bill
    y
    7
    5
    4
    5
    5
    4
    4
    5
    4
    4

    Hi fairchild.bill,
    Real experts will I hope chime in, but I think one problem is the way you are referring cells:
    Instead of:
    value of cell (jcol & irow)
    I think you need to use something like:
    value of cell irow of column jcol
    And
    value of cell jcol of row irow
    Studying examples of scripts for Numbers 3 at macosxautomation.com may give you some ideas on this.
    SG

  • Problems with AppleScript and MS Office 2011

    The script below used to work great for converting MS Word files to PDF files.  However, sometime during the last few months it has stopped working and will no longer compile without error.  Possibly after upgrading to Mavericks but I'm not exactly sure when it stopped working, could have been an update to Office.  Anyway, the error I'm getting when I compile is a Syntax Error, "Expected end of line but found class name".  The editor highlights "document" in the line "set the_doc to active document".  I'm not very familiar with Applescript but I have opened the scripting dictionary for Microsoft Word in the Applescript editor and I do see "active document" as a property of the "document" object.  So why doesn't the compiler recognize it?  Am I missing something obvious or was there some sort of change in Mavericks that broke this functionality?
    I've been pulling my hair out trying to get this script working again  but I have not had any luck.  I've tried uninstalling and reinstalling Microsoft Office per instructions from Microsoft.  I have all the latest updates and patches. Any help would be greatly appreciated.
    Here is the original code which used to work just fine.
    -- Stephen Norum
    -- [email protected]
    property pdf_ext : ".pdf"
    on remove_extension(file_path)
        -- remove the extension if it exists
        set stripped to do shell script ("F=" & quoted form of file_path & " ; echo ${F%.*}")
        return stripped
    end remove_extension
    on get_pdf_path(doc_path)
        set doc_path to remove_extension(doc_path)
        -- Try the simple name first
        set pdf_path to (doc_path & pdf_ext)
        -- Otherwise, number the pdfs
        set counter to 1
        tell application "Finder"
            repeat while (exists pdf_path)
                set pdf_path to (doc_path & " " & counter & pdf_ext)
                set counter to counter + 1
            end repeat
        end tell
        return pdf_path
    end get_pdf_path
    on run {input, parameters}
        repeat with file_name in input
            tell application "Microsoft Word"
                open file_name
                set the_doc to active document
                set doc_path to path of the_doc
            end tell
            set pdf_path to get_pdf_path(doc_path)
            tell application "Microsoft Word"
                save as active document file name pdf_path file format format PDF
                close active document
            end tell
        end repeat
        tell application "Finder"
            activate
        end tell
        return input
    end run

    try this syntax:
                        tell application "Microsoft Word"
      save as (active document) file name pdf_path file format PDF
                        end tell
    Apparently they changed the enumeration label from format PDF to just plain old PDF without bothering to update the scripting dictionary or ensure backward compatibility. If you want to know how they managed to do that, they are still not using sdef or even scriptSuite xml files, but are loading the scripting information from old-school (i.e. os 8 or os 9 style) resource files.
    I've occasionally considered writing Microsoft a proposal to redo the Office scripting dictionaries so they are less crazy-making, but I'm not sure I'd survive the attempt.

  • Problem with  AT command in LOOP

    Hi Experts,
    here i ve a problem like, in my table there are 3 PSPHI(projects) values,
    if i loop n calculate the sum it is getting total amt for 3 PSPHI values,
    but i want every end of PSPHI i need sum.
    the below code is working fine if there is no AT coomand, if i put AT END OF PSPHI it is giving 00.00 values.
      LOOP AT it_final into it_output.
       AT END OF PSPHI.
        if it_final-wrttp = '04'
           AND it_final-vorga = 'COIN' 
           AND it_final-beltp  = '02'
           AND it_final-versn = '000'.
       t_pla_rev = t_pla_rev + it_output-wlp01.
        MOVE it_output-wlp01 TO pla_rev.
        sum = sum + pla_rev.
          if sy-subrc EQ 0.
            else.
            write:/10 ' u r not ok'.
        endif.
    e  ndif.
    append it_output.
    *ENDAT.
    ENDLOOP.
    write:/10 'total amt is', sum.
    could anybady check where i gone wrong pls...
    Thanks in advance,
    sudharsan.

    Hi,
    What is your table structure.
    The command  AT ........ENDAT  work in sequential order.
    Let me explain with example.
    if your table itab has two column  column1 and column2
    loop at itab into wa.
    at new column2.
    // This will execute when the Value of column 1 change or column2
    // change.
    endat.
    endlloop.
    The solution of your problem is.
    Change your internal table column order ,
    Put the column first for which you want to calculate the sum.
    Thanks & Regards
    Kulvendra Kumar

  • PROBLEM WITH USER COMMAND AT SIMPLE REPORT

    HII FRNDS
    MY PROBLEM IS
    WHEN I AM BRANCHING TO A LIST REPORT FROM MY ALV REPORT BY USING LEAVE TO LIST-PROCESSING . THEN IN MY LIST REPORT I AM HAVING 2 MORE CUSTOMIZED BUTTON . BUT THE THING IS THAT I AM NOT ABLE TO MAKE THAT BUTTON  FUNCTION .
    CAN ANY BODY HELP ME WITH HOW TO MAKE THAT BUTTON WORK IN THE SIMPLE REPORT . I HAVE USED AT USER COMMAND IN THE BEGINING OF REPORT BUT STILL ITS NOT WORKING .
    THANKING YOU
    ROHIT

    HII FRNDS THIS IS THE CODE
    CASE R_UCOMM.
        WHEN 'DISPLAY1'.
          LOC_INDEX = 1 .
          SET PF-STATUS 'STATUS' EXCLUDING 'DISPLAY1'.
          LOOP AT INT_OUTPUT INTO WA_OUTPUT
                             WHERE CHECKBOX = WC_MARKED.
            APPEND WA_OUTPUT TO INT_DISPLAY .
          ENDLOOP.
          LEAVE TO LIST-PROCESSING .
          PERFORM F9100_DISPLAY_DETAILS USING LOC_INDEX.
    ENDCASE.
    AT USER-COMMAND .
    CASE SY-UCOMM.
    WHEN 'BACK'.
    BREAK-POINT.
           PERFORM F9100_DISPLAY_DETAILS USING LOC_INDEX.
      ENDCASE.
    THE PERFORM F9100 DISPLAYES THE LIST REPORT . THERE ARE NO SPELLING ERRORS FRNDS .

  • Problem with rename command in ftp_command

    hi all ,
    i am facing a problem in renaming a file by rename command...
    this is how i am calling the fm ftp_command
    CALL FUNCTION 'FTP_COMMAND'
        EXPORTING
          handle        = g_handle
          command       = 'RENAME l_templine_file l_templine_file1'
        TABLES
          data          = l_i_temp_line
        EXCEPTIONS
          tcpip_error   = 1
          command_error = 2
          data_error    = 3
          OTHERS        = 4.
      IF sy-subrc <> 0.
    here l_templine_file   - dev00227.header.tmp  
    l_templine_file1 - dev00227.header.txt
    the fm is failing that the error meassage is FTP subcommand  error
    can u suggest where i am going wrong in this...

    hi,
    May be the command you are passing is incorrect syntax..
    Pass the values like this..
    l_templine_file =  'c:\dev00227.header.tmp' " this should be with path'
    l_templine_file1 = 'dev00227.header.txt'" this is just the name of file
    If not worked..then Try writing in small letters//
    write
    command = 'rename l_templinefile l_templine1'.
    rewards if useful
    Hope this solves..
    regards,
    nazeer
    Message was edited by:
            nazeer shaik
    Message was edited by:
            nazeer shaik
    Message was edited by:
            nazeer shaik

  • I photo / i life '06, problems with 'shuffle', and duplicates ! ?

    hi.
    am using ilife '06... trying to 'shuffle' photos in a slideshow in iphoto.
    my 'help' function says to go to 'settings' and select 'shuffle'. (which was possible in the old iphoto)... BUT when i do so, i don't see a 'shuffle' bubble available to be checked off.
    ALSO
    in itunes, it's possible to elimate duplicate songs by pressing 'show duplicates', then deleting them. why doesn't this seem possible to do in iphoto?
    i can duplicate a photo, but not identify the duplicates, then delete them....

    To get a shuffle slideshow you need to select the album with your photos and then click on the Play button at right side of the bottom tool bar. It if doesn't show click on the >> button at the right to get to it. That will send to to
    the setting pane for that folder's slideshow. You can save the settings so you don't have to reset them each time. Then Option-clicking the play button will take you to directly to the slideshow, bypassing the settings pane.
    You can add and remove photos from the album and keep the slideshow settings.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    MBP 2.16Ghz; G5 Dual Core 2GHz, 2G RAM ea, 250G HD; G4 Dual 1Ghz, 1.5G RAM;   Mac OS X (10.4.10)   22" LCD, 710G FW HDs, Canon: SD700IS/i850/LIDE 50, Epson R200, 30G iPod, 2G Nano

Maybe you are looking for

  • Umstieg von Win auf mac mit cs6

    Ein freundliches Hallo an die Mitarbeiter von Adobe, vor etwa einem Jahr habe ich eine Win CS6 Studentenversion erworben und nutze sie täglich tatkräftig für meine Projekte. Inzwischen die Zeit reif für einen neuen Rechner. Dabei denke ich über einen

  • One instance for two different application

    Hello, I have to solve following problem.. need have one instance of object for two different application..fist is standard SE application and second is EE (web).. SE application is a server..listen on and accepting connection from mobile phone..and

  • Customer Ageing report opening too slow.

    Hi All, Recently we upgraded one of our clients to SAP B1 2007A from 2005A. The only problem they are facing now is that Customer Receivable Ageing Report is taking way too much time to open. No matter what parameters you give and even scaling down t

  • Unterschiedliche Linienstärke

    Hallo zusammen, Ich arbeite mit Acrobat 7.0 Pro und Office 2003 unter WinXP (SP3) und habe folgendes Problem: Im Word habe ich ein Dokument, in diesem habe ich eine Tabelle erstellt und mit der Funktion „Rahmen und Schattierungen-" jeweils die einzel

  • How does one remove a author of a doc

    Hello I purchased a health intake form from someone and all I want is that person to be removed as author so she isnt able to see my clients information. I paid for the form not her being on it.