Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 18, 2013, 10:16 PM   #1
SteveniMac
macrumors newbie
 
Join Date: Apr 2013
Is it possible to do this in Xcode

I want to know whether it is possible for Xcode to create any type of application that when opened, it would open a specified file on the desktop. It would also help if you could post the code to do this as well.
SteveniMac is offline   0 Reply With Quote
Old Apr 18, 2013, 10:48 PM   #2
Comeagain?
macrumors Demi-God
 
Comeagain?'s Avatar
 
Join Date: Feb 2011
Location: Spokane, WA
Send a message via Skype™ to Comeagain?
Sounds more like AppleScript is what you're looking for.
__________________
Questions? MRoogle it!
I support the MacRumors Blood Drive!
MR Scavenger Score: 1
Comeagain? is offline   0 Reply With Quote
Old Apr 19, 2013, 12:11 AM   #3
Red Menace
macrumors regular
 
Join Date: May 2011
Location: Littleton, Colorado, USA
I would just put the file into an AppleScript application bundle and use the Finder to open it with the default application, for example:

Code:
set theFile to path to resource "Fake Profile.spx" -- a fake system profile
tell application "Finder" to open theFile -- open the file using the default application
__________________
MacBook Pro / OS X Mavericks (10.9.2) / Xcode 5.1 / [and various (much) older stuff keeping dust off the shelves]
Red Menace is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:37 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC