Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

applescript xterm script

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

Posted on Jul 17, 2014 1:23 PM

Reply
1 reply

Jul 17, 2014 9:35 PM in response to bishop638

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).

applescript xterm script

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.