Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Run bash script via button in interface builder?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Bwoe" data-source="post: 1188184" data-attributes="member: 192683"><p>Sorry if I wasn't clear enough, it's an applescript application built in Xcode (3.0 compatible). It was designed to run applescripts when buttons are pressed (this is where interface builder comes in), and I'd like to run a bash script instead of applescript when one of the buttons is pressed. </p><p>The workaround I have now is to have this button use an applescript to open the bash script like this. </p><p>[CODE]</p><p>on «event coVScliI» theObject</p><p> try</p><p> do shell script "open ~/Documents/MyBashScript.sh"</p><p> end try</p><p>end «event coVScliI»</p><p>[/CODE]</p><p></p><p>It works, but only if the bash script is in that specific directory. I'd like to have it as part of the app itself, instead of just opening a file elsewhere on the computer.</p></blockquote><p></p>
[QUOTE="Bwoe, post: 1188184, member: 192683"] Sorry if I wasn't clear enough, it's an applescript application built in Xcode (3.0 compatible). It was designed to run applescripts when buttons are pressed (this is where interface builder comes in), and I'd like to run a bash script instead of applescript when one of the buttons is pressed. The workaround I have now is to have this button use an applescript to open the bash script like this. [CODE] on «event coVScliI» theObject try do shell script "open ~/Documents/MyBashScript.sh" end try end «event coVScliI» [/CODE] It works, but only if the bash script is in that specific directory. I'd like to have it as part of the app itself, instead of just opening a file elsewhere on the computer. [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Run bash script via button in interface builder?
Top