0 Replies Latest reply on Jun 13, 2012 6:30 AM by Roger_1

    Script Questions (solved)

    Roger_1

      Title

      Script Questions (solved)

      Post

      I am trying to get the following script to work. 

       

      Set Variable [ $aPOSIX; Value:RWellsImages::File Path ]

      Show Custom Dialog [ Title: "Path"; Message: $aPOSIX; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]

      Set Variable [ $Start; Value:Position($aPOSIX;"/Users";1;1) ]

      Set Variable [ $End; Value:Length ( $aPOSIX ) ]

      Set Variable [ $Path; Value:Middle ( $aPOSIX ; $Start; $End ) ]

      Show Custom Dialog [ Title: "Path"; Message: $Path; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]

      Set Variable [ $theKeyWord; Value:"Test Key Word" ]

      Set Variable [ $TheScript; Value:$TheScript & $TheScript & "exiftool -overwrite_original_in_place -Keywords+=\"" & $theKeyword & "\" " & $Path ]

      Show Custom Dialog [ Title: "Script"; Message: $TheScript; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]

      Perform AppleScript [ $TheScript ] 

       

      When I look at the $TheScript in the last show it looks good or at least the way I think it should look. But the Perform AppleScript gives the following error - Expected expression but found "=" pressing OK then next message - Unknown Error -2741

       

      When I run the same script directly using AppleScript on the Mac it works fine. So my guess is that the Perform AppleScript [ $TheScript ] is wrong. 

      Any Help would be appreciated.

      Roger

      FM12P

       This is what $TheScript looks like at the last show dialog.

      Screen_Shot_2012-06-13_at_9.23.34_AM.png