Executes a JavaScript from VB (CS3)

Hi - For convoluted reasons, I had to builld a simple applescript that runs a javascript script. Boiled down, it looks like this:

Tell application "InDesign".
activate
do script javascript language "Macintosh HD:Applications:myscript.jsx".
tell the end

That's what I need.

Now, I need to do the same thing with a VB script.

Can someone help me learn how to accomplish the same thing in VB script (just run a javascript script)?

Thank you

Set myInDesign = CreateObject("InDesign.Application.CS3")
myInDesign.DoScript "D:\JavaScriptFile.jsx", idScriptLanguage.idJavascript

Tags: InDesign

Similar Questions

  • Execute function javascript from the report interactive link (link).

    Y at - it anyway to run the javascript function in the interactive report.
    My (link) column is set to display an icon.
    What I tried, is to use the URL as target and problem with the correct syntax to call the javascript function here.
    I tried javascript:alert("test"); in the URL - it does not work.

    Any suggestions?

    Thanks in advance

    Robert

    Hi Robert,.

    You can use "(double guillemets) in JavaScript, but for some reason any apex is love them not in the URL field"
    {code}
    JavaScript:Alert('test');
    {code}

  • How to migrate from Fireworks CS3 to a new computer laptop when the key to the series is lost?

    I'm migrating from Fireworks CS3 to a new computer laptop. I lost the serial key number so I can't install it again. Instead, I copied the program and export/import the relevant part of the registry. And also copied FLEXnet. However, the program comes the spirit the message "licensing for this product has stopped working". I used the ADOBE recovery tool, but nothing helped. Thanks for any ideas or help them.

    Products Adobe may not be transferred, they must be installed using installation files.  If you have an existing installation, then you might be able to get the serial number of this one.

    If it's a Windows machine, and then try running Belarc Advisor

    http://www.Belarc.com/free_download.html

    For a Mac, you can try:

    https://Mac-product-key-Finder.com/

  • OnLoad, execute a javascript script

    I need to execute a javascript script that will set the values to some drop-down lists and some textfields on page load. I can simply write that on a field, but I want to run it when loading PDF.

    You must use a script at the level of the doc, then.

    You can create one via Tools - JavaScript - Document JavaScripts.

    Here is a simple example of a script that sets the value of a text field:

    this.getField("Text1").value = "12345";

  • Launch the javascript from a plugin C++ function

    Hello

    I managed to run a javascript from my c code file ++ but I want to go directly to a specific function.

    I used IScriptUtils to get a result Oracle

    WideString scriptPath ("/ path/myscript.jsx ');

    ScriptFile (scriptPath) IdFichier ;

    InterfacePtr<IScriptRunner> scriptRunner (Utils<IScriptUtils> ()->QueryScriptRunner(scriptFile));

    if (scriptRunner)

    {

    ScriptRecordData arguments;

    ScriptID aID;

    ScriptData script (scriptFile);

    ScriptData resultData;

    PMString errorString;

    result = Utils<IScriptUtils> ()->DispatchScriptRunner(scriptRunner, script, arguments, errorString, resultDatakFalse);

    ...

    ScriptData:ScriptDataType aType = resultData. GetType();

    }

    I would like to know if someone has managed to launch a function javascript with arguments and a result.

    Kind regards

    David

    Simple solution: create another script that simply work calls for the second.

  • How to restore good export PDF from InDesign CS3 or CS5 in Snow Leopard?

    I had no problem to export to PDF from InDesign CS3 files (on a Mac Pro running Snow Leopard 10.6.4) until last weekend, when all the fonts appear bitmap or thin and rough, and the images lost color depth and contrast. When I copied the InDesign document to my MacBook Pro laptop, also running 10.6.4 the PDF has emerged with its original quality. Support calls Adobe referred me to the incompatibilities between Snow Leopard and InDesign documents. One of these documents was several pages long, but I could not print from the Adobe to my HP website all-in-one Officejet, because one-third of the document was hidden under a white board. This makes it impractical for the troubleshooting document, because I don't have enough screen real estate (even on a 23-inch screen) to let the open document and all the pages and dialogue boxes needed for reference. Back to the phone and chat support, I was told to upgrade my Creative Suite Premium CS3 to CS5 ($ 800!) and buy the updated Acrobat Pro ($200), with no guarantee that this cost of $1,000 would actually solve the problem. I downloaded the trial version of InDesign CS5, and it has NOT solved the problem. I am also afraid that the problem did not exist before last weekend. Before that, my CS3 and Snow Leopard combination worked very well. Then I checked the forums and was appalled by the variety of issues related to PDF files, for which there seems to be no general solution. Meanwhile, I have hundreds of ads, I'm supposed to be prepare and e-mailing as evidence PDF to businesses nationwide. I have two books of 120 with 256 pages to be submitted to printers in PDF format with all kinds of fonts and files image belonging to my clients. The last time I presented a paper on a printer by electronic mail, the work went perfectly. This time and the next, it is obvious, that I won't be able to send a PDF file to all! If this is the case, my activities related to the directories of 27 will be unable to absorb the expenditures necessary to start all over again with software and new computers, and I'll be out of business. Period. Yes - someone ' an at - it a way to solve this problem? Surely, I would be grateful.

    David Henderson

    There are a lot of things on the forum software and interface that could stand a little improvement...

    Smoothing is enabled for display in Acrobat?

  • Can I open a project from pc CS3 to CS5 on mac?

    Hello

    I tried searching the forums and the Googling this question but couldn't find the answer.  There, anyone know?

    Also, am I able to open a .prproj CS5 from a PC in CS5 Premiere Pro on a MAC?

    Thanks a lot for your help.

    Joe

    Can I open a project from pc CS3 to CS5 on mac?

    No doubt. Have you tried it? Don't forget to make a copy first, just in case.

    Also, am I able to open a .prproj CS5 from a PC in CS5 Premiere Pro on a MAC?

    Yes, with these caveats: cross-platform workflow

  • exporting files from indesign cs3 to cs6

    Hi, I changed my computer and the version of indesign cs6 repeat myself all the cs3 indd files that I try to open, they are damaged.

    the files are not damaged.on my old mac I can still open them easily, and the new computer's mac as well.

    Thanks for your help

    There is no export from CS3 to CS6 CS6 should be able to open it.

    But if it fails, yo may try to export as INX of CS3 and open it in CS6 and save as a new INDD. Attention, the INX file must be saved in the same location that the INDD file is registered to find his images related to the CS6.

  • Referencing files images, CSS, and Javascript from the system instead of workspace files repository

    Hello

    I am currently using Apex 4.2 and I want to know if you still have to import images, CSS and Javascript files, respectively, in a workspace (like the shared components) to use them in an Application? Alternatively, they could be referenced in a directory on the file system? I'm still not familiar with CSS or Javascript technology and I'm trying to find out as much as possible about how to use and where Apex can do. All comments gratefully received,

    Kind regards

    Kevin.

    Since you're using the EPG you will not be able to reference all files directly in your operating system.  You can load in XDB using FTP, WebDav or PL/SQL location.  The PL/SQL method is described in these posts:

    A random overview of Oracle: loading images in Oracle XDB

    Loading images custom when using EPG

    I don't know if there is any benefit from their download in XDB compared to the APEX workspace.  Guess it would make sense that you had a file that you wanted to be referenced by more than one workspace and do not want to download the file in each workspace.

  • Adobe Javascript from Excel VBA

    I have some have little experience with VBA Excel and Adobe Javascript separately, but I never tried to put it together. I'm quite baffled by the use of 'DoJavaScript' from in Excel VBA. I have a number of JavaScripts Illustrator that do various tasks (for the most part, measure and set properties on illustrator objects to determine geometric measures). I wanted to run these scripts from Excel VBA (they run smoothly when it is called directly in Illustrator). My hope was to spend some real numbers of VBA in the JavaScript code before we ran to set some performance parameters and get some real numbers back out the JavaScript in VBA. I can't get even the simple DoJavaScript given command in Adobe VBscript reference to run. Read other messages that seem somewhat related that it is unclear if I hurt something very simple, or if my understanding of the use of the DoJavaScript command is incorrect. Is anyone able to shed some light on this?

    My last try was this simple test... almost directly from the reference from Adobe:

    Private Sub SetScale_CommandButton1_Click()

    Set appRef = CreateObject ("Illustrator.Application")

    Set myNumberOfDocuments = appRef.DoJavaScript("documents.length;")

    MsgBox myNumberOfDocuments

    End Sub

    I really hope to be able to run javascripts that are a few hundred lines long..but, even if I can't get something simple to go so I'm about to give up on this.

    Thanks for your suggestions

    I got type mismatch error, to make your sample work, simply remove the "second".

    Private Sub SetScale_CommandButton1_Click()

    Set appRef = CreateObject ("Illustrator.Application")

    myNumberOfDocuments = appRef.DoJavaScript("documents.length;")

    MsgBox myNumberOfDocuments

    End Sub

  • Syntax error to execute a javaScript script

    Hi all

    I want to run a JavaScript using AppleScript script method.

    I first create a document to help

    say application "Adobe InDesign CS5.5.

    set myDocument to do document

    end say


    Now I run this script


    the value ScriptPath to alias "HD:private:var:root:Documents:Adobe Scripts: Source1.jsx.

    say application 'Adobe InDesign CS5.5'

    script ScriptPath language javascript

    end say

    But it gives error

    error "Adobe InDesign CS5.5 was an error: syntax error" number 8

    I also try:

    the value ScriptPath to alias "HD:private:var:root:Documents:Adobe Scripts: Source1.jsx.

    say application "Adobe InDesign CS5.5.

    set myDocument to do document

    script ScriptPath language javascript

    end say


    No compilation error

    The runtime gives the same error "Adobe InDesign CS5.5 was an error: syntax error" number 8

    If I create the document using this:


    say application "Adobe InDesign CS5.5.

    set myDocument to do document

    end say


    and run Source1.jsx using extend Script Toolkit CS5.5 then script executed successfully.

    My Java Script is:

    indesign #target

    myDocument var = app.activeDocument;

    with (myDocument.documentPreferences)

    {

    pageHeight = "11i";

    pageWidth = "8.5I";

    pagesRegard = false;

    pageOrientation = PageOrientation.portrait;

    pagesPerDocument = 1;

    }

    myLayer var = myDocument.layers.add ();

    myLayer.name = "myFirstLayer";

    myLayer.visible = true;

    var masterspread = myDocument.masterSpreads.add (1);

    masterspread.baseName = "NewMasterPage";

    masterspread. Select (1919250519);

    var myTextFrame = masterspread.textFrames.add (myDocument.layers.item ("myFirstLayer"));

    myTextFrame.geometricBounds = ["6 p", "p 25", "30 p", "30 p"];

    myTextFrame.contents = 'Spread Master';

    I don't understand where is syntax error.

    say application "Adobe InDesign CS5.5.

    script alias "HD:private:var:root:Documents:Adobe Scripts: Source1.jsx" javascript language

    --> error 'Syntax error' number 8

    Result:

    error "Adobe InDesign CS5.5 was an error: syntax error" number 8



    Thank you.




    have you tried to flee the estk javascript? or debug?

    and... Why the hell you mix the applescript a javascript like that?

    var myTextFrame = masterspread.textFrames.add (myLayer);

  • During the "offering" an image from Photoshop CS3

    When I "place" an image from Adobe Photoshop into a document in InDesign CS5 it's blurry. The picture is not blurred in Photoshop. Why this might be happening? Appreciate any help! I also tried to put the same picture in InDesign CS2 and it is blurred. Must the version of Photoshop (CS3) be identical to the version of InDesign (CS5)? Thank you!

    View > display performance > high quality display

  • How to execute a JavaScript script associated with interactive field?

    I need to perform a virtual a plugin click. Say a set of 3 button to check/radio fields have the value of exports:

    -Yes


    -No.


    -Maybe

    I have a script which indicates that was clicked almost the button of "Maybe". All I have to do is find which radio buttons:

    radioButton #0

    radioButton #1

    radioButton #2

    contains the export value of "Maybe". So far, this task is very doable. My question is how to do the following:

    I need to call the JavaScript Shell and run it, using as argument the code JavaScript associated with the top of the button mouse.

    Any help will be most appreciated...

    TIA,

    -Ramon

    IF you try to do it from a plugin - I would use just Cos API to obtain the appropriate JS of the action of the field dictionary and then pass it to AFExecuteThisScript().

  • Problems with Javascript &amp; amp; DW CS3?

    Hi guys, here this situation:

    I created an HTML element that contains a form (with a PHP POST action), ok, my code works very well on several websites, but when I used it in this case... There was a message: "method not implemented". I looked at everything, and I was able to detect that it is because my HTML code contains a file embedded SWF Flash simple at the end which works well, but is also an obstacle for the file PHP Action, which contains a small rutin (in javascript) to return to the page after sending the mail.

    If I did not explain myself clearly, I will draw a little diagram:


    (1) HTML (the user fills out the contact form)
    (2) using the POST method, he calls my PHP file and sends the email
    (3) after a PHP file sends the e-mail, must return to the previous page of HTML through a code of smmal of Javascript inside

    BUT... Here's the problem: he sends the customer mail with information, but then instead of redirect, it displays the error code "method not implemented"...


    I tried to temporarily remove the SWF embedded in the HTML code and... works great! It sends the email and redirects... so there is a problem, but don't know how to fix... I look back on DW8 and try. but before, I would like to know if there is no solution for DW CS3... there at - it?

    I would appreciate your answer, thanks in advance,


    Never mind!!! I detected the problem and fixed it. of the check and delete useless stats to the field HEAD declaring old routines Javascripts...

    Anyway thanks,

  • Is it possible to block the execution of Javascript from an IP address?

    In accordance with article http://tech.firstpost.com/news-analysis/more-trouble-for-airtel-injects-javascript-code-to-monitor-data-usage-activist-receives-notice-270111.html, my broadband provider is inserting javascript in web pages browsed by me. I would like to block the download and execution of Javascript to this IP address. is it possible to do?

    Have you tried the YesScript extension? It can block scripts by IP (or domain name).

    1. Add YesScript in Firefox.
    2 Add-ons Manager open (Ctrl + Shift + A)
    3. click on Extensions
    4. click the button Options of YesScript
    5. Add the IP address

Maybe you are looking for

  • Toshiba Tecra S3 - new SSD stuck on JBOD, cannot install windows on it

    I just got myself a Kingston V series 64 GB SSD drive, but I can't it is detected by windows installation programs.After looking around, I found that the Tecra S3 drives must be "1RAID 0" and not JBOD to activate windows tobe installed on it. (unless

  • L420 SATA III 600 MB/s

    Hello guys-Lenovo I plan to install an SSD in my Lenovo laptop, L420. But I don't know if the SATA port will support SATA 3 (600 MB/s), if it only supports SATA 2, I think think I would consider buying a new laptop. Another quistion: is it possible t

  • Media Player will not bar restore tasks

    My media player don't restore or optimize off the coast of the taskbar. He plays music or videos in a small box out of the taskbar, but will not restore on the screen of the monitor. I tried to run the exe to install in the folder program files & I g

  • Dell 942 printer after moving to windows 8?

    I had to switch from Win XP to Windows 8.1. I have a dell 942 all-in-one printer. I can get the scanner part of work with Windows 8, but not from the side of impression. Any person having brilliant ideas that I can not afford a new printer for the mo

  • How can I view the status icon on the taskbar battery charge?

    Is someone can you please tell me how I can show the status icon on the taskbar battery charge? I can't find anywhere. [Original title: DadV_court]