5 Replies Latest reply on Dec 4, 2008 1:09 PM by QMacMan

    Scripting Applescripts problem

    QMacMan

      Title

      Scripting Applescripts problem

      Post

      I'm trying to write a Perform Applescript script which contains the calculated Applescript as below.   The script works when it is a Native Applescript but falls over with the message "expected end of line but found identifier" when I try it in the calculated Applescript mode.    The reason for using a calculated Applescript is that once I resolve this issue I'll be extending it to use a FMP field to return data from a field.   But I need to sort this out first.

       

      "tell application \"Remote Desktop\"¶
      set theScript to \"osascript <<EOF tell application \"System Events\" end tell EOF\"¶
      end tell"

       

      Now if Ichange it to:-

       

      "tell application \"Remote Desktop\"¶
      set theScript to \"osascript <<EOF tell application "System Events" end tell EOF\"¶
      end tell" 

       

      System Events is highlighted and FMP reports "specified table cannot be found"

       

      If I change it to:-

       

      "tell application \"Remote Desktop\"¶
      set theScript to \"osascript <<EOF tell application System Events end tell EOF\"¶
      end tell"  

       

      it successfully sends the command to Remote Desktop which then can't do anything because the application System Events needs to be in quotations.

       

      It's all looking like something to do with the nested qiuotation marks.

       

      Help!!