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 Mar 15, 2013, 02:52 PM   #26
DavidBlack
Thread Starter
macrumors 6502
 
Join Date: Jan 2013
Location: Somewhere In Apple's HQ ;)
Quote:
Originally Posted by kryten2 View Post
Strange. It looks like there is no space between the & and "docs:doc" but it is not really clear. Try with another folder name or type the single set theFolder line in another script editor window and see if it compiles.

Code:
set exePath to (path to home folder as text) & "SetFileIcon"
set imagePath to (path to desktop folder as text) & "Actions.icns"
set theFolder to (path to desktop folder as text) & "docs:doc"
Just one more question I won't bother you again I want the action.icns and the setFileIcon to be in a applications resources but when I place the path it does it work .
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2013-03-15 at 3.50.53 PM.png
Views:	13
Size:	1.43 MB
ID:	402693  
DavidBlack is offline   0 Reply With Quote
Old Mar 15, 2013, 04:32 PM   #27
kryten2
macrumors 6502a
 
Join Date: Mar 2012
Location: Belgium
Quote:
Originally Posted by DavidBlack View Post
Just one more question I won't bother you again I want the action.icns and the setFileIcon to be in a applications resources but when I place the path it does it work .
Yes.

Code:
set exePath to path to resource "SetFileIcon"
set imagePath to path to resource "Actions.icns"
Attached Thumbnails
Click image for larger version

Name:	Picture 3.png
Views:	11
Size:	72.2 KB
ID:	402706   Click image for larger version

Name:	Picture 4.png
Views:	11
Size:	85.6 KB
ID:	402707  
__________________
Space Corps Directive 34124
kryten2 is offline   0 Reply With Quote
Old Mar 15, 2013, 06:18 PM   #28
DavidBlack
Thread Starter
macrumors 6502
 
Join Date: Jan 2013
Location: Somewhere In Apple's HQ ;)
Quote:
Originally Posted by kryten2 View Post
Yes.

Code:
set exePath to path to resource "SetFileIcon"
set imagePath to path to resource "Actions.icns"
YES thanks for your reply but this looks like it applies when making application with applescript editor.I am adding the setIconFile and icon file to my xcode project then when I click a button it would execute the applescript

Quote:
NSString* path = [[NSBundle mainBundle] pathForResource:@"icons change" ofType:@"scpt"];
NSURL* url = [NSURL fileURLWithPathath];NSDictionary* errors = [NSDictionary dictionary];
NSAppleScript* appleScript = [[NSAppleScript alloc] initWithContentsOfURL:url error:&errors];
[appleScript executeAndReturnError:nil];
Thats the code in Xcode can you help me?
DavidBlack 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

Similar Threads
thread Thread Starter Forum Replies Last Post
How to create sub-mailboxes with Applescript? torchy Mac Programming 14 May 29, 2014 04:21 PM
Applescript to create a smart folder for each tag? feijoada OS X Mavericks (10.9) 0 Mar 7, 2014 09:55 PM
create folders applescript joennie Mac Programming 3 Jul 30, 2013 06:43 PM
Applescript: How do I create custom data types? moonman239 Mac Programming 1 Jan 5, 2013 11:07 PM
Use AppleScript to create a PPI Calculator? TheMTtakeover Mac Programming 1 Dec 26, 2012 10:11 AM

Forum Jump

All times are GMT -5. The time now is 01:38 AM.

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

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