Packaged app - image script problem

I have a packaged app which has several scripts to install the underlying database objects and seed the initial data. It also runs as script to install the images which are specific to the app, not the workspace.
The script is created using the export and hard codes the app ID. If a user installs the new app and chooses any other app number then the images are not associated with the app.
Is there any sensible way to avoid the hard coding of these values in the script?
EG:
wwv_flow.g_flow_id := 457;
AND:
wwv_flow_image_api.remove_image(
p_image_name => 'all.gif',
p_flow_id => 457);
wwv_flow_image_api.remove_image(
p_image_name => 'none.gif',
p_flow_id => 457);

Scott
I install the app as normal (from an export) but have scripts that run following the app. To make fewer steps for the end user, I was hoping to be able to use this, possibly modified as part of the supporting object scripts? If this is not possible I'll have to add more steps to the install. Is there any way of automating or adding this to the supporting object scripts or some other way I am not aware of please?
Thanks
Phil

Similar Messages

  • Problems applying preboot imaging script bundle w/ 11.3.2

    Hi all,
    Just wondering if its just me with these issues.
    I had our preboot imaging script bundle assigned to the Workstation folder within the ZCC, but since the update to 11.3.2 when attempting to apply the imaging script bundle to a device within the ZCC it throws an error saying that no imaging script bundle is assigned to the device. The only way to get around this issue has been for me to assign the preboot imaging script bundle to each device within our zone, not the folders they exist within.
    Another issue I've had is if I select more than one device within the ZCC the action option "apply assigned imaging bundle" is greyed out. If I only select one device I am able to use that option again.
    Can anyone else confirm if they're experiencing the same issues?
    We're running 3x SLES 11 primaries running 11.3.2, all with the imaging role (our imaging script load balances between the three).
    I've tried accessing the ZCC with Internet Explorer, Firefox and Chrome and they all experience the same issue above.
    Regards,
    Matt

    Originally Posted by Thomas Degenhardt
    Am 17.12.2014 um 02:16 schrieb xvastx:
    >
    > Hi all,
    >
    > Just wondering if its just me with these issues.
    >
    Hello Matt,
    we are having the same issues. Did you contact Novell and opened a SR?
    Regards,
    Thomas
    Hey Thomas,
    We're on an educational licence so, unfortunately, we don't have any SRs to play with. Hopefully Anders has sent the issue trough to Novell.
    Regards,
    Matt

  • Saved File Groups Issue in Bridge Center - script problem?

    Hi all,
    I tried posting this in the Bridge forum with no replies. After browsing through this forum I'm wondering if this is a script problem?
    I have the CS2 premium, and use all packages. The problem I have is saving and retrieving files in the 'Saved File Groups' of Bridge Center. I can save Photoshop files no problem, but the idea is to be able to save other files from open applications in the group and then to recall them later. I can save Illustrator files with others in a group but only Photoshop files open, and it ignores the saved Illustrator files.
    With my InDesign files, it does not even recognise them as files to be saved. I can have a file open, click on "Save open files into a file group" and it will come up with a little box saying there are no open files to save!
    OS - XP sp2. Bridge 1.0.2
    If this can be helped with scripting, please explain clearly, I am a graphic designer and no very little indeed about scripting.
    Your help would be appreciated.
    Thanks,
    Thysje Arthur

    Hi,
    Do you mean that Windows displays “Network Shortcuts” folder when you click “Browse” icon? If so, please check if you configure the default local file location to the “Network Shortcuts” folder. You could refer to the image below to find the option of the default
    local file location.
    Best Regards,
    Mandy 
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Netinstall image  installation problem

    Hi, I'm new in MacOSX Server and trying to do image file with System Image Utility 10.6.2 - MacOS10.6 and additional packeges (MacOSXUpdCombo10.6.2, iWork'09, iLife'09) with "AddPackages and Post-Install Script". By making a image no problem but when I start the installation occurs the following problem.
    MacOs10.6 install correct but other programs added in "AddPackages and Post-Install Script" is not installed, and in Macintosh HD is created a folder named Install.76443 with locked directories.
    Where is the problem why the additional packages not installed.
    My SIU configuration is :
    Define Image Source: MacOSXInstallDVD
    Add Packages and Post-Install Scripts
    - MacOsx10.6.2. Update Combo
    - iLife'09.pkg
    - iWork'09.pkg
    Create image
    type: Netinstall
    Install Volume: Macintosh HD
    Save to: Documents
    Image Name: Netinstall of Mac OS X Install DVD
    Network Disk: Netinstall of Mac OS X Install DVD
    Image Index: 1533
    Description: Netinstall of Mac OS X Install DVD
    i want to create one image for all packages and updates and install it from network to all computers in my office.
    thanks

    I think this is covered in a different thread but, in short, the 10.6.2 update will fail to install on top of the 10.6 DVD. YMMV with the iLife & iWork packages as they may run pre-install scripts that will also cause them to fail.

  • How can I synchronize my iPhoto events? my iTunes doesn't read them and with the app Images in the iPad I can only find Photos, Albums, Faces and Places, not Events.

    How can I synchronize my iPhoto events? my iTunes doesn't read them and with the app Images in the iPad I can only find Photos, Albums, Faces and Places, not Events.

    I had a problem a couple of months ago when iPhotos suddenly rearranged the order of my Events (Why won't iPhoto let me arrange my photos?) .  I was told "Use albums not events - events are not a good way to organize - albums and folder are designed for organisation and are very flexible".
    Haha!  I should have paid attention and read between the lines!  My iPhotos were highly organised groupings - not according to date but the way I wanted them - and it was so easy to do!  I see now that if I had them all in albums, as per the Apple Apologist suggestion, I wouldn't have this unholy mess I have been left with just to make iPhone & iCloud users happy.  I am now going through Photos and making Albums (of what used to be in my Events)  ... maybe I'll get this finished before they do another non user friendly update!

  • Importing Subtitles using Image Script

    I'm just about to make a project with seven different languages. It will have audio tracks as well as subtitle tracks.
    I've done subtitles in Encore 1.5 before using text with some success. For this production I need to import tif using an image script. I can get the script working, however once it's located the images to import it gives me an error message along the lines of
    "Sorry, an abnormal condition has been detected. Before quitting, you have one chance to save your project..."
    Note I get passed the Map Colours and Import Subtitles dialogue box. It is only when I click on this last stage that it goes bad.
    Any ideas. I kinda thought this was what the program was meant to do.
    - Geoff

    Turns out the problem I was having was due to memory. Needed to restart.
    Naartjie, not sure how to save subtitles with a background image. Encore seems to only want to work with three colours, one is the background colour, the colour of the text and the colour of the outline for the text. So unless you can make your background image from the two colours that remain on the screen - text colour and outline, I'm not sure how to do go about it.
    - Geoff

  • CSS Image loading problem by dynamically loading from fxml file?

    h1. Introduction
    The application I am developing loads an FXML file from a Controller. The FXML uses CSS and images for buttons are set in the CSS.
    CSS directory structure
    <package>.fxml
    Images
    <package>.fxml.resources.<subdir>
    Example CSS Code
    .buttonImage {
        -fx-background-image: url("resources/subdir/image.png");
    }Example loading fxml from controller code
             URL location = getClass().getResource("/package/fxml/UI.fxml");
             FXMLLoader fxmlLoader = new FXMLLoader(location);
             fxmlLoader.setLocation(location);
             fxmlLoader.setBuilderFactory(new JavaFXBuilderFactory());
             Parent root = (Parent)fxmlLoader.load(location.openStream());
             Controller = (Controller) fxmlLoader.getController();
             newPane.getChildren().add(root);h1. Problem
    The fxml file does not load and causes the following error:
    javafx.fxml.LoadException: Page language not specified.Note, the fxml file loaded correctly before images were added.
    Any ideas of what might be going wrong?
    h1. Attempted
    I have attempted the following: tried changing the url of the image as an absolute path.

    No Problem: Note, this is the actual FXML, my previous examples were simplifications of package names and class names in order to directly illustrate the problem. Note, I am using SceneBuilder to develop the FXML file.
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import java.net.*?>
    <?import java.util.*?>
    <?import javafx.collections.*?>
    <?import javafx.scene.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.*?>
    <?import javafx.scene.text.*?>
    <AnchorPane id="AnchorPane" prefHeight="396.0000999999975" prefWidth="350.0" styleClass="mainFxmlClass" xmlns:fx="http://javafx.com/fxml" fx:controller="com.monkygames.kbmaster.controller.ProfileUIController">
      <children>
        <Label layoutX="14.0" layoutY="14.0" text="Profiles">
          <font>
            <Font size="18.0" />
          </font>
        </Label>
        <GridPane layoutX="15.0" layoutY="44.0" prefHeight="99.0" prefWidth="335.0">
          <children>
            <Label text="Type: " GridPane.columnIndex="0" GridPane.rowIndex="0" />
            <ComboBox fx:id="typeCB" prefWidth="249.0" GridPane.columnIndex="1" GridPane.rowIndex="0">
              <items>
                <FXCollections fx:factory="observableArrayList">
                  <String fx:value="Item 1" />
                  <String fx:value="Item 2" />
                  <String fx:value="Item 3" />
                </FXCollections>
              </items>
            </ComboBox>
            <Label text="Program: " GridPane.columnIndex="0" GridPane.rowIndex="1" />
            <ComboBox fx:id="programCB" prefWidth="249.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
              <items>
                <FXCollections fx:factory="observableArrayList">
                  <String fx:value="Item 1" />
                  <String fx:value="Item 2" />
                  <String fx:value="Item 3" />
                </FXCollections>
              </items>
            </ComboBox>
            <Label text="Profile: " GridPane.columnIndex="0" GridPane.rowIndex="2" />
            <ComboBox prefWidth="249.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
              <items>
                <FXCollections fx:factory="observableArrayList">
                  <String fx:value="Item 1" />
                  <String fx:value="Item 2" />
                  <String fx:value="Item 3" />
                </FXCollections>
              </items>
            </ComboBox>
          </children>
          <columnConstraints>
            <ColumnConstraints fillWidth="false" halignment="RIGHT" hgrow="NEVER" maxWidth="-Infinity" minWidth="10.0" prefWidth="80.0" />
            <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
          </columnConstraints>
          <rowConstraints>
            <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
            <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
            <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
          </rowConstraints>
        </GridPane>
        <HBox layoutX="14.0" layoutY="150.0" prefHeight="159.0" prefWidth="335.0">
          <children>
            <Label text="Description: " />
            <TextArea prefHeight="172.0" prefWidth="247.0" wrapText="true" />
          </children>
        </HBox>
        <HBox alignment="CENTER" layoutX="11.0" layoutY="334.0" prefHeight="48.0" prefWidth="329.0">
          <children>
            <Button fx:id="newProfileB" contentDisplay="GRAPHIC_ONLY" minHeight="48.0" minWidth="48.0" mnemonicParsing="false" onAction="profileEventFired" prefHeight="48.0" prefWidth="48.0" styleClass="newProfile" text="New Profile" />
            <Button id="newProfileB" fx:id="cloneProfileB" contentDisplay="GRAPHIC_ONLY" minHeight="48.0" minWidth="48.0" mnemonicParsing="false" onAction="profileEventFired" prefHeight="48.0" prefWidth="48.0" styleClass="cloneProfile" text="Clone Profile" />
            <Button id="newProfileB" fx:id="importProfileB" contentDisplay="GRAPHIC_ONLY" minHeight="48.0" minWidth="48.0" mnemonicParsing="false" onAction="profileEventFired" prefHeight="48.0" prefWidth="48.0" styleClass="importProfile" text="Import Profile" />
            <Button id="newProfileB" fx:id="exportProfileB" contentDisplay="GRAPHIC_ONLY" minHeight="48.0" minWidth="48.0" mnemonicParsing="false" onAction="profileEventFired" prefHeight="48.0" prefWidth="48.0" styleClass="exportProfile" text="Export Profile" />
            <Button id="newProfileB" fx:id="printPDFB" contentDisplay="GRAPHIC_ONLY" minHeight="48.0" minWidth="48.0" mnemonicParsing="false" onAction="profileEventFired" prefHeight="48.0" prefWidth="48.0" styleClass="pdfProfile" text="Print to PDF" />
            <Button id="newProfileB" fx:id="deleteProfileB" contentDisplay="GRAPHIC_ONLY" minHeight="48.0" minWidth="48.0" mnemonicParsing="false" onAction="profileEventFired" prefHeight="48.0" prefWidth="48.0" styleClass="deleteProfile" text="Delete Profile" />
          </children>
        </HBox>
      </children>
      <stylesheets>
        <URL value="@master.css" />
        <URL value="@profile.css" />
      </stylesheets>
    </AnchorPane>Edited by: 960799 on Jan 4, 2013 8:58 PM
    Edited by: 960799 on Jan 4, 2013 8:59 PM

  • This.getField error in app.Mail script

    I am having trouble with an app.Mail script I have created in a Lifecycle form.  If I place a this.getField("field_name") line in the script Acrobat Javascript debugger states that the this.getField is not a function.  Also the this.path line returns as undefined in the email message body if bypass the this.getField line.  Perhaps I am mixing up Javascript script and Lifecycle scripting?  If so what needs to be changed for Lifecycle?  I know the app.mail script works without the var lines, but once I add those in is when the problems pop up.  Script listed below.  Thanks!
    var cMyMsg = this.path
    var Sub = this.getField("Field_Name").value;
    app.mailMsg({bUI: true, cTo: "[email protected], cSubject: Sub, cMsg: cMyMsg});

    Hi,
    Your script is written using Acrobat JavaScript, whereas because you are working in LiveCycle Designer you need to make the script compatible with the LiveCycle Designer form JavaScript.
    The code could be changed to this which works in LiveCycle Designer
    var cMyMsg = event.target.path
    // Assuming the Field_Name field is in the same subform as the button to run the code
    var Sub = Field_Name.rawValue;
    app.mailMsg({bUI: true, cTo: "[email protected]", cSubject: Sub, cMsg: cMyMsg});
    Hope this helps
    Malcolm

  • Amazon Store Packaged App Question - Web Service

    Hi!
    I was very excited when I saw the Amazon Store packaged app! It's exactly what I need for a venture of mine, but unfortunately the packaged app is not working.
    I get the following error:
    <?xml version="1.0"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aws="http://webservices.amazon.com/AWSFault/2005-15-09"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>aws:Client.MissingParameter</faultcode><faultstring>The request must contain the parameter Signature.</faultstring><detail><aws:RequestId xmlns:aws="http://webservices.amazon.com/AWSFault/2005-15-09">69ae79fc-d6d2-41ed-a451-763974b95bf3</aws:RequestId></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
    I know why: apparrently Amazon changed the authentication method, and the answer lies somewhere here:
    http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html?RequestAuthenticationArticle.html
    I have created and downloaded my private key file and X.509 certificate file, but am not sure where to make the rest of the changes they describe.
    Can anybody help? Is the original creator of Amazon Store anywhere out there?
    Many thanks in advance for any help! You have NO IDEA what a huge help it would be for me to get this working!!!
    Michelle

    Hi,
    According to your description, I am afraid your problem is out of support in windows store app. Apache is a  third party web service. We cannot support it.
    Best Wishes!
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and
    makes it easier for other visitors to find the resolution later.

  • Image script doesn't use the correct host name

    Hello NG
    I created a ZCM Imaging script so that I got a prompt for the name of the
    workstation. Unfortunatelly the script doesn't work correct. I set as WSName
    following Name WS999
    After the Image was restored, the hostname was set to Company-SJCFNSG
    (example: Company = Novell) NOVELL-SJCFNSG
    What could be the cause of this problem?
    Here the script i used:
    IMGSVR=192.168.4.30
    while test ! $WSNAME; do
    echo -n -e "\n Please set NetBIOS Name and a accept with Enter: ";
    read WSNAME;
    done;
    if test $WSNAME; then
    zisedit Name=$WSNAME;
    fi
    img -rp MyImage1.zmg
    img -rp MyAddOn1.zmg
    img -rp MyAddOn2.zmg
    sleep 10
    Regards
    Ramon

    I did find the solution!
    In earlier Zenworks versions the wsname was set by "zisedit name=PCName01"
    now in ZCM10 and ZCM11 the variable did change so I had to modify it to
    zisedit Computername=PCName01
    if test $WSNAME; then
    zisedit ComputerName=$WSNAME;
    fi
    Regards
    Ramon
    "Ramon Lustrati" schrieb im Newsbeitrag
    news:C%zup.26$C%[email protected]..
    Hello NG
    I created a ZCM Imaging script so that I got a prompt for the name of the
    workstation. Unfortunatelly the script doesn't work correct. I set as WSName
    following Name WS999
    After the Image was restored, the hostname was set to Company-SJCFNSG
    (example: Company = Novell) NOVELL-SJCFNSG
    What could be the cause of this problem?
    Here the script i used:
    IMGSVR=192.168.4.30
    while test ! $WSNAME; do
    echo -n -e "\n Please set NetBIOS Name and a accept with Enter: ";
    read WSNAME;
    done;
    if test $WSNAME; then
    zisedit Name=$WSNAME;
    fi
    img -rp MyImage1.zmg
    img -rp MyAddOn1.zmg
    img -rp MyAddOn2.zmg
    sleep 10
    Regards
    Ramon

  • Image refresh problem

    hi, i have an image inside an iframe that i'm trying to
    change upon the click of a button. i use the following code:
    <SCRIPT language="JavaScript" type="text/javascript">
    function swapImage(intImage){
    var
    imgs=["images/pic0.jpg","images/pic1.jpg","images/pic2.jpg","images/pic3.jpg","images/pic 4.jpg",
    "images/pic5.jpg"];
    parent.frames['cont'].document.getElementById('mgmnt_pic').src =
    imgs[intImage];
    alert(parent.frames['cont'].document.getElementById('mgmnt_pic').src)
    </SCRIPT>
    then in body:
    <p><a href="javascript:; "
    onclick="frames['cont'].swapImage(0);">Management
    Team</a></p>
    i know from the alert that it is changing the source of my
    image, the problem is that the image itself is not changing at all.
    has anyone experienced this before? what can i do to fix it?

    Hi,
    chk the link
    http://javascript.internet.com/miscellaneous/random-image.html
    shanthi

  • RH8 image map problem

    I created an image map back in RoboHelp 6 and it worked perfectly. When I converted my project recently to RoboHelp 8, the image map pop-ups are not working correctly. I've checked the properties of the image map and they are correct. But the pop-up boxes do not display correctly. I'm going to attached an example of how the same one displays in RH6 and RH8 and a screen shot of my settings.
    Can anyone help me with this?

    After much trial and error testing around this image map issue, I cannot seem to find a fix for image maps within RoboHelp 8. No matter what I've tried (and it was a lot), nothing seems to fix the image map problem. Even creating a new image map on a new page with totally different info, pop up pages, image, etc. and turning OFF all breadcrumbs - the image map does not display correctly once generated (nor in preview).
    I have found a VERY TEDIOUS workaround for this (that I'm not happy about). If I take my original pop-up topic htm pages (9 of them) from my RoboHelp 6 project and the original eHlpDhtm.js file from RH6 and place them in my output Help file from RH8 (overwriting the RH8 with the RH6 files), then the image map works correctly.
    The eHlpDhtm.js file has many more scripts in it than just the image map triggers, so I'm not sure what all else I'm affecting when I'm fixing one problem (i.e. not sure how many more problems I'm creating at the same time when fixing one problem.)
    It's almost like the "breadcrumbs" feature in RH8 has broken the image maps feature in RH8.
    I'm still up for more suggestions as how to fix this if anyone has any ideas.

  • Help! 'Package for Print' Script

    Hi all,
    I have a specific 'Package For Print' script, that needs a small modification, and and I was hoping someone could help me.
    Essentially, I need to OMIT 'Include PDF' option when packaging, since this makes things a bit wonky on my script (see below).
    Let me know if you need to see the script, and I'll post it.
    Thank you.

    Here you go, and thank you. I know notes are also included in it. Sorry about this.
    //Package the active document and setup the dockets folder structure.
    //The active document shouldn't have been saved (has no name), so provide a name
    //taken from the first and only link.  After creating the dockets folder structure,
    //close and delete the original file and open the file in the docket's originals
    //folder.
    #target InDesign
    //Constants
    const PROOF_PREFIX = 'Proof_';
    const OUTPUT_SUFFIX = ' Folder';
    const ORIGINALS_FOLDER = 'Originals';
    const PRINT_FOLDER = 'Print';
    const DIGITAL_PROOF_FOLDER = 'Digital Proof';
    const CLIENT_FOLDER = 'Client Provided Files';
    const DEFAULT_MAC_DOCKETS = '/Users/parham/Desktop';
    const PDF_PROFILE = 'Linx_Proof'
    function Err() {}
    //Use a more user-friendly version than throwing an error.
    Err.FatalError = function (msg) {
      alert(msg, 'Fatal Error', true);
      exit();
    function makeShowUI(runtime) {
      var doc = runtime.doc;
      var window = (function () {
      var windowDef = "Window {\
      type: 'dialog', \
      properties: { \
      resizeable: false, \
      closeButton: true, \
      maximizeButton: false, \
      minimizeButton: false \
      text: 'Dockets Package', \
      orientation: 'column', \
      var w = new Window(windowDef);
      //Folder name
      w.add("StaticText { text:'New Folder Name', alignment: 'left' }");
      var defaultName = doc.name;
      if (defaultName.slice(-5) == '.indd') {
      var origlength = defaultName.length;
      defaultName = defaultName.substr(0, origlength - 5);
      w.folderText = w.add("EditText { alignment: 'left', characters: 30, justify: 'left', " +
      "text:'" + defaultName + OUTPUT_SUFFIX + "'}");
      //Destination dir
      w.add("StaticText { text:'Save To', alignment: 'left' }");
      var dirGroup = w.add("Group { orientation: 'row', alignment: 'fill' }");
      w.dirText = dirGroup.add("EditText { characters: 30, justify: 'left', " +
      "text:'" + DEFAULT_MAC_DOCKETS + "'}");
      w.dirBrowseBtn = dirGroup.add("Button { text: 'Browse...' }");
      w.dirBrowseBtn.textBox = w.dirText;
      //Package Options
      w.options = w.add("Panel { orientation: 'column', alignment: 'fill', \
      text: 'Package Options', alignChildren: 'left'}");
      w.options.fonts = w.options.add("Checkbox { text: 'Copy Fonts' }");
      w.options.links = w.options.add("Checkbox { text: 'Copy Linked Graphics' }");
      w.options.profiles = w.options.add("Checkbox { text: 'Copy Color Profiles' }");
      w.options.update = w.options.add("Checkbox { text: 'Update Graphic Links In Package' }");
      w.options.hiddenContent = w.options.add("Checkbox { text: 'Include Fonts and Links From Hidden and Non-Printing Content' }");
      w.options.ignore = w.options.add("Checkbox { text: 'Ignore Preflight Errors' }");
      w.options.report = w.options.add("Checkbox { text: 'Create Report' }");
      w.options.fonts.value = true;
      w.options.links.value = true;
      w.options.profiles.value = true;
      w.options.update.value = true;
      w.options.hiddenContent.value = true;
      w.options.ignore.value = true; //Parham's request for true
      w.options.report.value = false; //Saeed's request for false (no instructions)
      //Digital Proof
      w.proof = w.add("Panel { orientation: 'column', alignment: 'fill', \
      text: 'Digital Proof', alignChildren: 'left'}");
      w.proof.make = w.proof.add("Checkbox { text: 'Make PDF Proof' }");
      w.proof.viewAfter = w.proof.add("Checkbox { text: 'View PDF' }");
      w.proof.make.value = false;
      w.proof.viewAfter.value = false;
      //OK / Cancel
      var buttonDef = "Group { orientation: 'row', alignment: 'right', alignChildren: 'right' }";
      w.bg = w.add(buttonDef);
      var okDef = "Button { text: 'OK', alignment: 'right' }";
      var cancelDef = "Button { text: 'Cancel', alignment: ['right', 'center'] }";
      w.okBtn = w.bg.add(okDef);
      w.cancelBtn = w.bg.add(cancelDef);
      return w;
      runtime.window = window;
      window.dirBrowseBtn.onClick = (function () {
      var result = Folder.selectDialog('Choose destination directory');
      if (null !== result) {
      //Replace string with selected path
      this.textBox.text = result.fullName;
      return window.show();
    function deleteFolder(folder) {
      if (!folder.exists) {
      return;
      var children = folder.getFiles();
      for (var i = 0, im = children.length; i < im; i++) {
      if (children[i] instanceof Folder) {
      deleteFolder(children[i]);
      } else {
      children[i].remove();
      folder.remove();
    //Main path
    try {
      var a = app.activeDocument;
    } catch (e) {
      Err.FatalError("No document open");
    var runtime = {};
    var doc = app.activeDocument;
    runtime.doc = doc;
    if (doc.saved) {
      //Document has already been saved (already has a name), so stop.
      Err.FatalError("Document has already been saved");
    //Ensure at least one link, since multipaged PDFs end up as more than 1 link.
    if (doc.links.length < 1) {
      Err.FatalError("Document has " + doc.links.length + " links.");
    //Save the existing file in a temporary place, same dir as first link.
    //Take the name from the first link
    var link = doc.links.firstItem();
    var defaultName = link.name;
    if (defaultName.slice(-4) == '.pdf') {
      var origlength = defaultName.length;
      defaultName = defaultName.substr(0, origlength - 4);
    } else {
      //Placed item is not a pdf, as per Parham's request, don't warn about it.
      //Just take the filename best guess and go with it.
    // if (confirm('Linked item is not a PDF.  Package anyways?',
    // true, 'Package non-PDF')) {
      //break on the last '.'
      var lastIndex = defaultName.lastIndexOf('.');
      if (lastIndex > -1) {
      defaultName = defaultName.substr(0, lastIndex);
      } else {
      defaultName = defaultName;
    // } else {
    // alert('Did not package.');
    // exit();
    //filePath should be a File, but is actually a string, so make a file.
    var linkFile = new File(link.filePath);
    var origFile = new File(linkFile.path + '/' + defaultName + '.indd');
    if (origFile.exists) {
      //Folder already exists, get user to confirm
      if (confirm("File " + defaultName + '.indd already exists.  Replace?',
      true, 'Replace File')) {
      //Erase the temp file
      origFile.remove();
      } else {
      alert('Did not overwrite existing files, did not package.');
      exit();
    doc.save(origFile);
    if (2 == makeShowUI(runtime)) {
      //User pressed cancel
      exit();
    //Main code, do the packaging and make the directories.
    //But first check for existing folder.
    var folderName = runtime.window.folderText.text;
    var destinationPath = runtime.window.dirText.text;
    if (destinationPath.slice(-1) == '/') {
      var newFolderPath = destinationPath + folderName;
    } else {
      var newFolderPath = destinationPath + '/' + folderName;
    var outputRoot = new Folder(newFolderPath);
    if (outputRoot instanceof Folder && outputRoot.exists) {
      //Folder already exists, get user to confirm
      if (confirm('Dockets folder ' + folderName + ' already exists.  Replace?',
      true, 'Replace Folder')) {
      //Erase the destination directory
      //Get all contained files + folders, then delete them.
      deleteFolder(outputRoot);
      } else {
      alert('Did not overwrite existing files.');
      exit();
    } else if (outputRoot instanceof File) {
      //Destination folder exists as a file, fail.
      Err.FatalError('File named ' + folderName + ' already exists, cannot make folder.');
    //Destination doesn't exist, create it.
    if (!outputRoot.create()) {
      Err.FatalError('Error creating folder ' + folderName);
    //We have an empty directory, now do the packaging and everything else.
    var printFolder = new Folder(newFolderPath);
    printFolder.changePath(PRINT_FOLDER);
    if (!printFolder.create()) {
      Err.FatalError('Error creating Print folder.');
    var digitalProofFolder = new Folder(newFolderPath);
    digitalProofFolder.changePath(DIGITAL_PROOF_FOLDER);
    if (!digitalProofFolder.create()) {
      Err.FatalError('Error creating Digital Proof folder.');
    var clientFolder = new Folder(newFolderPath);
    clientFolder.changePath(CLIENT_FOLDER);
    if (!clientFolder.create()) {
      Err.FatalError('Error creating Client folder.');
    var originalsFolder = new Folder(newFolderPath);
    originalsFolder.changePath(ORIGINALS_FOLDER);
    if (!originalsFolder.create()) {
      Err.FatalError('Error creating Originals folder.');
    //Do the package
    var f = runtime.window.options;
    if (doc.packageForPrint(originalsFolder, f.fonts.value, f.links.value, f.profiles.value, f.update.value, f.hiddenContent.value, f.ignore.value, f.report.value, false, true)) {
    } else {
      Err.FatalError('Failed to package.');
    //Do the PDF proof
    if (runtime.window.proof.make.value) {
      var proofname = PROOF_PREFIX + doc.name;
      if (proofname.slice(-5) == '.indd') {
      var origlength = proofname.length;
      proofname = proofname.substr(0, origlength - 5);
      proofname = proofname + '.pdf';
      var proofFile = new File(digitalProofFolder.fullName + '/' + proofname);
      if (proofFile.exists) {
      Err.FatalError('Digital proof already exists.');
      } else {
      var exportProfile = app.pdfExportPresets.itemByName(PDF_PROFILE);
      //We get an object even if the profile doesn't exist, have to check isValid
      if (!exportProfile.isValid) {
      Err.FatalError('PDF profile ' + PDF_PROFILE + " doesn't exist, digital proof not created.");
      //Explicitly set to export all pages.
      app.pdfExportPreferences.pageRange = PageRange.ALL_PAGES;
      //Set view preference
      app.pdfExportPreferences.viewPDF = runtime.window.proof.viewAfter.value;
      doc.exportFile(ExportFormat.PDF_TYPE, proofFile, false, exportProfile);
    //Open the Originals folder .indd, close the current file and delete it.
    var newFile = new File(originalsFolder.fullName + '/' + doc.name);
    if (!app.open(newFile)) {
      Err.FatalError("Failed to open packaged .indd");
    doc.close();
    origFile.remove();

  • How can I save the images and movies on a  external Disk from iphoto program, to protect the images when problems occur in the laptop,

    How can I save the images and movies on a  external Disk from iphoto program, to protect the images when problems occur in the laptop,

    Most Simple Back Up:
    Drag the iPhoto Library from your Pictures Folder to another Disk. This will make a copy on that disk.
    Slightly more complex: Use an app that will do incremental back ups. This is a very good way to work. The first time you run the back up the app will make a complete copy of the Library. Thereafter it will update the back up with the changes you have made. That makes subsequent back ups much faster. Many of these apps also have scheduling capabilities: So set it up and it will do the back up automatically.
    Example of such apps: Chronosync - but there are many others. Search on MacUpdate or the App Store
    If you want to back up the Photos only:
    Export them using the File -> Export command.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.

  • IPhone app store downloading problem

    I have iPhone app store downloading problem (iOS 5). I could not download or update any software successfully from yesterday. Every app shows "waiting for download" but nothing happen for two days. It seems my app store does not connect to server. I use same account in my iPad, but it works normal. So, what happen to my iPhone? Please help me!

    Hold the home button and lock button for 10 seconds to reboot the iPhone.

Maybe you are looking for

  • Smartforms - Chinees characters are not displayed properly

    Hi, The chineese characters are not displayed propery when logged in EN in the logon screen, but we are able to see Chineese characters when logged in with ZH - chineese in the logon screen. This is happening for Sales order and Purchase order and fo

  • SG200-08

    Hi, I bought an SG200-08 switch in december. This one has refused to boot with an orange led port 1 on. The second one I received for the replacement refused to start too. The led system is green flashing all the time and the switch refused to start.

  • While running F110 mail trigger should happen at the time of payment Run

    Hi Experts, I have configured FBZP and automatic mail trigger for Payment Advice also.  Now while running F110 then at the time of Proposal Run the mail is getting triggered. But since its proposal it can be edited also. So I need the mail should tri

  • SSL connectivity for IBM WebSphere MQ to integrate with XI

    Any information of SSL connectivity for IBM WebSphere MQ to integrate with XI???

  • Opening files via relative filepaths

    Hello everyone, I've got a small problem with publishing a Captivate 3.0.1 project as an EXE file. The presentation ends with two buttons, one opens a website (works fine), and the other should open a PDF file. It also works OK, but only if I use an