Fireworks Scripting: Persistent CustomData in Docs

I've been working on a custom template and some scripts that
solve a production problem for my workgroup. In a nutshell it
involves tagging objects (paths and text) according to their
function in the interface, and being able to change their
appearance from full preview to wireframe (black outlines and some
gray) and back again. The tags function somewhat like stylesheets,
except in this case the stylesheet has two 'modes', mockup and
wireframe, and several 'states', active inactive, selected, etc..
To record the tags, I write to the customData property of the
objects. But I think I would also like to record all the style
definitions somewhere in the files themselves, rather than having
to include the 300+ lines of code in every script. Is there
something like a customData property for documents? I don't see
anything like it in the documentation ("Extending Fireworks").
I suppose I could create a path on its own layer, call the
layer "data", lock it and make it invisible. Then I could write the
style definitions to the customData property of the path, but I was
hoping there was a more elegant alternative that would be
transparent to the user.
Anybody have any ideas?

I've been working on a custom template and some scripts that
solve a production problem for my workgroup. In a nutshell it
involves tagging objects (paths and text) according to their
function in the interface, and being able to change their
appearance from full preview to wireframe (black outlines and some
gray) and back again. The tags function somewhat like stylesheets,
except in this case the stylesheet has two 'modes', mockup and
wireframe, and several 'states', active inactive, selected, etc..
To record the tags, I write to the customData property of the
objects. But I think I would also like to record all the style
definitions somewhere in the files themselves, rather than having
to include the 300+ lines of code in every script. Is there
something like a customData property for documents? I don't see
anything like it in the documentation ("Extending Fireworks").
I suppose I could create a path on its own layer, call the
layer "data", lock it and make it invisible. Then I could write the
style definitions to the customData property of the path, but I was
hoping there was a more elegant alternative that would be
transparent to the user.
Anybody have any ideas?

Similar Messages

  • Script: Open all linked docs in *new* window

    Can anybody help? I have a pdf document that will need to have 2000+ links to other documents...and I need to have each link open in a *new* window (by default, they open in the exisitng window). We obviously don't want to have to individually set each link's Properties to "open in new window"...
    Is there a script I can add to the main (parent) pdf doc to make this happen for all links the user clicks on from the main doc? The kicker is that we can't expect the end user to be able to fool with the Preferences or anything like that...in addition, we assume the user may be viewing in either Acrobat or Acrobat Reader in the corporate environment.
    Alternately, a script to automatically show the "previous view" and "next view" arrows, without having the user have to do anything, might work. The absence of those arrows in the default view (starting w Acro 8?) is why we've had to go with the "open in new window" idea. We are dealing with non-tech-savvy users, so we don't want them to have to know keyboard shortcuts or set Preferences...
    Thanks so much!!!
    Bradford

    Absolutely, thanks! I will try to create a variable to store -- and later, restore -- that. Since we have about a zillion links, changing each link would be no fun at all! Is there an issue with trying to evaluate the setting and store the variable from a "on page 1 open" action, and being able to access the variable's value from the "DocumentWillClose" action? (and apologies for any capitalization, etc., issues)
    Do I somehow need to declare the variable to be global, or do I need to have the initial actions happen from an "on document open" event? (I don't see such an event as being an available option)...
    Any code snippet(s) far a similar situation that you could point me towards...?
    Thanks!
    Bradford

  • Jquery mobile 1.3.1 updated firework script/template?

    Hi all,
    Jquery Mobile is now 1.3.1.
    But Fireworks cs6 create jquery mobile themes up to 1.0.
    I tried to use a FW cs6 theme with JQM 1.3.1 but it is a mess.
    Is there an updated template/script for fireworks cs6?
    TIA
    tony

    Yea mobile is now 1.4.2 and I think fireworks is outputting at 1.3.0, is there a way to update?

  • Getting error message when running a script to make an .doc attachment open

    This script:
    var cPath = "|" + this.path + "|U:\uFEFF" + this.dataObjects[1].name;
    app.openDoc(cPath);
    Open PDFs fine but when I try to open a docx document I get an error message:
    NotAllowedError: Security Settings prevent access to this property or method.

    When trying to open a non-PDF file, you must specify to use a converter, by
    setting the parameter bUseConv to true (which can only be done in a
    privileged context). Also, I'm not familiar with this type of path... Are
    you using this to open a file attached to the active PDF? Does it work?
    Have a looked at the openDataObject-method of the Document object? It is
    meant to launch PDF attachments of a file (but it can't be used for any
    other file format).

  • How to load doc-level JavaScript via FDF

    I apologize if this question is answered elsewhere on the forum -- I've spent a fair amount of time searching through the forum and other resources brought up in response to Google searches, all without a solid result; therefore I'm hoping that someone in the forum can help out.
    I've got several dozen PDF forms that all use the same core set of JavaScript functions to perform various validation and formatting processes. So far, I've loaded this library as a document-level script in each PDF and then loaded the PDFs to the server.
    When a user requests to view their specific document, the link that they click actually generates an FDF file that is sent to their browser. The FDF causes the target PDF to be loaded in the browser, into which the FDF data is loaded. A page load Script executes the do_DocLoad function, which sets up the document for initial user use (populates combo boxes, etc.) The user then can interact with the form in various ways and then, optionally, submit the data back to the server for processing. The library functions are referenced in various field formatting or validation calls, as well as by the Submit button that I've got on the form that performs a final field validation prior to submission. So far, this process works very well.
    The issue is that every time a change, even a minor one, is needed in any of the core set of library functions, we have to open each and every PDF to apply the change, then save it and upload the entire batch to the server. Because of the significant amount of time that this can take (which will increase as the PDF library grows), I'd like to instead load the JavaScript functions in the FDF.
    The ideal would be a method to allow the FDF to cause Acrobat to load the script from a file on the server, similar to how the PDF is called. Because I don't know if that would even work, I'm looking at having the ASPX page that processes the FDF, merging the user's data into the FDF format before serving it to the browser also merge in the script and serve it all up piping hot for the user's enjoyment (or so we hope). I've tinkered with the FDF, adding a /JavaScript section at the end of the FDF as follows:
        << /V (~data_client_name~)/T (client_name)>>
        << /V (~data_client_address~)/T (client_address)>>]
        /F (~data_FileName~)/ID [ <  blah blah ><  blah blah >]
        /JavaScript << /Doc 2 0 R >>
      >>
    >>
    endobj
    2 0 obj [ (DocScript1) 3 0 R ] endobj
    3 0 obj <<>>
    stream
    ** script goes here **
    endstream
    endobj
    trailer << /Root 1 0 R >>
    %%EOF
    In the section where ** script goes here ** I have attempted to paste the script library, without success. This library consists of several different JavaScript functions.
    In testing, the above didn't work, unfortunately. :-( I got all kinds of wierd data in the form fields that are processed by the functions that I was trying to load - the page open calls didn't return any errors, which was good, but the fields formatted by the initial setup method were all messed up. I'm looking for any pointers/tips on what I might be doing wrong. Are there special characters that I need to escape/avoid in sending JavaScript this way (I'm using regular expression pattern matching and other code within the script which contain some special characters such as /, \, ^, etc.). Is there a limit to the size of the data that I can stream in this way? Is it as simple as loading my script /Before instead of /Doc? Anything else that I might try?
    Thanks in advance for any assistance that can be given! Every time that I get to go back and spend a couple of hours updating the core library in all of these PDFs is time that I'd rather be spending doing other things. Thanks again!

    This sounds very intriguing and not at all along the lines of what I was thinking of. I'm glad to have the forums to be able to get different perspectives on
    things like this!
    I have a couple of additional questions on this. I like #3 but, not having done it before, I'm curious as to how to get it to work.
    I presume that I would create a new batch process in Acrobat (I am running Acrobat Pro 9) and then on each document processed, do the following:
    1. Import a PDF page (from a specified file that has the document-level scripts included.
    2. Delete the page just-added
    3. Save
    4. Repeat, all docs specified.
    Now questions:
    1. I don't understand how the document scripts will be "left behind" when doing this.
    2. Do I need to delete the existing document script(s) before doing this, or will they automagically be overwritten?
    3. Are there any steps between the insert and the delete that I need to do?
    Finally, just to add another twist, have you seen this work with PDFs that are secured (we apply a password to protect the documents from alteration, with the exception of filling out form fields)?
    So far, in testing, the best method appears to be to store the PDFs separate in an un-secured format (it simply won't work if they're secured -- at least, I haven't gotten it to work yet -- I could probably do it interactively, but who wants to type the goofy password 500 times). I have a separate dummy PDF (1 page with just some explanation text if someone opens it and document-level scripts included) also stored in the folder. Then, run the batch process to do the insert, delete, then apply security on all docs in the folder. So far, so good. The only part that doesn't seem to be working is that the document-level scripts on the dummy PDF don't get left behind after the insert/delete. I removed the doc-level scripts on the original PDFs so that I could more easily verify that the ones from the dummy PDF get "left behind". I'm sure that I'm missing something simple here -- If you can help close that final gap, I'd greatly appreciate it!

  • Stripping the docs

    Stripping the docs in order to have a light system seems to me like going on a morning run and expecting to run faster by omitting to take a handkerchief in your back pocket.
    Sneeze, and you're the loneliest person in the world.
    Just to say that I had to make a quick check in /usr/src/linux/DOCUMENTATION to setup my Intel High Definition soundcard, and... the docs weren't there. So I'm currently waiting for the whole shitload of linux-2.6.24.tar.bz2 to download from kernel.org on my 512 kbps DSL connection, just to check one line in the docs.
    </rant>
    Apart from that, I'm quite happy with Arch.

    EmaRsk wrote:
    Misfit138 wrote:this topic has been covered many times for 5 years or more
    Because it's annoying for a lot of people. If it is a so often raised topic, maybe it's worth to reconsider the decision. Maybe I'm exaggerating here, but I think the absence of proper docs is the main Arch show stopper for many people.
    I'd like to see the packages split into "package" and "package-doc", for example, so I could spare disk and bandwith as usual but if I realize I need to read an info page I'd install the docs and voila.
    It would be trivial to implement, just a line or two in the build scripts to tar the docs instead of throwing them away. No extra work for the package maintainers. Am I wrong?
    No, you are not 'wrong', but it is not a question of right or wrong.
    You and Brebs are making your points in a frank and forthright manner, but the the devs have stated that they will not be providing these docs in the foreseeable time frame. If the community would like to change this, Aaron has even agreed to rsync the repos to the documented packages, but the key factor is that this will have to be a community effort.
    If the community wants it, the community will have to provide a solution at this point. This is far from impossible.
    The AUR, including the [community] repo is completely community-maintained. KDEmod, as was pointed out is 100% community developed. Yaourt, shaman, and pacman-contrib among others are all some of the strongest aspects of Arch.
    Let's be pragmatic, proactive  and as solution-oriented as possible. Either:
    A) provide the docs in a repo or
    B) Ask for the devs to stop stripping docs in a feature request on flyspray- maybe they will agree to simply stop stripping them and the docs will start to appear over time.
    If the answer to B) is "no" then see A).

  • How to covert a ttibetan pdf file to a .docx file using adobe acrobat maintain the tibetan script

    Hi I'm working with a pdf file in traditional Tibetan script and I need to use this content in an editable .doc or .docx file. How do I convert this Tibetan script into a word doc? My adobe doesn't recognize Tibetan as a downloadable item. Please help. Thanks

    I've tried several settings when saving as a PDF, to try to produce a file with fonts that can be detected by Acrobat.  I tried the presets listed in guide: Photoshop Help | Saving PDF files
    But none have worked.
    I cannot use PNG because it is not one of the formats that Acrobat allows for a watermark.  And JPG doesn't work because I need transparency.

  • Java Script and JSF question

    Hello,
    I have a JSF component like this that has a pageSize attribute. It shows a grid with 5 elements.
    <x:gridView id="#{tab}GridView" pageSize="5">
    </f:gridView>Then I have a drop down with 5 menu items where the user can select how many elements they want to see visible on the grid. My question is, how do i use Java Script to to change the pageSize attribute above with what the user selected in the menu below? I have been looking at java script code and online docs for an hour and cant come up with anything that seems to work. Any help will be appriciated. Thank you!!!
    <x:selectOneMenu id="myMenu" onclick="">
      <f:selectItem id="perPage1" itemValue="1" itemLabel="1" />
      <f:selectItem id="perPage2" itemValue="2" itemLabel="2" />
      <f:selectItem id="perPage3" itemValue="3" itemLabel="3" />
      <f:selectItem id="perPage4" itemValue="4" itemLabel="4" />
      <f:selectItem id="perPage5" itemValue="5" itemLabel="5" />
    </x:selectOneMenu>

    [...]how it was never designed to be used for
    such large applications[...]All I can say is that if this is true, then it doesn't show. Yes, I know it (oak) was originally designed for embedded systems, but Java and Oak aren't identical.
    My assembly teacher
    always makes fun of Java, saying java gives you far
    less control, it prevents you from making mistakes.
    No control over unsigned/ signed values, pointers
    etc. Yes. But broadly speaking that's the point. Java sacrifices control over such things. The return, however, is that programmers are able to be more productive because of the great swathes of problems that can no longer arise.
    The mistake is in assuming that Java is the best tool for everything. It isn't, and in fact no language us. As it turns out, Java is just great for building enterprise systems. It has a few other strengths, some of which (applets for example) have been more important in its original uptake but are now relatively minor features.
    You don't write an enterprise website in Intel assembly, and you don't write device drivers in Java.
    Not saying its not good but its good for
    smaller applications like cell phones and
    mini-computers.I think you mean something different by mini-computers to what I mean...
    Its portability is actually the main point in its favour for use in cell phones. If it weren't for that, I think C or C++ would probably have sole ownership of that space.
    Now i'm not saying any thing against it just
    confused on why a class like data-structures at my
    University [...] would be taught using java when C would
    probably be a lot better for Very Large ADTS.You and Joel Spolsky:
    http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html
    I disagree, because I don't think it much matters what language you learn - experience trumps any particular initial language choice. If you're still using Java in 15 years I'll be fairly surprised.

  • Workflow Event Scripts

    Is there a way too store a work flow events idoc script in an external location (eg. file) and call it from within the workflow event. What I am after is a way to encapsulate common workflow business rules in one place and call them.  We have several repeating rules that are used in all of our offices as well as office specific rules which are all currently in separate files.  We would like to factor out the common rules into a parent flow so if there is a change to the common set we only have to change it in one place instead of each file. Thank you.

    Yes: use the Idoc Script function docLoadResourceIncludes.
    http://docs.oracle.com/cd/E23943_01/doc.1111/e10726/c08_config_ref.htm#CSIDO721
    Jonathan
    http://jonathanhult.com

  • Run C# scripts daily/hourly in remote place , not locally

    Hi, I'm a beginner in automation tasks. I don't have experience on it.
    I have 2 scripts in C# (and one in CLI of CollabNetTeamForge,but for now we can forget about this last one).
    These scripts generate two XML docs which are connected and synchronized in a SharePoint Portal.
    I tested this architecture-flow locally from-in my PC and it works but what
    I want to do is automatize the execution and fix a remote storage of this flow-scripts. I want to fix a "task" which
    execute and save hourly this scripts in-from
    a external path (not locally in my PC) in order to keep updated the info (XML docs) in SharePoint without human intervention.
    I tried to find info but I still a bit lost. I don't know what platforms or resources let me do this :if a need a server , Power Shell , VS Timer Tasks , Cloud like Sky Drive...
    Could someone point me in the right direction?

    If you're wanting to do this mainly in SharePoint, you'll need to create a custom timer job.
    We can walk you through how to do this, or you can check out this link:
    http://msdn.microsoft.com/en-us/library/cc406686(v=office.12).aspx
    If the MSDN article is too cumbersome, I've created quite a few of these and can walk you through it.
    Brandon James SharePoint Developer/Administrator

  • Scripting: how to read all files in specific subfolders?

    Hello,
    via a Fireworks script (.jsf) I want to get all files in specific subfolders e.g. of "d:\images" to do something with these files (exporting as JPEGs).
    What are these commands?
    Thanks!
    carlos

    You would use Files.enumFiles:
    http://help.adobe.com/en_US/fireworks/cs/extend/WS5b3ccc516d4fbf351e63e3d1183c94988d-7ee8. html
    Aaron
    http://fireworks.abeall.com

  • Concurrent program sql tuning script

    Hi All,
    I'm looking for script which show detailed description of concurrent job after entering request id.
    -Sql running behind Concurrent job
    -Os process id
    -Explain plan
    -Current execution plan
    Any sqltunning script.
    thanks

    Please see these docs.
    Concurrent Processing - How to Find Database Session & Process Associated with a Concurrent Program Which is Currently Running. [ID 735119.1]
    Concurrent Processing - bde_request.sql - Process and Session info for one Concurrent Request (11.5) [ID 187504.1]
    How to Retrieve SID Information For a Running Request [ID 280391.1]
    How To Trace a Concurrent Request And Generate TKPROF File [ID 453527.1]
    FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12 [ID 296559.1]
    11i-How to find the Trace file generated for a concurrent program [ID 270446.1]
    How To Find Trace File From Concurrent Request ID [ID 452225.1]
    Thanks,
    Hussein

  • Export all open docs as PDF

    I am working on a script which should export all the open docs as PDF.
    I use the following script to export. but InDesign does not export all the PDF. Assume, I have opened seven docs and the script exports only 4 docs and again come back to the first exported doc. can any one help how to resolve the issue.
    var myTotalDocs = (app.documents.length);
        for(var i = 0; i < myTotalDocs; i++)
            myDocument = app.documents[i];
            app.activeDocument = myDocument;
            var myFilePath = app.activeDocument.filePath;
           app.activeDocument.exportFile(ExportFormat.pdfType, File(myFilePath+"/"+".pdf"),false);
    Thanks

    Dear Ramji
    Please use the below code for solving your problem:
    //===================== Start : Export =================================//
    var myTotalDocs = (app.documents.length);
        for(var i = 0; i < myTotalDocs; i++)
            myDocument = app.documents[i];
            app.activeDocument = myDocument;
            var myFilePath = app.activeDocument.filePath;
           app.activeDocument.exportFile(ExportFormat.pdfType, File(myFilePath+"/"+".pdf"),false);
        myDocument.close(SaveOptions.NO);
    //===================== End: Export =================================//
    Once Export the InDesign open document then immediatly close... otherwise this problem [what you menditoned] will occure.
    Thanks & Regards
    T.R.Harihara SudhaN

  • I have made a script but i need it to run again and again. i mean i need  simple looping pls help me.

    // this is my script  I Want to run this script again nd again 
    doc = activeDocument;
           doAction("Action 4","Set 1");
               doc = activeDocument;
               if (doc.height > doc.width)
                   doAction("Action 1n","Set 1");
              doc = activeDocument;
               if (doc.height > doc.width)
                doAction("Action 1nn","Set 1");
                         else {
              doAction("Action 5","Set 1");     
          if (doc.height < doc.width)
                  doAction("Action 1n","Set 1");
                    doc = activeDocument;
               if (doc.height < doc.width)    
                doAction("Action 1nn","Set 1");
             else {
            doAction("Action 5","Set 1");
    and also before this i want to open folder in that it should open psd 001 and so on...and when after looping it should folder in that it should open psd 002.... OR explain me easy way to looping. as i dont no scripting language.
         Thanks ...

    It is easy to create a template for a collage like you show and populate it with your images with a script. However there are some limitations in Photoshop that may impose limitation on you.  It may also be hard to support some thing and make it easy to create templates.  Something like rotating image and perspective placement most likely can only be done by using complex templates that are hard to create and the scripts would need to replace smart object layers embedded object contents with image that are the same size as the current embedded object.  I chose to make it easy to make templates and not support rotation and perspective with automation.  You can still create template like you show, but images will be place in without rotation and perspective.  However images will be placed image layers in the populated collage that you can change its transform manually to add rotation and perspective.  You can even create a batch if these collages and add the  rotation and perspective  later. View Screen Capture in new browser tab or window so you can scale to actual pixels this site scales uploaded image poorly.
    A video showing on how script population works http://www.mouseprints.net/old/dpr/Populate911_720p.mp4
    Photo Collage Toolkit UPDATED Made Rotate for Best Fit an option in PasteImageRoll.jsx Edit to customize your default settings.
    Photoshop scripting is powerful and I believe this package demonstrates this.
    The package includes four simple rules to follow when making Photo Collage Template PSD files so they will be compatible with my Photoshop scripts.
    There are twelve scripts in this package they provide the following functions:
    TestCollageTemplate.jsx - Used to test a Photo Collage Template while you are making it with Photoshop.
    CollageTemplateBuilder.jsx - Can build Templates compatible with this toolkit's scripts.
    LayerToAlphaChan.jsx - Used to convert a Prototype Image Layer stack into a template document.
    InteractivePopulateCollage.jsx - Used to interactively populate Any Photo Collage template. Offers most user control inserting pictures and text.
    ReplaceCollageImage.jsx - use to replace a populated collage image Smart Object layer with an other image correctly resized and positioned.
    ChangeTextSize.jsx - This script can be used to change Image stamps text size when the size used by the populating did not work well.
    PopulateCollageTemplate.jsx - Used to Automatically populate a Photo Collage template and leave the populated copy open in Photoshop.
    BatchOneImageCollage.jsx - Used to Automatically Batch Populate Collage templates that only have one image inserted. The Collage or Image may be stamped with text.
    BatchMultiImageCollage.jsx - Used to Automatically Batch Populate Any Photo Collage template with images in a source image folder. Easier to use than the interactive script. Saved collages can be tweaked.
    BatchPicturePackage.jsx - Used to Automatically Batch Populate Any Photo Collage template with an image in a source image folder
    PasteImageRoll.jsx - Paste Images into a document to be print on roll paper.
    PCTpreferences.jsx - Edit This File to Customize Collage Populating scripts default setting and add your own Layer styles.
    Documentation and Examples

  • Newbie Script Help CS4

    Hello all, I'm starting to learn flash and scripting and i have run into a problem. I have made navigational buttons to flags i have established in the time line, and i have tow movie clips, one that plays before the other. So far i have a stop action when the first movieclip plays, and i tries adding this inside the movie clip...
    stop();
    gotoAndPlay("print");
    I can't seem to get the movie clip to jump to the next flag in the main root of the scene. can any one help. thanks in advance.
    -Mario

    Interesting.  I copied it from this code for a script written for CS2 that applies a thumbnail script to multiple documents:
    // docs is a reference to the Documents collection, that holds all open documents
    docs = app.documents;
    for (i=0; i < docs.length; i++) {
        // instead of getting the active document, iterate through each open doc
        doc = docs.index(i);
    I just tested your script on our workflow and it almost works.  I don't get the error I was getting before, so thank you for fixing that.  Our workflow is apparently the issue now.  I'm getting the error, "You can only duplicate layers from the frontmost document."  How can I rewrite the script so that our logo PSD doesn't have to be already open--and thus in doc[0] position--as our action cycles through each photo?
    What my wife wants to be able to do is batch cycle through a set of photographs, have an action (or script, or combination of the two) copy the layer set over to the currently open photo, relocate and possibly resize the logo on that photo, then save and close the photo and have the next one automatically open to repeat the process.
    I really didn't expect this to be so time-consuming.  I've now spent three hours trying to psych this out.  Thanks again for the help.
    Clint

Maybe you are looking for