How to add applescript to xcode objc
Hello,
So I copied a applescriptobjc file from anther xcode project chosen from the menu. I pasted it next to the .h and .m file, but nothing of this applescript code works. Can somebody make a video on how to do it or tell me detailed and understandable how to do it?
Thanks
Well, just throwing random files into an Xcode project isn't really the way to go, regardless of the language. AppleScriptObjC can be used in an Objective-C project, you just need to set things up to load the files and give Objective-C information about them so that they can be used:
The AppleScriptObjC framework needs to be added to your project;
An informal protocol needs to be set up to declare the handlers/methods in your scripts, since AppleScriptObjC doesn't have any headers;
You need to add statements to the main.m file to load the AppleScriptObjC scripts;
The script classes need to be instantiated in the Interface Builder or manually in your startup code.
I blew the dust off an older example project of mine that uses a couple of AppleScriptObjC files (they don't do much, mostly logs and a Finder window) from an Objective-C project - it can be downloaded here.
Similar Messages
-
How to add files to xcode project with the help of applescript
i am tried but got some of the error which is enable to solve by myself becuase i am new in applescripting
tell application "Xcode"
open "Macintosh HD:Users:Nitesh:Desktop:sumeet:RND:iPhone:iPhone_V2_Ref_2.5.01:iPhone_V2.xcodep roj"
tell project "iPhone_V2"
set resourcepath to "/Users/Nitesh/Desktop/sumeet/RND/images" (*full path of my folder that i want to add*)
set filelist to {}
tell application "Finder"
set filelist to (name of items of (POSIX file resourcepath as alias))
end tell
tell group "images" of root group
repeat with i in filelist
set filepath to resourcepath & (contents of i)
set myfile to make new file reference with properties {namecontents of i), full path:filepath}
add myfile to first target of front project
end repeat
end tell
end tell
end tell
the issues is:
error "Xcode got an error: Can’t get group \"images\" of root group of project \"iPhone_V2\"." number -1728 from group "images" of root group of project "iPhone_V2"Applescript for this issue is more simple . Try to use my script that is here
-
How to Add AppleScript to Mail Menu
Excuse the cross posting. I posted the same topic under OS X Mail
and was referred to this section
http://discussions.apple.com/thread.jspa?messageID=12607355#12607355
I would like to add an AppleScript folder to Mail Menu and could
not find that option in the toolbox. Anyone been able to add an
AppleScript.?Not all applications have an option to add a Script menu. You can enable a system-wide Script menu from the AppleScript Editor, which will place a menu extra on the right side of the menu bar. Scripts placed in your user's ~/Library/Scripts folder will appear in this menu, and you can further organize scripts to be active only in a certain application by putting them in the appropriate application folder, for example ~/Library/Scripts/Applications/Mail.
-
How to add applescript to mainstage ?
I would like to controle iTunes from mainStage 2 with actions that does'nt exist in the action script action :
change volume, go direct to a specify song.
I have made the scripts but I don't find where to put them, in wich folder.
Thank's for your helpthat's just a tweak on your script. you need a loop that tests the file name and appends a character on failure:
tell application "Microsoft Excel"
tell active workbook
set sheetHolder to sheet "DUMMY 1"
repeat
-- get next sheet
set currentSheet to next of sheetHolder
-- check for end sheet and exit
if name of currentSheet is "DUMMY 2" then exit repeat
-- rename (looping till a name is found)
set finalName to string value of cell "T18" of currentSheet
repeat with i from 0 to 25
try
-- try to set name. on success exit loop.
set name of currentSheet to finalName
exit repeat
on error
-- on failure append an incrementing lower case letter and try again
set finalName to (string value of cell "T18" of currentSheet) & (ASCII character (97 + i))
end try
end repeat
-- crawl across sheets, inchworm style
set sheetHolder to currentSheet
end repeat
end tell
end tell -
How to add sound to buttons in Xcode 5.0.1?
hello
i am wanting to know how to add sound to a button in xcode 5?
its mover 200 sounds of like 1 sec.
i am using storyboards
i need it ASAP please tell me
thanks alotThat's the wrong file path. You want to go to the artwork and effects palette, find the layer styles section, and choose your style there.
-
Ok, so I've been trying to get CERN's ROOT program/libraries to work in an xcode project for a while, but I'm running into one really weird error, and I think I may just not know how to add a library to a project correctly.
Suppose I create a new Xcode C++ command line tool project. I hit Build and go, and it gives me a nice little Hello World! in the console, just as it should. If I then click on the project in Groups & Files, go to Project>Add to Project..., and choose, say, libCint.so, from my root/lib directory, and click ok, then click Build & Go, I get an error in the console:
dyld: Library not loaded: @rpath/libCint.so
Referenced from: /Users/paulthompson/Documents/Programming/Build Products/Debug/LibraryIncludeTest
Reason: image not found
sharedlibrary apply-load-rules all
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Cannot call into the loader at present, it is locked.)
My assumption is that either I'm missing a step in the process of adding a library, or else there is something jacked up with the libraries themselves. Anyone have any advice?
Thanks,
Paul
EDIT* Oh, I should mention that the actuall binary that gets built after adding the library WILL execute properly in the Finder, or from terminal, just not with the Build & Go, or Go commands from within xcode.
Message was edited by: TraxusIVTraxusIV wrote:
Results of otool:
LibraryIncludeTest:
@rpath/libCint.so (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
Macintosh-9:Debug paulthompson$ otool -L /Applications/CERNRoot/root/lib/libCint.so
/Applications/CERNRoot/root/lib/libCint.so:
@rpath/libCint.so (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
I honestly don't know much about @rpath. I found this page that explains it a bit more: http://blogs.sun.com/dipol/entry/dynamiclibraries_rpath_andmac
So, since I don't want to deploy with the environment variable set, I should ask, what IS the correct, MacOS X way to do it?
The best way to find that is to look at how Apple does it. They put frameworks in /System/Library/Frameworks and regular shared libraries in the standard places. You can do the same. Put your frameworks into /Library/Frameworks and your shared libraries into /usr/local-based paths.
If you want to create stand-alone executables that can be installed via drag-n-drop, you can put shared libraries inside the application bundle. If your shared libraries/frameworks are elsewhere, you will need some sort of installer to get them installed.
I've been sifting through Apple's developer documentation but I have yet to find a concise, straightforward explanation of how to add shared libraries. I'm horribly confused at this point. Is there a good tutorial available anywhere for both the general unix case of linking to dylibs and .so's, and the Mac specific case?
Hopefully someone else knows an answer for this one.
*EDIT* I do already have the variable defined both in ~/.MacOS/environment.plist and also in Xcode as an additional user variable.
I'm not sure about the whole RPATH thing. Setting environment.plist will define environment variables for use in the Finder, but that is really a hack. There are better ways to do it, but if you are porting some open-source programs, that may be the only way. You should be able to define those variables in Xcode. You have to selected the debug executable under "Exectuables" -
Question regarding definition "Applescript in Xcode"
Hello, I've got a question:
How would you define Applescript in Xcode 3.1.2? Is one making an app with Cocoa? Is it called Applescript Studio or Cocoa Applescript?
Thanks in advancedAppleScript in XCode is generally known as AppleScriptObjC (AppleScript/Objective C). More details as Apple's Developer Site.
As a categorization, 'pure' AppleScript is generally perceived as a high-level scripting language (generally used on top of other processes that do the work. AppleScriptObjC is more of a high-level programming language since you can develop full-blown standalone applications. -
Applescript in Xcode Saving Preferences
Ok I am writing a simple applescript based xcode application but I can't figure out how to save these properties:
property fade_speed : true
property fade_on : false
property the_choice : false
property first_run : true
... between launches of the application which controls itunes. I want the user to be able to set preferences of if they want itunes to fade between songs every time they click the next or previous buttons or not to fade and to have a dialog pop up the first time they open the app and "the_choice" is their favorite playlist which they can play by clicking a button. How can I have these settings saved so that the user does not have to set them up each time?
Im using the latest version of Mac OS 10.5.7 and the latest version of Xcode.Properties do not persist between runs in AppleScript Studio like they do in a regular AppleScript. To save your preferences, etc., use the user defaults.
-
How to add fields to already loaded cube or dso and how to fill records in
how to add fields to already loaded cube or dso and how to fill it.can any one tell me the critical issues in data loading process..?
This is sensitive task with regards to large volumes of data in infoproviders.
The issue is to reload of data in case of adjusted structures of infoproviders.
Indeed there are some tricks. See following:
http://weblogs.sdn.sap.com/cs/blank/view/wlg/19300
https://service.sap.com/sap/support/notes/1287382 -
How to add A single row at the middle of the table in a Webi report
Hi,
I created a Webi report using Universe(Created universe using bex query).Now i have a requirement to display a row at the middle of a report. Can you please tell me ,how to add a sigle row at the middle of a Webi report.
Thanks in advance
Regards
MonikaHi Monika,
It is not really possible to add a row (I assume you mean of unrelated data) to the middle of a table in a report. You can add a new table with a single row between two tables. For instance you could add a new one row table, or even single cells which are positioned relatively between two tables. Possibly a block on top of another. But this gets tricky.
Can you explain in more detail what you are trying to do?
Thanks -
How to create a job card and how to add waranty card in sales order
I have one scenario for CS.the scenario is realted to automotive industry. Basically its a trading industry of HCV,MCV,LCV apart from that they will do servicing also. First the customer comes for a service.he is having free services. he will have waranty for spare parts of the vehicle. once he comes for servicing first the executive will take complains from the customer after that a Job card will be issued to the customer. there his chasis no ,engine no and registration no will be there. once enter the chasis no entire customer details has to come. how many free services he is having for how many kilo meters.then job card will go to the spare parts dept.that dept will issue the spare parts.then they will invoice the customer. he will pay the payment.and finally the gate pass will be given to the customer to deliver the vehicle.
painful area is how to create a job card and how to add waranty in sales order.
Regards,
VenkatHi,
Have u resolved it then Please let me know !!! It is a very interesting problem and owuld like to know the solution...
Regards
Krishna -
How to add apache to an exisitng BOXI31 presently running on IIS
Hi Tim,
I know its rude that I directly mailed you but i am not able to post on the SAP forum due to some reasons I don't know. So please if you can help me I would be highly indebted.
I have a multiple server installation.
Number of Servers : 4
Number of CMS : 2
Application tier on 2 servers.
Web tier on 2 servers.
The problem is when i login my .NET infoview works fine but my Java infoview doesn't.
I found the error that the CCM doesn't have Tomcat Apache Server.
So my guess is thats the reason why the java infoview is not working.
Please help how to add the Apache to the CCM.
Regards
SidHi,
You need to run custom installation to install Java Web components on your server box and choose to install
tomcat app server
- Subhodeep -
How to add description of a column of a table in SQL Azure
Hi
I have some tables in my application database where there are descriptions added against certain columns. Needless to say they were done by using sp_addextendedproperty.
Now I am trying to migrate the Database to SQL Azure. SQL Azure does not support sp_addextendedproperty.
Hence I am not able to figure out how to add descriptions to those columns.
Any help would be much appreciated.
Thanks
SoumyadebHello,
Just as Latheesh post above, Windows Azure SQL database are not support extended stored procedures. That’s one of the limitations on SQL database, and I don’t know there is another way to achieve the same on Azure.
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support -
How to add more fields at level task for importing to MsProject
Hi everyone,
We would like to have the same number of fields either for importing as exporting; or at least, the fields that we need.
The problem is when we are configurating the fields for exporting from cProjects to MsProject, we found 81 available fields and then we don't find the same amount for importing (34). So, in some cases we don't find fields which were configurated for exporting and it is no posible to upload the information back because the field is no available for importing.
Does anyone knows how to add more fields for importing at the cProjects side?
Thanks a lot,
CAMILO URIBESome fields can not be migrated because of MsProject designe. The above is the reason why cProjects' customizing does not offer the
mapping of the same nuember of fields. -
How to ADD field in iview ?
hi,
in portal-iview i want to add a field.
when i go to 'portal-content -> open the iview with right click -> preview' and then
do ctrl-alt-right-mouse click i got to the customizing of the fields.
i know how to HIDE fields there, but i don't know how to add fields ? in the list
of the fields the necessary fields are available, BUT i only have to options:
hide -> YES or NOT PERSONALIZED
any ideas ?
reg, MartinGopal,
the root element of this fields does NOT have the option 'decorate'.
it is the quoata overview of ESS : sap.com/ess~quotas
the top of the tree has option 'decorate', but this is above the necessary table where
i select the data.
my adrl is
martin.svik(at)denzel.at
maybe we can 'change' some screenshots where you can send me yours and i can
send you mine to explain it in a better way
reg, Martin
Maybe you are looking for
-
How do I get rid of Norton Internet Security? Migration assistant problem
I have a new MacBook Pro and I used a firewire connection and migration assistant to transfer files. Unfortunately, the assistant transferred all my applications, even the ones I didn't want, like Norton Internet Security, which slowed down my old G4
-
Committed Qty by Vendor - Report
Hi Guys, Do we have standard report to Check - " Committed Qty by Vendor " Regards, Jackie
-
Help needed setting up itunes on restored iMac.
I had to do a clean install of Lion on my iMac. I backed up all iTunes files. I am confused on what would be the best way to rebuild my iTunes library so that it will sync with my jphone. Do I have to erase my iPhone and resync with newl I am also
-
Can't start my Adobe Applications - returning Error 150:30 after updated Mac OS to 10.9
I have just updated my mac to OS X 10.9 and my Adobe CS4 applications won't open, returning error 150:30. I understand this is licensing related. I have been browsing various forums to get a fix for this, and I haven't found anything that works to da
-
I've got a real love/hate relationship with Apple right now. I love my iphone 5, but I'm hating the bs you have to go thru to get help. Everything was great, fine, wonderful on ios6 till yesterday when suddenly I lost speaker capability. No speaker o