load via the script use

Hello

How can I charge a use (*.uri) via the script? Check the plug current if the plug-in is already loaded?

Greetings,

Martin

Hi Martin

The following will let you know what is the revision of a pluggin of data.

The second function updates the plugin data upon request.

Enjoy!

Paul

' Gets the version of a use

function GetDatapluginVersion (strDatapluginName)

Dim oMyDataPlugin

Set oMyDataPlugin = Navigator.Settings.RegisteredDataPlugins (strDatapluginName)

GetDatapluginVersion = oMyDataPlugin.Version

"Call the MsgBoxDisp (oMyDataPlugin.Version)."

EndFunction

Sub CheckUpdateAOP5

Dim strAOP5CurrentVersion, strAOP5LatestVersion

Dim MyVar

protected path2AOP5: Path2AOP5 = 'Yours to fill. "

strAOP5CurrentVersion = GetDatapluginVersion ("AOP5")

strAOP5LatestVersion = "11.0.1f5081".

If strAOP5CurrentVersion = strAOP5LatestVersion then

' msgbox ("AOP5 latest version:" & strAOP5LatestVersion & "is equivalent to" & strAOP5CurrentVersion)

on the other

MyVar = MsgBox ("AOP5 use requires an update now?", vbYesNo + vbQuestion, "DIAdem")

Select if MyVar

Case VbYes

Call ExtProgram (Path2AOP5)

Select end

end if

EndSub

Tags: NI Software

Similar Questions

  • Scripts custom FDM HFM control (for example, perform a translate in HFM) after data FDM load via the batch Loader

    Currently, we have a Microsoft Access database + VBA Scripts that use the HFM API objects to connect to the HFM application to perform the following tasks:

    (1) delete the data according to a specific POV HFM

    (2) load some data from a text file to the request of HFM

    (3) run a Consolidation of data in HFM with 3 different POV

    (4) running a data translate in HFM with a specific POV.

    (5) when the process is complete, HFM send one connects e-mail to Hyperion administration team with newspapers.

    We want to replace this database MS Access with FDM.

    Custom script of FDM, I am able to run batch loader to load data at our request of HFM.

    However, FDM, I want to connect to our HFM application to perform a consolidation (in HFM) and also a Translate (in HFM) after that the data has been loaded by the loader of FDM data.

    The question I have is that I can't use the VB Scripts following FDM (this code works in MS Access)

    Function OpenHfmApp (sDomain As String, sUser As String, fun As String, sserveur As String, sApp As String)

    Dim customer as HsxClient

    Dim cSession as HsvSession

    Dim cServer As HsxServer

    Set customer = New HsxClient

    cClient.SetLogonInfoSSO sDomain, sUser, ' ", fun

    sApp sserveur, 'Financial management', cClient.OpenApplication, cSession cServer

    Set OpenHfmApp = cSession

    End Function

    FDM do not like the 'AS' - I should write:

    Function OpenHfmApp (sDomain, sUser, fun, sserveur, SAPP)

    Sun customer

    Dim cSession

    Dim cServer

    Set customer = New HsxClient

    cClient.SetLogonInfoSSO sDomain, sUser, ' ", fun

    sApp sserveur, 'Financial management', cClient.OpenApplication, cSession cServer

    Set OpenHfmApp = cSession

    End Function

    When I run this code of FDM, I get the following (of Financial Data Management Workbench) error message

    500 variable is undefined: 'HsxClient '.

    Online: 565

    My questions are:

    (1) is it possible to control via the Scripts VB FDM HFM realize some tasks such as claire HFM, Consolidation and HFM HFM translate?

    (2) if so, How can I reference objects in FDM HFM VB Scritp editor [custom general] (to use the HFM API via scripts VB FDM objects)?

    Thank you

    Claude

    Good to know that the 'out of the box' functionality meets your requirements. You can mark the thread as anawered now.

  • Get and Set of dynamic Type via the Script output

    I am running vRO 6.0.1. I built a dynamic type to Veeam. I can see the items in the inventory and can select them as attributes in workflows. I'm looking to get the dynamic Type via a script object and set it as a variable in the script output, but its does not work. I created the dynamic type using the type dynamic plug-in generator v2.

    I have 'Veeam' namespace with types:

    VeeamHost

    jobFolder

    job

    I put an output with the 'DynamicTypes:Veeam.job' type attribute and the name jobOut

    My script is just:

    jobOut = Server.findForType ('DynamicTypes:Veeam.job' '29714267-f517-4f76-a621-902b3e789772/urn:veeam:Job:26eddcda-ea52-469b-b4c9-0b80fec098ae');

    System.log ("Job found:" + jobOut "'); 

    After the execution of the jobOut variable is empty. In the newspapers, I see:

    Found job: DynamicWrapper (Instance): [DynamicTypesDynamicObject]-[class com.vmware.o11n.plugin.dynamictypes.model.DynamicObject] - VALUE: dynobj: [__ns:Veeam __id:29714267-f517-4f76-a621-902b3e789772/urn:veeam:Job:26eddcda-ea52-469b-b4c9-0b80fec098ae __tp:DynamicTypes:Veeam.job]

    Does anyone have an idea of how complete the release of DynamicTypes:Veeam.job with the actual work of veeam I got via the script?

    Could check you what happens if you replace the line

    jobOut = Server.findForType("DynamicTypes:Veeam.job","29714267-f517-4f76-a621-902b3e789772/urn:veeam:Job:26eddcda-ea52-469b-b4c9-0b80fec098ae");

    with

    jobOut is DynamicTypesManager.getObject ("Veeam", "task", "29714267-f517-4f76-a621-902b3e789772/urn:veeam:Job:26eddcda-ea52-469b-b4c9-0b80fec098ae");.

  • Sort by name via the script

    Hello world

    I would be grateful if someone could give some clues to sort by name from the

    Paragraph Styles, character Styles, Styles of object and panels color chart

    via the script.

    Thank you in advance.

    Edson Furman

    [email protected]

    To sort the styles I used the script below - works in CS3 and CS4 if it has been awhile since I finally tried. It could be coded with more elegance, but it worked well as it is. He does not account groups of style: I don't know what happens if your documents contain a sort you would better try.

    As for shades, these are not so easy to sort. There was a discussion about this at one of these sites:

    http://www.Hilfdirselbst.ch/gforum/gforum.cgi?jump=Forum%3d4

    http://InDesign-FAQ.de/

    Peter

    #target indesign
    
    sort_par_styles (app.documents[0]);
    sort_char_styles (app.documents[0]);
    sort_obj_styles (app.documents[0]);
    
    //-------------------------------------------------------------------------------
    
    function sort_par_styles (doc)
        {
        var string_array = sort_par_names (doc);
        for (var i = 0; i < string_array.length; i++)
            doc.paragraphStyles.item (string_array[i]).move (
                LocationOptions.after, doc.paragraphStyles[i+2])
        }
    
    function sort_par_names (doc)
      {
      var array = doc.paragraphStyles.everyItem().name;
      array.shift (); array.shift ();  // exclude [No p.] and [Basic p/]
      return array.sort (case_insensitive);
      }
    
    //-------------------------------------------------------------------------------
    
    function sort_char_styles (doc)
        {
        var string_array = sort_char_names (doc);
        for (var i = 0; i < string_array.length; i++)
            doc.characterStyles.item (string_array[i]).move (
                LocationOptions.after, doc.characterStyles[i+1])
        }
    
    function sort_char_names (doc)
      {
      var array = doc.characterStyles.everyItem().name;
      array.shift ();  // exclude [None]
      return array.sort (case_insensitive);
      }
    
    //-------------------------------------------------------------------------------
    
    function sort_obj_styles (doc)
        {
        var string_array = sort_obj_names (doc);
        for (var i = 0; i < string_array.length; i++)
            doc.objectStyles.item (string_array[i]).move (
                LocationOptions.after, doc.objectStyles[i+4])
        }
    
    function sort_obj_names (doc)
      {
      var array = doc.objectStyles.everyItem().name;
      array.shift (); array.shift (); array.shift ();  array.shift (); // exclude  [None], [Basic Graphics Frame], [Basic Text Frame], [Basic Grid]
      return array.sort (case_insensitive);
      }
    
    //-------------------------------------------------------------------------------
    
    function case_insensitive (a, b)
      {
      return a.toLowerCase() > b.toLowerCase()
      }
    
  • When I opened a new web page, it loads in the previously used tab, why?

    When I opened a new web page, it loads in the previously used tab. It did not used to do this.

    I do a search on google for example, when I opened what I'm looking for, the previous tab disappears and is REPLACED by the following, it is not how I try to go to another destination, Firefox uses the current tab... bloody annoying!

  • Get information for clip loaded in the source using ExtendScript monitor

    Hello

    So, the short version: I was wondering if there is a way to get information about the clip currently loaded in the source, using ExtendScript monitor. Specifically, I am interested in the name, from timecode and in/out points. I don't see anything obvious in the ExtendScript Toolkit data browser, but I thought I'd ask.

    The long version of what I'm trying to do: I have a clip in the source monitor Panel that I know is in the active sequence. I would take the points of entry/exit from the source element and those like entry/exit points in the sequence. It's kind of a hack to get around the fact that you can't associate speech analysis with a multicam clip so I cut with one of the audio clips in the multicam clip and then I am translating those points to the multicam editing sequence. I have a way to do it with an AppleScript macro, but I would find a more robust solution (and cross-platform).

    Thank you!

    There is no possibility of returning to an element of the Source monitor to real projectItem in Agency CC 2015.

    However, you are not the first to ask such a feature, and (ahem) I can neither confirm nor deny that it can be added in the near future.

  • Precomposer new function AE CC via the script

    As we know new AE CC got awesome box called "Adjust duration of both extended the selected layer composition".

    The default setting in the script guide is:

    [object LayerCollection] .precompose (array, string, [bool]);


    But it does not work with a new checkbox.

    So how to operate with a new checkbox via the script?

    Thanks for reading.

    I found that precomp function does not work with app.project.activeItem.selectedLayers;

    So here's the finishing touch that works with selected layers.

    See you soon

    
    function precompLayer() {
    var myComp = app.project.activeItem;
    if(myComp == null){alert("Please, select your composition"); return false;}
    
       var selectLayers = app.project.activeItem.selectedLayers; // selected
       if(selectLayers.length <1 ){alert("Please, select layers"); return false;}
    
       myLayers = [];      // precomp function works only with layers indexes, so array should contain layers indexes
    
            for (var l = 0; l< selectLayers.length; l++){
                myLayers.push(selectLayers[l].index);            // new array with layers indexes
            }
    
     var precompIndices = myLayers;  //change this to customize
            var precompName = "new_comp";  //change this to customize
            var parentComp = app.project.activeItem;  //change this to customize
            clearOutput();
            writeLn("Creating precompose");
            app.beginUndoGroup("Precompose");
            var Inpoint = 0;
            var Outpoint = 0;
    
            var precomp = parentComp.layers.precompose(precompIndices, precompName, true);
            var adjustStartTime = precomp.duration, newCompDuration = 0;
            writeLn(precomp.layers.length+" layers in procompose");
    
            for(var i=1; i<=precomp.layers.length; i++) {
                var layer = precomp.layer(i);
    
                (Inpoint > layer.inPoint) ? Inpoint = layer.inPoint : Inpoint;                  // begin of precomp
                (Outpoint < layer.outPoint) ? Outpoint = layer.outPoint : Outpoint;       // end of precomp
    
                var duration = Outpoint - Inpoint;
                adjustStartTime = adjustStartTime > layer.inPoint ? layer.inPoint : adjustStartTime;
                newCompDuration = newCompDuration < duration? duration : newCompDuration;
            }
                writeLn("New duration = "+newCompDuration);
    
            for(var i=1; i<=precomp.layers.length; i++) {
                precomp.layer(i).startTime -= adjustStartTime;
            }
    
            precomp.duration = newCompDuration;
            parentComp.layer(precompName).startTime = adjustStartTime;
            app.endUndoGroup();
    
    writeLn("Done!");
    }
    precompLayer();
    
  • PowerCLI script for the deployment of virtual machines via the model using customizations comments

    Hello... I hope someone can give me a script that will do the following:

    (1) provision VMs in vCenter template (I need 125 + VMs created in the next day or two)

    (2) use the existing customizations of comments in vCenter

    (3) let me enter data warehouses available to be created on the virtual machines.  Example: I want that VMs on warehouses of specific data as LUN2, LUN5, LUN6, LUN12, LUN1, etc...  However, the script must have the ability to know when a data store is near the threshold of capacity, say 90%, so it can use one of the other warehouses available, identified in the script... similar to storage profiles.  We still have to adopt profiles storage but plan to do so once upgraded us to v5.1 in the next month or two.  We hope that this will help us keep our replicated LUN more organized during the use of SRM and copy to remote groups, our team of storage's configuration on 3PAR.


    Additional information: I will use 2 styles... Windows XP and Win7.  Their respective sizes are 40 and 60 GB due to all applications for stable DR.  Data warehouses are ea 500 GB.

    Please let me know if additional information is necessary... Thank you!!!

    Charles

    No, unfortunately you cannot specify a folder like this.

    You'll have to do a

    $folder = get-file-name WinXP

    New-VM-$folder file...

    Remove the line of New - VM WhatIf switch if you really want to start creating virtual machines.

  • The value of PDF file printed via the script name

    Hi people!

    I have a little problem with the generation of a PDF file. First my Workflow:

    I have an InDesign document with 6 pages. This document is merged with a databasefile containing 100 records. After it is merged, we need to generate a PDF file. This PDF file is opened in acrobat. In the document, I am looking for one ID for each record so I can split the document to 100 files (each with 6 pages) and name by the ID that I found.

    The Acrobat script is finished and functional. I thought: the InDesign script is over, too. But I was wrong-. -.

    I merged the databasefile with the document and it has exported to PDF. But after export, we noticed that the Acrobat script isn't finding the adressheader where ID is in. The script only noticed the text after this header. The result is, as get-Acrobat always 'null' as ID

    If print us the PDF with our PDFprinter, the header could be read by our script of Acrobat. I don't know why this is... But now, I changed the script to print the files through our PDF printer. Unfortunately I can not set a name for my exported file - do you know if it is possible to print PDF files without asking for confirmation after each other as well as with a via script name?

    Here you can see the old writing for InDesign and after her, the sript Acrobat. Maybe I made a mistake by generating my PDFexport and have no need to use the printer?

    INDESIGN SCRIPT:

    /**
    * invite filebrowser and stores the name and path of the file in variable
    */
    var sourceDocument = File.openDialog ("Bitte Indesign-Dokument Park", "*.indd", false);

    /**
    * stores the only prefix of file name to use as the new file name
    */
    newName var = sourceDocument.name.substr (0, sourceDocument.name.length - 5);

    /**
    stores in folder where the file is stored
    */
    var dbSourceFolder = sourceDocument.parent + "/"; "

    /**
    * guests for databasefile, where production is expected to begin
    */
    var dbstartfile = File.openDialog ("Start-Datenbankdatei of Bitte Park", "*.txt", false);

    /**
    * Gets databasefile basename
    */
    var dbstartfilename = dbstartfile.name.slice (0, dbstartfile.name.search(/_Teil+/));

    /**
    * Gets number of first databasefile
    */
    var i = dbstartfile.name.slice (dbstartfile.name.search(/_Teil+/) + 5) .slice (0, -4);

    /**
    * generates the path and name of the first databasefile to use
    */
    var dbSource = dbstartfile;

    /**
    * set PDF preset to generate PDFS
    */
    var PDFPreset = app.pdfExportPresets.item ("GAG - PDF");

    /**
    * stop throwing alerts
    */
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;

    message will be thrown if databasefile is not existing
    If (dbSource.exists == false) {}
    reboot to launch alerts
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
    Alert ("File" + dbSourceFolder + dbprefix + "_Teil" + i + ".txt konnte nicht werden found! \n\rBitte starten Sie den procedure Rubis und Sie die right Datenbankdatei one enter.");
    }
    another process begins
    else {}
    even if (dbSource.exists == true) {}
    Opens the document indesign source without displaying
    mergeDocument = app.open (File (sourceDocument), false);
    defines what databasefile should be used for data merging
    mergeDocument.dataMergeProperties.selectDataSource (File (dbSource));
    starts the file database and the indesign document merging
    mergeDocument.dataMergeProperties.mergeRecords ();
    document generated in PDF export
    app.activeDocument.exportFile (ExportFormat.pdfType, File(sourceDocument.parent+"/"+newName+"_Teil"+i+".pdf"), false, PDFPreset);
    farm open indesign document
    mergeDocument.close (SaveOptions.no);
    i ++ ;

    change the name of the database file to get the next file
    dbSource = File(dbSource.parent+"/"+dbstartfilename+"_Teil"+i+".txt");
    }
    }
    reboot to launch alerts
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
    Alert ("PDF-Generierung sky!");

    SCRIPT ACROBAT:


    /**
    * Path where files should be saved
    * Special characters like spaces must be preceded of--------.
    * If you want to change the folder, use the following form:
    * ' / DriveLetter/foldername /... /LastFolderName/.
    * Be careful not to forget the / before and after the location
    */
    filepath var = "/ c/pdf_split_test / ';

    /**
    * Number of display pages - do not hesitate to change
    */

    pageType = app.prompt var ("Please die Seitenzahl der presentations one gewunschte.", "");
    Alert (PAGETYPE);

    /**
    to search for regular expression
    */

    var idNumber = / 08\d\d\d\d\-\d\d\d\-\d\d\d\d\d-\d\d\d-\d\d/g;

    /**
    * If possible this function gets the number sought as string
    *
    @param string of revenge that is to be found in the document
    * @return null if rematch is not found or a string if the rematch is
    */

    function ExtractFromDocument (reMatch) {}
    try {}
    var Out = new Object();
    for (var i = 0; i < 1; i ++)
    {
    numWords = this.getPageNumWords (i);
    var PageText = ' ';
    for (var j = 0; j < 30; j ++) {}
    var Word = this.getPageNthWord (i, j, false);
    PageText += Word;
    }
    var strMatches = PageText.match (reMatch);
    If (strMatches == null) continue;
    }
    Return strMatches;
    } catch (e)
    {
    App.Alert ("processing error:" + e)
    }
    }

    /**
    * tries to load given filename (excerpt number)
    *
    @param string file name of the file that should be checked
    @param n number of iterate when checking files
    * @return true if the file exists or false otherwise
    */

    function checkIfFileExists (filename, n) {}
    var existingDoc = false;
    try {}
    If (n == 0) {}
    var checkDoc = app.openDoc(filepath+filename+"-000.pdf");
    } else {}
    var checkDoc = app.openDoc(filepath+filename+"-000_"+n+".pdf");
    }
    checkDoc.closeDoc ();
    existingDoc = true;
    } catch (e) {}
    }
    If (existingDoc == true) {}
    n = n + 1;
    n = checkIfFileExists (filename, n);
    }
    return n;
    }

    var pageAmount = this.numPages;
    for (i = 0; I < pageAmount; i + pageType) {}
    var filename = ExtractFromDocument (idNumber);
    fileExistence = checkIfFileExists (filename, 0);
    If (fileExistence! = 0) {}

    this.extractPages ({nEnd:(pageType-1), cPath: filepath + filename + "-000_" + fileExistence + ".pdf"});
    } else {}
    this.extractPages ({nEnd:(pageType-1), cPath: filepath + filename + ""-000.pdf ""});
    }
    this.deletePages ({nStart:0, nEnd: pageType-1});
    }

    Hello

    I have a little problem with the generation of a PDF file. First my Workflow:

    I have an InDesign document with 6 pages. This document is merged with a databasefile containing 100 records. After it is merged, we need to generate a PDF file. This PDF file is opened in acrobat. In the document, I am looking for one ID for each record so I can split the document to 100 files (each with 6 pages) and name by the ID that I found.

    Why you are not exporting 6 pages PDF directly from InDesign?

    Robin

    www.adobescripts.co.UK

  • G5x - loading via the USB cord and a powerbank?

    Just bought a G5X. Buy an extra battery because of comments I've read on the battery life.

    Setting everything up, take some photos and read the manual.  He mentions the USB cord in option and the possibility to connect it to the computer directly to load and do not have to use the AC adapter as an option or using the USB option and the optional adapter to plug into the wall.   No mention is made in regard to connect it via the USB port in to a power Bank.  I have a Bank of RAVPOWER which I use to load my Galaxy 6 and my iPad from time to time.  The specifications are:

    capacity, 16770mah / 61.9wh, entry Screemy/2, output dc5v / 4. 5 a total max.

    Search Bank powerbank and power on the forum, but is not come with anything so thought I would ask if we use power load up and if it works well or not.

    Thank you.

    Your camera battery is only a 1250 mah 4 battery 5wh your powerbank should do the job nicely!

    The camera will only build the power he needs to load the regarless of powerbank power capacity,

    I use power also for various devices that are a fraction of the capacity of power

  • Install Esx 4.1 via the script

    Good day to all,

    I see a lot of documentation showing how to install ESXi 4.1 using installation scripts, but I wonder if it is possible to install the 4.1 via the same installation script?

    Concerning

    David

    Yes, you can use a startup script to install ESX 4.1 - check out the installation guide - http://www.vmware.com/files/pdf/vsp_41_esx_vc_installation_guide.pdf

  • Try to set / change the password BIOS admin via the script WMI on ThinkStation D20

    Hello Lenovo Community!

    Start using the WMI Lenovo_SetBiosSetting class on a D20 system.

    If I understand the documentation that there is a limitation on the BIOS password in the past, but I updated to the latest BIOS Rev who support States was added for this feature.

    I use a script that changes the supervisor on computers password successfully thinkpad, but when even to run the script from command line on the D20 system it returns "SUCCESS" however to change the password did not effect!

    I'm using the right parameters are the standard of lenovo

    ' pap, oldpass newpass, ascii, we.

    I thought maybe "pap" is not the correct setting for password Admin on the D20, however the WMI available, posted 2010 guide, does not show otherwise.

    Someone at - it an example script that they can display successfully change the password on a D20 system?

    Please and thx!

    Did you run the SaveSetting script after changing the password?

    You can get the SaveSetting script from the sample scripts D20 located at the following link:

    http://support.Lenovo.com/en_US/downloads/detail.page?docid=UM002033

    You can use the script SetAdminPassword from the library of scripts of series E, then a follow-up that with something like what follows before restarting:

    "cscript SaveSetting.vbs" originalpwd, ascii, we.

    Replace 'originalpwd' with all what your existing password was at the time wherever you booted the system.

  • Patch Vista - launch of the patches via the script

    I search for an answer online for days and finally gave up and decided to post here...

    I'm currently launching spots on our handful of machines Vista here via a script.  Each time, it returns the error "attempt to reference a token that does not exist.

    I tried to start by calling directly from the server, copy locally, mapping a drive to the server for the launch, etc... any attempt gives me this error even.  What happened to the multiple patches as well.

    Someone at - he seen elsewhere or have any ideas?

    UnderdogRC

    Thank you for visiting the website of Microsoft Windows Vista Community. The question you have posted is related to the server and would be better suited to the Technet community. Please visit the link below to find a community that will provide the support you want.

    http://TechNet.Microsoft.com/en-us/default.aspx Engineer Support Justin M. Microsoft Answers visit our Microsoft answers feedback Forumand let us know what you think.

  • Apply the shift via the script

    Hello

    from Toon Boom, I have many animations frame by frame vectored in the form of PDF files that need to be converted to SVG.

    Using an Illustrator script I found on the web, it is no big deal.

    This is the script:

    /**********************************************************
    
    
    ADOBE SYSTEMS INCORPORATED 
    Copyright 2005-2010 Adobe Systems Incorporated 
    All Rights Reserved 
    
    
    NOTICE:  Adobe permits you to use, modify, and 
    distribute this file in accordance with the terms
    of the Adobe license agreement accompanying it.  
    If you have received this file from a source 
    other than Adobe, then your use, modification,
    or distribution of it requires the prior 
    written permission of Adobe. 
    
    
    *********************************************************/
    
    
    /**********************************************************
    
    Save as SVGs.jsx
    
    
    DESCRIPTION
    
    
    This sample gets files specified by the user from the 
    selected folder and batch processes them and saves them 
    as SVGs in the user desired destination with the same 
    file name.
    
    
    Based on Adobe's "Save as PDFs" sample script, intended for Illustrator CS6
    
    **********************************************************/
    
    
    // Main Code [Execution of script begins here]
    
    
    // uncomment to suppress Illustrator warning dialogs
    // app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
    
    
    var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile, svgSaveOpts;
    
    
    // Select the source folder.
    sourceFolder = Folder.selectDialog( 'Select the folder with Illustrator files you want to convert to SVG', '~' );
    
    
    // If a valid folder is selected
    if ( sourceFolder != null )
    {
      files = new Array();
      fileType = prompt( 'Select type of Illustrator files to you want to process. Eg: *.ai', '*.pdf' );
    
      // Get all files matching the pattern
      files = sourceFolder.getFiles( fileType );
    
      if ( files.length > 0 )
      {
      // Get the destination to save the files
      destFolder = sourceFolder;
      for ( i = 0; i < files.length; i++ )
      {
      sourceDoc = app.open(files[i]); // returns the document object
    
      // Call function getNewName to get the name and file to save the SVG
      targetFile = getNewName();
    
      // Call function getSVGOptions get the SVGSaveOptions for the files
      svgSaveOpts = getSVGOptions( );
    
      // Save as svg
      sourceDoc.exportFile(targetFile, ExportType.SVG, svgSaveOpts );
    
    
      sourceDoc.close();
      }
      alert( 'Files are saved as SVG in ' + destFolder );
      }
      else
      {
      alert( 'No matching files found' );
      }
    }
    
    
    
    
    /*********************************************************
    
    
    getNewName: Function to get the new file name. The primary
    name is the same as the source file.
    
    
    **********************************************************/
    
    
    function getNewName()
    {
      var ext, docName, newName, saveInFile, docName;
      docName = sourceDoc.name;
      ext = '.svg'; // new extension for svg file
      newName = "";
    
      for ( var i = 0 ; docName[i] != "." ; i++ )
      {
      newName += docName[i];
      }
      newName += ext; // full svg name of the file
    
      // Create a file object to save the svg
      saveInFile = new File( destFolder + '/' + newName );
    
    
    
      return saveInFile;
    }
    
    
    
    
    function getSVGOptions()
    {
      var svgSaveOpts = new ExportOptionsSVG();
    
    
      //just using defaults aside from what's written below
      //see http://cssdk.host.adobe.com/sdk/1.0/docs/WebHelp/references/csawlib/com/adobe/illustrator/ExportOptionsSVG.html
    
      svgSaveOpts.embedRasterImages = true;
    
      return svgSaveOpts;
    }
    

    Due to some other issues, I am currently for any compensation my graphics using the object > path > offset in Illustrator and assigning a value of 0.001 mm.

    I thought that it is the simplest solution, and after that, the graphics are perfectly fine.

    The problem is that it is not only a few simple graphics, but animations with often more than 200 images (which would mean 200 PDF files to edit).

    It manually all would be almost impossible.

    So I'm wondering if there isn't a way to add the offset command to the script, so all of my PDF files have been applied all offset by being converted into SVG.

    Would it be possible (I'm really hoping so)?

    I just need a way to automate that. An action recording can be useful for some images, but I think rather in a batch operation.

    Thank you!

    but you can use actions on a lot!

    Use the 'batch' option in the drop down palette menu actions. It allows you to perform an action on a folder of files.

  • Wrapping text around an image via the script

    I am very new to scripting here, ID please be nice ;-) I can't get my head of text wrapping, an image placed above a block of text.

    Here is my sample code:

    myDocument = app.documents.add var (0);

    myPage var = myDocument.pages.item (0);

    monarticle var = myPage.place (file ("< filepath >"));

    var myTextFrame = myDocument.pages.item (0);

    var imgPlace = myTextFrame.place (file ("< filepath >"));

    Image.textWrapPreferences = TextWrapSideOptions.BOTH_SIDES;

    Where I'm wrong?

    Thank you!

    Oops. 'Image' is a built-in name, the name of the Image class: http://jongware.mit.edu/idcs6js/pc_Image.html!

    You can never use built-in names for variables, just as you can't use ' var back = 1; ». I guess that's why Adobe own Introduction to Javascript (InDesign help |) Script) use it always 'my' prefix on all the variables.

    Choose any other name of variable instead of 'Image' and it should do better (keep what said Jarek, impossible to check right now).

Maybe you are looking for

  • AYUDA FUNCION SEARCH 1 D ARRAY

    Buenos dias: Estoy utilizando dicha funcion para realize a UN dato busquea y posteriormente utlizarlo, ver imagen en archivo Editor: Lo deseo hacer are that in part con senalada flecha, corpos entrada to 'element' SEARCH 1 TABLE D variable sea, decir

  • Install an App OF (does not DO) an SD card?

    I tried looking through the thread but am unable to find an answer to this. I know that you are not allowed to install apps on an SD card. My question is - can I copy the application files on my SD card, load the card into my phone, browse the SD car

  • MapFields on the Torch 9800

    Hi all I recently started working on a BB application, up to now, the tools are proved very useful and support online concise in answering the questions. On that note, I encountered a problem with the 9800 Torch Simulator. I can't get MapFields to di

  • My helmet fits on W7 but W7 doesn't have drivers for it. Help!

    My helmet fits on W7 but W7 doesn't have drivers for it. Help!

  • Sample Custom SSO does not not for external userid mapped in userprofile in 11.1.1.8

    HelloI m following the tutorial to set customizable SSO on my site but I m facing a lot of problems to set up external users to Sites of Toilets as mentioned above:76.3.3.http://docs.Oracle.com/CD/E29542_01/doc.1111/e29634/wemcustomizingsso.htm#WBCSD