Alrighty. So I have my main application. It works fine, no problems there. However, I have an application that runs in shell with arguments. It's actually a graphics test utility that Apple provides. To run it, you can drag it into terminal and add your arguments after the path.
I decided to create an executable with my desired arguments already built in, so I now have my main application executable, as well as the secondary executable (this file is called, "Vertex"). I want to assign a button in the interface builder to launch the executable. That's all I want to do, but for the life of me I can't figure this out.
I'm pretty new to xcode so you'll have to bear with me. It's an applescript application and I'm assuming I can't launch this file through Applescript alone. However, I do need it to run from the application's resource directory regardless of where the user installs the application.
Any thoughts?
How do you run an executable located within the application?
Started by Skyfluff, Apr 17 2009 02:14 AM
1 reply to this topic
#1
Posted 17 April 2009 - 02:14 AM
#2
Posted 17 April 2009 - 02:50 AM
I figured it out, in case anyone is curious.
I then added my arguments after vertex and it worked perfectly
on clicked theObject display dialog "Are you SURE? This test could have a seriously adverse affect on your computer, and may render it unusable while it is running." buttons ["Cancel", "Continue"] with icon "what" tell application "Finder" to set myFolder to (container of (path to me)) as string do shell script "echo " & quoted form of POSIX path of myFolder do shell script quoted form of POSIX path of myFolder & "myappname.app/Contents/Resources/vertex" end clicked
I then added my arguments after vertex and it worked perfectly
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users



Sign In
Create Account








