MAC AE plugin: Bundle scripts with plugin and access for execution

Hi there,
as the title says I'm trying to execute some scripts from my plugin but I can't figure out how to get the plugins location to access the bundled resources. I'm pretty new to the  plugin development so can sombody please point me in the right direction?
I found in the SDK guide the PF_GET_PLATFORM_DATA but there is no example that is using it.
Thanks in advance
Fabian

Hi shachar thanks for your help,
I tried reading a text file that is bundled with the .plugin package without path but I had no luck. The structure within the package is like this (tree looks better with monospaced fonts):
├── Info.plist
├── MacOS
│   └── EXECUTABLE
├── PkgInfo
└── Resources
    ├── EXECUTABLE.rsrc
    ├── bundle-test.txt
    ├── example.txt
And my code is like this:
                string line;
                string alllines("");
                ifstream myfile ("../Resources/example.txt");
                if (myfile.is_open()){
                    while ( myfile.good() ){
                        getline (myfile,line);
                        cout << line << endl;
                        alllines+=line;
                    myfile.close();
                    suites.UtilitySuite3()->AEGP_ReportInfo( S_my_id,alllines.c_str());
                }else{
                    cout << "Unable to open file";
                    suites.UtilitySuite3()->AEGP_ReportInfo( S_my_id,"Error Reading file");
So my result is always my error reading file.
I also tried using getcwd like this:
                char cwd[256];
                if (chdir("/tmp") != 0)
                    perror("chdir() error()");
                else {
                    if (getcwd(cwd, sizeof(cwd)) == NULL)
                        perror("getcwd() error");
                    else
                        printf("current working directory is: %s\n", cwd);
But ther i get a current working directory as: /private/tmp
So how did you manage to read files bundled with your plugin? Magic?
Maybe there is something else I missed.
- I added the files to my source directory.
- I went in xcode rightclick onto the project and selected "add files to PROJECTNAME"
- in the TRAGETS Tab for the project the file is under "Copy Bundle Resources"
- When building the plugin the file I want to read is within the .plugin package
What else could go wrong?
I could also create a script that escapes my script and creates an .h file with a string where I could read from, but this would feel like giving up and I'm not there yet.
I appriciate your help a lot. (to everyone and specially to shachar)
Cheer
Fabian

Similar Messages

  • I just updated my Firefox browser to Firefox 8. I am a college student and practice with HTML and CSS for class assignments. The fonts in all my html documents are being overwritten online by your script typeface. How do I resolve this issue?

    I just updated my Firefox browser to Firefox 8. I am a college student and practice with HTML and CSS for class assignments. The fonts in all my html documents are being overwritten online by your script typeface. I did not have this issue in the older version. I use an iMAC running OS10.6.8. How do I resolve this issue?

    Starting with this, you have errors in your CSS code.
    body {
      margin-top: 0px;
      margin-right: 0px;
      margin-bottom: 0px;
      margin-left: 0px;
      color: 151515;
      font-family: "Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
      background-color: EFF5F8;
    body {
      margin:0;
      color: #151515;
      font-family: "Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
      background-color: #EFF5F8;
      font-size: 100%;
    Related links:
    Windows Chrome, why do my fonts look so bad? - Lee Green
    css3 - Bad font rendering Chrome - Stack Overflow
    Nancy O.

  • Site list update not working with TED and Zenworks for Servers

    Product: Zenworks for Desktops 7Sp1 and Zenworks For Server/TED 7Sp1HP5
    Subject: Site list update not working with TED and Zenworks for Servers ,
    all on Linux
    Description: We have an exiting environment with 6 ZfS Servers and now we
    brought up a new Server for another location. I configured all same as on
    the other Server and the new one created all NAL-Apps at the new location.
    But in the Application Site list on the golden App is this Application
    missing. So I clicked on the Link up site list on the Distribution Screen
    in C1. On ApplicationSite list the App from the new location is missing.
    So I removed all and added the new from the new location and now i see all
    in the application site list.When I install an app on the client on the
    new location NAL is connecting alway th the same (wrong location-server
    and i get an msi error 1612 or id=53272 with path=\Wrong serverpath to
    file.
    I looked on the other tab on C1 at the golden app an I see the backlinks
    are going to all other servers without the new one. Software installation
    on other locations are ok
    Regards

    Andreas,
    I forgot to mention that you can also set the loging level on the Distributor and the Subscriber to 6. to do this at the Zenworks Server Management prompt type "setconsolelevel 6" if you want to capture this to the log file ted.log then use "setfilelevel 6"
    Next delete the Distribution from the Subscriber and then re-push the channel.
    What we are looking for here in the log is the creation of the object and the linking information about the gold object. it should look like this (not the failure part ;-))) )
    In this excerpt you will see the entry
    Golden App =
    This should be were the link is to
    You can check this both ways in the Golden App and in the Distributed Application.
    Here is a log from me that shows this info as an example of what you should be looking for.
    2008.05.29 03:35:41 [TED:Work Order In(yourserver.yes.com)] Receiving distribution: Creating new application failed,
    Subscriber Tree Name= YOUR-TREE,
    Subscriber DN = SUBSCRIBER_YOURSERVER.BRN.FL.SUBS.SUBSCRIBERS.ZSM. GRS.CBH,
    Golden App = SCRIPT-MS-HOTFIX.APP.BRN.ZENGOLD.GRS.CBH,
    Attempted AppName = SCRIPT-MS-HOTFIX.APP.BRN.HAVERHI.PALM.FL.CBH,
    error message: Failed creating SCRIPT-MS-HOTFIX.APP.BRN.HAVERHI.PALM.FL.CBH. With error message: Setting the trustee for BRN.HAVERHI.PALM.FL.CBH on the file "VOL1:\ZEN\UTILS" failed. Look in subscriber log file for more details..
    2008.05.29 03:35:41 [TED:Event Processing] Handle Event: Work order IN completed... Creating new application failed,
    Subscriber Tree Name= YOUR-TREE,
    Subscriber DN = SUBSCRIBER_HAVERHI-FLBRN1.BRN.FL.SUBS.SUBSCRIBERS.ZSM.GRS.CBH,
    Golden App = SCRIPT-MS-HOTFIX.APP.BRN.ZENGOLD.GRS.CBH,
    Attempted AppName = SCRIPT-MS-HOTFIX.APP.BRN.HAVERHI.PALM.FL.CBH,
    error message: Failed creating SCRIPT-MS-HOTFIX.APP.BRN.HAVERHI.PALM.FL.CBH. With error message: Setting the trustee for BRN.HAVERHI.PALM.FL.CBH on the file "VOL1:\ZEN\UTILS" failed. Look in subscriber log file for more details..
    2008.05.29 03:35:41 [TED:Event Processing] Received (from haverhi-flbrn1.yesbank.com) Creating new application failed,
    Subscriber Tree Name= YOUR-TREE,
    Subscriber DN = SUBSCRIBER_HAVERHI-FLBRN1.BRN.FL.SUBS.SUBSCRIBERS.ZSM.GRS.CBH,
    Golden App = SCRIPT-MS-HOTFIX.APP.BRN.ZENGOLD.GRS.CBH,
    Attempted AppName = SCRIPT-MS-HOTFIX.APP.BRN.HAVERHI.PALM.FL.CBH,
    error message: Failed creating SCRIPT-MS-HOTFIX.APP.BRN.HAVERHI.PALM.FL.CBH. With error message: Setting the trustee for BRN.HAVERHI.PALM.FL.CBH on the file "VOL1:\ZEN\UTILS" failed. Look in subscriber log file for more details..

  • Uk date format issue with ASP and Access Database

    I have an Asp form which updates records in an Access
    database. Problem is
    that the date format in the database record is dd/mm/yyyy
    (UK), when
    the record is displayed on the form it is mm/dd/yyyy(US)
    which after I
    update the record in the database the date has changed to the
    new format.
    I have tried everything I can to change the format but to no
    avail...anyone any ideas how I can resolve this issue?
    Thanks
    Steve

    stevo.s wrote:
    > Hi
    >
    > I have tried changing the format on the date field on
    the server behaviours
    > panelto ddmmyyy. Also have tried to set the form field
    format to ddmmyy. I have
    > also tried to use a function I got from a posting
    somehwere on the net to no
    > avail. <%function ddmmyyyy(varDate)
    > ddmmyyyy = Day(DateValue(varDate)) & "/" &
    Month(DateValue(varDate))
    > & "/" & Year(DateValue(varDate))
    > end function
    >
    > I believe that this is a recognised issue with
    Dreamweaver and Access but
    > can't seem to grasp the work around! Problem being I am
    teaching myself through
    > books and internet articles and can be weeks at a time
    without being able to
    > look at the issue..each time I come back to it it is
    like starting all over
    > again! I was hoping that somewhere out there there is a
    simple solution the
    > issue perhaps a date picker with the built in
    functionality to address the
    > issue...I am keen to understand how to deal with the
    issue rather than just
    > change my database date field to fudge the problem as I
    am in the UK and when I
    > eventually start to use the application I would like
    there to be some
    > consistency with dates and that users are familiar with
    the format.
    >
    > Any help gratefully received!
    Its not Dreamweaver, or Access, its your servers locale, its
    set to US
    format, not the UK.
    On your page at the top use:
    <% Session.LCID = 2057 %>
    This will force the page into using UK formatted dates. Use
    it on any
    page that needs to format the page correctly.
    Dooza
    Posting Guidelines
    http://www.adobe.com/support/forums/guidelines.html
    How To Ask Smart Questions
    http://www.catb.org/esr/faqs/smart-questions.html

  • Are there any magazines with articles and tips for Encore - English language

    Are there any magazines with articles and tips for Encore - English language

    The very best "chronicle" on Encore that I can come up with is Jeff Bellune's Focal Easy Guide to Adobe EncoreDVD 2.0, Focal Press. It was written for EncoreDVD 2.0, but everything in it applies to CS4. Now, as of CS4, Adobe Dynamic Link to PrPro has been greatly improved and strengthened, and that part will have to come from the Help files. The book is still the best resource for 99% of Encore, and I highly recommend it. You will not be disappointed. It is an invaluable reference, whether you have EnDVD 2.0, CS3 or CS4.
    As for magazine articles, Encore is mentioned in some, but I do not recall any specific to the program. Same for books on DVD/BD authoring. I have several, that use Encore for some examples, and other authoring programs for others.
    The closest thing that we have to the PrPRo-Wiki, mentioned in your thread in the PrPro forum, is the wonderful set of Encore FAQ's on this forum. Jeff Bellune and Neil Wilkes have done a great job of rebuilding those, and most were lost, when the forum underwent a major changeover about 1.5 years ago.
    Next, just reading this forum will help one learn how to do much in Encore, and also how to solve any problems.
    One other asset that needs to be pointed out is the link in this ARTICLE to Jim Taylor's DVD FAQ. His book, DVD Demystified, by McGraw Hill, will tell you everything that you would ever want to know about DVD/BD, and his FAQ site will cover most of the important info.
    Great reading in each of those. That is not an all-inclusive list, but all that I can think of for now.
    Good luck,
    Hunt

  • Are there any magazines with articles and tips for Photoshop

    Are there any magazines with articles and tips for Photoshop - English language

    steenmikkelsen wrote:
    Are there any magazines with articles and tips for Photoshop - English language
    I can think of about 10! And then there are all the digital photography magazines too.
    But what's wrong with starting here:
    http://www.adobe.com/support/photoshop/
    (Save the forests!)

  • Are there any magazines with articles and tips for Premiere - English language

    Are there any magazines with articles and tips for Premiere - English language

    I dont know of any regular magazines.  There are occasional articles in video mags.
    But heres some online stuff you can review:
    http://forums.adobe.com/thread/424009
    http://premierepro.wikia.com/wiki/Adobe_Premiere_Pro_Wiki
    http://forums.adobe.com/thread/424418

  • Are there any magazines with articles and tips for AE - English language

    Are there any magazines with articles and tips for AE - English language

    I'm afraid not. Mags like Computer Arts and others have occasional articles interspersed or specials (Computer Arts Projects) but if you want my opinion: You can find much better resources online. Most of these print articles are really quite generic and aimed e.g. at 3D artists who only do the occasional piece of work in AE...
    Mylenium

  • Hi All, can i have some production support issues with rootcasue and resolution for SAP TM?

    Hi All, can i have some production support issues with rootcasue and resolution for SAP TM?
    Thanks,
    Sreenivas

    Hi Sreenivas,
    I would recommend that you read the Rules of Engagement and other documents in the Getting Started link (top right) before posting anymore.  Your Discussion will most likely get reported as non-specific and get removed.  If you have a specific problem with TM, please post it in a new thread with error messages, version and SPs installed, and how the error occurs and what you are trying to get TM to do.
    There are a lot of resources available in the TM Overview page which can help, so start there and maybe also look at some of the MKS (Monday Knowledge Session) recordings which should also be listed.  There are also a lot of experienced people who can help resolve issues your TM installation, but you need to provide enough information on the problems you are having.  If you are just looking for information on past problems, do a Search or simply browse through past Discussions which are marked with a green Check (Correct Answer).
    Regards, Mike
    SAP Customer Experience Group - CEG (and a Moderator)

  • I upgraded to 10.10.1  today and the brightness dimmed on my mac monitor - I've checked both display and accessability and dont see a problem.  My second monitor which is not a mac monitor is bright still.

    I upgraded to 10.10.1  today and the brightness dimmed on my mac monitor - I've checked both display and accessability and dont see a problem.  My second monitor which is not a mac monitor is bright still.

    Try resetting the PRAM and SMC
    Intel-based Macs: Resetting the System Management Controller (SMC)
    About NVRAM and PRAM

  • Hooking mac mini up to emac with firewire, and using emac as the display

    Is this possible? Would it work to hook up the mac mini via firewire to the emac and use the emac disaplay to run the computer? Thanks

    I second that!
    This is a question that is asked with remarkable regularity, and while it is possible to connect the two systems and to 'run' the mini either as a remote hard drive (a very expensive way of gaining slow external storage) or remote control it, the former is an inefficient use of the mini and the latter only allows you to open a window onto the mini from the host system, where performance is somewhat limited.
    Better in this sort of situation to sell the old system and use the money to buy a new display for the mini, or if the old system is needed and funds very limited, to look for a used display.

  • Dyanamic table is SAP Script with horizontal and vertical lines

    Hi,
    I need to display the data of the table in the SAP script which is having both horiziontal and vertival lines.
    the out put needs to looks as it in Excel...where there are multiple records with 5 fixed coulmns each seprated from one another by horizonalt and vertical lines..
    I thinking about useing the Box with XPOS and YPOS who value changes dynamicaaly..
    But again as the number of pages might be more than one..i think there will issues,
    Can you  let me know how to proceed in SCRIPT ,,,, where the number of records might vary ..and also ..it might continue to second page..
    Regards
    Senthil

    well it is possible but quite tricky.
    All you got in SAP-SCRIPT to achieve this is the BOX-Statement.
    The BOX statement works with variables for XPOS, YPOS, WIDTH and HEIGHT. what you need to do is:
    - calculate those variables during runtime
    - add box-statements with those variables.
    to calculate those variables you need to count used lines and so on. i hope i showed you a way, rest is a lil brainwork then.
    regards

  • Creating an executable script with vi and chmod

    I have some after market packages I want to set up in my MBP Mavericks. I create a script file in iv called runada. It adds some directories to the global $PATH variable. I then change rights on the script, runada, with 'chmod a+x runada' so it becomes an execuitble. But it fails when I call runada within a shell terminal. I have seent his work in Debian I think.

    As a guess: PATH needs to be exported if you want that setting to persist after the script modifies it and exits, or you'll need to "." or "source" invoke the script.
    In any case, post a reproducer of the bash and somebody here can have a look.
    Using homebrew is another approach to rolling your own packaging (if that's where you're headed here), and there are various alternatives to that.

  • Scripting with FTP and HTTP

    Hi All,
    To help us with future planning, we would like to get a feel for how many developers are using the FTP and HTTP objects that are available with scripting in CS3 (through webaccesslib). If you are using them could you send me a quick email describing how you use the component? My email address is [email protected]
    Thanks in advance.
    Alan Morris
    Dev Tech Engineer
    Adobe Systems

    Yeah, this is so aggrevating!
    Adobe builds all of these cool ideas, then doesnt test them.
    The HTTPConnection object does not do POST at all. I have tried nearly every possibility. The documentation is either way off or the object just does not work. I can see the post in raw form and the POST variables are not coming across.
    After working on this for a few hours i thought to myself, hey maybe i should just create a flash pane instead and load the files into it, then have the flash object upload. Well i ran into a big fat wall there too! As it is with patchpanel and bridge, these technologies only accept swf objects. This whole concept of using SWF and crossscripting has a huge flaw. The SWF file's security format does not allow for local file access for doing simple things like upload. If i can't synchronize file data to web based clouds, then i cant do much worth talking about.
    I love these products and their possibilities but i have to have the ability to communicate with the world. HTTP is the way!
    Also a side note, FTP is an insecure/inflexible solution and looks like a lot more time was spent on this aspect of the scriptable product.
    PLEASE HELP ADOBE!!!!!

  • I have a Mac version 10.5.8 with Safari and I can't watch video's... I can download flash player but it won't work.

    I can't watch video on my Mac version 10.5.8 with Safari.

    Could be Flash Player problem.
    Two bugs, one affecting Apple's Mac platform and another attacking Microsoft's Windows, exploit certain Flash player vulnerabilities to install malware onto users' systems, reports ArsTechnica. While users of other operating systems like Linux have yet to report attacks, Adobe's advisory notes the exploit affects all platforms.
    Designated as CVE-2013-0634, the first vulnerability targets the Safari and Firefox Web browsers running on OS X, and is also being used as a trojan to deploy Microsoft Word documents containing malware. For Mac users, the flaw affects Adobe Flash Player version 11.5.502.146 or earlier.
    The Adobe Flash patch can be found on the company's website, and users can visit this page to check if their software is the most curent version.

Maybe you are looking for

  • How do I print titles on photos

    I would like to be able to print my photos with the title either on the edge of the photo or on the photo along one edge. I would also like to include the date, so years from now I know when the photo was taken. (Yes I know that I could write this on

  • Conditional color formating in SSRS 2005

    Hi I have a report with customers bill amount and bill date. The customers have to pay within a grace period of 21 days after bill date I want to conditionally format the bill_date column so that when the number of days after the 21 days grace period

  • Placing a divider in JSplitPane that can't be resized

    Hi, how can i place a divider in JSplitPane that can't be resized? Or is there another way like JPanels?

  • Latest version of Oracle Application Server for AIX

    Hi, Can somebody help me with the latest version of Oracle Application Server available for AIX. The path where I can download the software and the steps to install. Thanks in advance. -Kiran.

  • ORA-01429 ERROR - ANY INPUTS

    i am getting the following error. Please help me to resolve this. SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8 ; ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8 ERROR at line 1: ORA-00604: error occurred at recursive SQL level 1 ORA-014