1 Reply Latest reply: Jul 17, 2014 9:35 PM by Camelot
bishop638 Level 1 Level 1 (10 points)

Good evening every one

 

I'm having an issue with applescript. I would like to run a script in the terminal (called xterm) of the app XQuartz.

 

I tried this but unsuccessfully :

 

          tell application "XQuartz"

                           launch    

                           do shell script "cd /Users/antoine/Desktop/Projet_M15; castem14 projet.dgibi"

          end tell


         Any thought ?  

          Thanks


MacBook Pro with Retina display, OS X Mavericks (10.9.3), last version of Xquartz
  • Camelot Level 8 Level 8 (46,190 points)

    Well, the most obvious thought is that you're not using XQuartz at all.

     

    do shell script is a standard AppleScript command that executes a shell command in its own environment - that is, it does not depend on any other application to execute. The fact that you've wrapped this in a 'tell application "XQuartz" block is irrelevant - XQuartz never gets to see the command.

     

    From what I recall XQuartz has very limited AppleScript integration (maybe even none), so any interaction may have to be via UI events (e.g. simulating typing the relevant command).