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);

Tags: InDesign

Similar Questions

  • 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";

  • Error in executing the PowerCLI script change IOPS / s

    M community you want to run the script below, however when run got the following error in the result.

    Please could you help me?

    # SCRIPT TO #.

    $hostesxi = get-Content - Path "C:\Users\vsilva\Desktop\hostsinfo.csv".

    $DiskID = get-Content - Path "C:\Users\vsilva\Desktop\diskiops.csv".

    SE connect-VIServer-Server $hostesxi - user "myuser" - password "MonMotpasse".

    # $esxcli.system.hostname.get () #.

    $esxcli = get-EsxCli - VMHost $hostesxi

    $esxcli.storage.nmp.device.list () | where {$_.} Device-match $DiskID} | $esxcli.storage.nmp.psp.roundrobin.deviceconfig.set % (0, $null, $_.) Device, 1, "OPS", 0)

    ------------------------------------------------------------------------------------------------------

    # OUT #BUG #.

    Could not find an overload for the 'set' and the number of arguments: "6".

    C:\Users\vsilva\Desktop\changeiops.ps1:9 char: 1

    + $esxcli.storage.nmp.device.list () | where {$_.} Device-match $DiskID} | % $esxcli. ...

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo: NotSpecified: (:)) [], MethodException)

    + FullyQualifiedErrorId: MethodCountCouldNotFindBest

    Thank you all,.

    More could solve my problem in a way report, for me this exellent, must be attached to the completed manuscript shares with the community.

    Good bye.

  • 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().

  • Error when executing a CMD script

    I am trying to run a CMD script using the starctscen command.

    When I use the below command
    GLOBAL EXT_DATA 002 E:\OraHome_ODI\oracledi\bin\startscen

    It runs properly
    but I tried to create a sceduler for execution I used below command


    C:\Documents and Settings\Desktop > 'E:\OraHome_ODI\oracledi\bin\startscen.bat' EXT_DATA 002 GLOBAL

    and it gives me the following error

    The system does not have the specified path.
    OracleDI: From scenario EXT_DATA 002 context...
    'oracle.odi.Agent' is not recognized as an internal or external command
    operable program or batch file.

    can someone help me on this.

    Thank you
    Sri

    In the batch file write this way

    cd E:\OraHome_ODI\oracledi\bin
    E:
    startscen EXT_DATA 002 GLOBAL 
    

    In the case you provide (EXT_DATA 002 GLOBAL) values as a parameter
    then call the startscen in this way

    
    cd E:\OraHome_ODI\oracledi\bin
    E:
    startscen %1 %2 %3 
    
  • excessive Javascript syntax error notification

    The new parser of Javascript in CS4 puts a yellow bar at the top of the Code view that says "there is an error of syntax in line [line number]. Indicators of code may not work until correct you this error. »

    The problem is, it does not include when the 'syntax error' occurred because I am not finished simply type a line yet. for example if I type "var x =" and then put in pause for half a second (for example to think about should I put x in), I get this notification. "»

    What can be done to fix this?

    eliot1785 wrote:
    > Of course, but the real problem is that the yellow bar all pushes down. So, basically, the code bouncing up and down as I type - pretty boring.

    In the toolbar of Code, there is a button "syntax error alerts in Info Bar" roughly in the middle of the tool bar. Click it and the yellow bar should stop appearing.

    --
    Danilo Micen
    | http://blog.Extensioneering.com/
    | Extensioneer WebAssist
    | Adobe Community Expert

  • How to execute a Perl Script in ODI and Catch error

    Hi all

    Someone knows how to execute a Perl script in a package? And also how capture/error log when occurs?
    Gladly appreciate your answers.

    Thank you
    Randy

    Published by: [email protected] on March 12, 2009 12:29 AM

    Hi Randy,

    Use the OS command to achieve this. In your package add command OS and in the command line, specify the path of your perl script.

    PS: Make sure that your agent may be able to access this location/path specified.

    Thank you
    G

  • Error while executing script root.sh on the nodes at the RAC 11 g installation

    Hello friends,

    Here, I face an error while I run the root.sh script. During the installation of grid RAC, he asked a few dependencies of prereq. There are several .rpm files that were the prerequisites for this installation. I ignore them and I continued the installation. Now, he finally threw an error when running root.sh script. I tried to install several .rpms acquisition of information from the internet, but always this script does not work here.

    Please, suggest what should I do at this point.

    stuck.png

    You guys could help me out here, how I need to go further.

    Simple google search will give you missing RPM. try to install and see if that solves the problem

    https://gruffdba.WordPress.com/2012/11/06/11gr2-grid-install-clscfg-bin-error-while-loading-shared-libraries-libcap-so-1-cannot-open-shared-object-file/

    Don't forget, you need up-to-date existing deconfig install and run root.sh as mentioned below article

    https://desaitaral.WordPress.com/2011/06/13/Oracle-Linux-6-1-and-libcap-so-1-cannot-open-shared-object/

    Another article with the same question - https://taliphakanozturken.wordpress.com/2013/03/02/clscfg-bin-error-while-loading-shared-libraries-libcap-so-1-cannot-open-shared-object-file/

  • JavaScript prevention animation [relevant braces] syntax error

    I have created a Web page in the Animate, and everything was fine until the animation to stop working.  I even had the code of the page toward the Center, and simply falls apart.  I took a look at the code and noticed:

    On line 132 syntax error: Mismatched braces.

    What is 132 online:

    (}) (jQuery, AdobeEdge, "EDGE-16966832");

    Nothing on this line has never changed, and this is put in by Animate, not me.  Anyone familiar with this error before?

    Same thing in another section, step:

    Syntax error on line 101 on 'Scene' 'relevant braces.

    It is what is in line 101:

    });

    The thing is, it's the same code written on the other animated files.  I looked to compare, and that's all the same.  So what causes the error here?

    Thank you

    Hey, Greg.

    I send you a link to the file I've corrected, but here is what happened: one of your event symbol definitions had moved in the previous line, which is a comment.  This means that your straps align when Animate read the file.  I went ahead and fixed it for you.

    Thank you

    -Elaine

  • Free ghettoVCB.sh u3 ESXi 4.1: line 836: syntax error: bad substitution

    I can't ghettoVCB.sh to run on free ESXi v4.1.

    Copied the .sh and .conf files in/ghettoVCB-master.  When I get home. /ghettoVCB.sh I get:

    ghettoVCB.sh: line 836: syntax error: bad substitution

    If I try/bin/ash ghettoVCB.sh I get exactly the same thing.

    The execute bit is set:

    / ghettoVCB-Master # ls-l

    -rw - 1 root root 1140 15:37 README.md Nov 6

    -rwx - x - x 1 root root 17555 6 Nov 15:37 ghettoVCB - restore.sh

    -rw - 1 root root 747 6 Nov 15:43 ghettoVCB.conf

    -rwx - x - x 1 root root 64593 6 Nov 16:23 ghettoVCB.sh

    -rw - r - r - 1 root root 11 Nov 6 15:39 vms_to_backup

    I do not see a log ghettoVCB file in / tmp.

    How can I solve this please?

    In case someone else gets the same problem - I finally worked it out.  ESXi 4.1 update 3 do not have the latest version of ghettoVCB.sh.  I guess the version of bash in the console busybox is old and does not support the syntax of some of the improvements made to the script.

    I managed to get an older version of the MKSbackup script and it works fine.

  • Why I'm getting a syntax error on the < / head > line in DW CC?

    I get a syntax error in DW CC.  Other threads have indicated it was a bug in CS6, but was set in CC.  This leads me to believe it's my fault, but I can't understand it.  Can anyone help based on the information that I've pasted below?  Thank you!

    <! doctype html >

    <!-[if lt IE 7] > < class = "oldie ie6" html > <! [endif]-->

    <!-[if IE 7] > < class = "ie7 oldie" html > <! [endif]-->

    <!-[if IE 8] > < class = "ie8 oldie" html > <! [endif]-->

    <!-[if gt IE 8] > <!-->

    < class html = "" >

    <!-<! [endif]-->

    < head >

    < meta charset = "utf-8" >

    < meta name = "viewport" content = "width = device-width, original scale = 1" >

    < title > Untitled Document < /title >

    < link href = "boilerplate.css" rel = "stylesheet" type = "text/css" > "

    < link href = "style.css" rel = "stylesheet" type = "text/css" > "

    "< link href="jQueryAssets/jquery.ui.core.min.css "rel ="stylesheet"type =" text/css">

    "< link href="jQueryAssets/jquery.ui.theme.min.css "rel ="stylesheet"type =" text/css">

    "< link href="jQueryAssets/jquery.ui.accordion.min.css "rel ="stylesheet"type =" text/css">

    "< link href="jQueryAssets/jquery.ui.tabs.min.css "rel ="stylesheet"type =" text/css">

    <!--

    To learn more about the conditional comments around the HTML at the top of the file:

    paulirish.com/2008/conditional-stylesheets-vs-CSS-hacks-answer-neither/

    Follow these steps if you are using your customized version of modernizr (http://www.modernizr.com/):

    * Insert the link to your js here

    * remove the link below for the html5shiv

    * Add the class "No. - js' to the above html tags

    * You can also remove the link to respond.min.js if you included in your version of modernizr Polyfill MQ

    ->

    <!-[if lt IE 9] >

    "< script src="//html5shiv.googlecode.com/svn/trunk/html5.js "> < / script >

    <! [endif]-->

    < script src = "respond.min.js" > < / script >

    "< script src="jQueryAssets/jquery-1.8.3.min.js "type =" text/javascript"> < / script >

    "< script src="jQueryAssets/jquery-ui-1.9.2.accordion.custom.min.js "type =" text/javascript"> < / script >

    "< script src="jQueryAssets/jquery-ui-1.9.2.tabs.custom.min.js "type =" text/javascript"> < / script >

    <!-the following script tag downloads a font of Adobe Edge Web server fonts to use in the web page. "We recommend that you do not modify it.--> < script > var __adobewebfontsappname__ = 'dreamweaver' < /script > < script src ="http://use.edgefonts.net/adamina:n4:default.js"type =" text/javascript"> < / script > "

    < / head >

    < body >

    < div class = "gridContainer clearfix" >

    < div id = "div1" class 'fluid' = >

    < header id = "header" class 'fluid' = >

    "< p > < img src="Images/Logos/insidejoplinlogo.png "alt =" "/ > < / p >

    "< nav id 'mainnav' class = 'fluid' = > < ul class = 'fluid fluidList mainnavlist' > < class li = 'fluid mainnavitem zeroMargin_desktop' > < a href =" Index2.html"title ="inside Joplin Home"target ="_self"> home < /a > < /li > < li = class 'fluid mainnavitem' > < a href =" news.html "> news < /a > < /li > < li = class 'fluid mainnavitem' > < a href ="entertainment.html"> entertainment < /a > < /li > < class Li = 'fluid mainnavitem' > < a href = "announcements.html" > ads < /a > < /li > < li = class 'fluid mainnavitem hide_mobile' > < a href = "galleries.html" > galleries < /a > < /li > < li = class 'fluid mainnavitem hide_mobile' > < a href = "aboutcontact.html" > contact < /a > < /li > < /ul > < / nav > ""

    < / header >

    < section id = "indexguts" class = "fluid" > < article id = "indexarticle" class 'fluid' = >

    < h4 class = "articleH4 fluid zeroMargin_mobile" > news < / h4 >

    < p > < / p >

    < div id = "Accordion1" >

    < h3 > < a href = "#" > Section 1 < /a > < / h3 >

    < div >

    < p > content 1 < /p >

    < / div >

    < h3 > < a href = "#" > Section 2 < /a > < / h3 >

    < div >

    < p > content 2 < /p >

    < / div >

    < h3 > < a href = "#" > Section 3 < /a > < / h3 >

    < div >

    < p > content 3 < /p >

    < / div >

    < / div >

    < / section > < section id = "1" class article 'fluid' = >

    < h4 class = "articleH4 fluid zeroMargin_mobile" > last entertainment < / h4 >

    < p > < / p >

    < div id = "Accordion2" >

    < h3 > < a href = "#" > Section 1 < /a > < / h3 >

    < div >

    < p > content 1 < /p >

    < / div >

    < h3 > < a href = "#" > Section 2 < /a > < / h3 >

    < div >

    < p > content 2 < /p >

    < / div >

    < h3 > < a href = "#" > Section 3 < /a > < / h3 >

    < div >

    < p > content 3 < /p >

    < / div >

    < / div >

    < / section > < article id = "2" class 'fluid' = > < h4 class = "articleH4 fluid zeroMargin_mobile" > latest ads < / h4 >

    < p > < / p >

    < div id = "Tabs1" >

    < ul >

    < li > < a href = "#tabs - 1" > obituaries < /a > < /li >

    < li > < a href = "#tabs - 2" > weddings < /a > < /li >

    < li > < a href = "#tabs - 3" > more < /a > < /li >

    < /ul >

    < div id = "tabs-1" >

    < p > content 1 < /p >

    < / div >

    < div id = "tabs-2" >

    < p > content 2 < /p >

    < / div >

    < div id = "tabs-3" >

    < p > content 3 < /p >

    < / div >

    < / div >

    < / article > < article id = "indexbotleft" class 'fluid' = > This is the content of Article layout tag "indexbotleft" < / article > < article id = 'article 3' class = 'fluid' > This is layout Article content tag "indexbotleft" < / article > < / article > < id side = "mainsidebar" class 'fluid' = > This is the content for Tag Layout side "mainsidebar" < / side > < id side = "mainsidebar2" class 'fluid' = > This is the content for Tag Layout side "mainsidebar2" < / side > < article id = "indexbotrot" class 'fluid' = > This is the content of Article layout tag "indexbotrot" < / section >

    < footer id = "footer" class 'fluid' = >

    < nav id = "footernav' class 'fluid' = >

    < ul id = "footernavlist" class = 'fluid fluidList' > < class li = 'fluid footernavlistitem zeroMargin_mobile' > < a href = "Index2.html" > home < /a > < /li > < li = class "fluid footernavlistitem hide_mobile" > < a href = "news.html" > News < /a > < /li > "

    < class li = "fluid footernavlistitem hide_mobile" > < a href = "entertainment.html" > entertainment < /a > < /li > ""

    < class li = "fluid footernavlistitem hide_mobile" > < a href = "announcements.html" > ads < /a > < /li > ""

    < class li = "fluid footernavlistitem zeroMargin_desktop zeroMargin_mobile" > < a href = "galleries.html" > galleries < /a > < /li > ""

    < class li = "fluid footernavlistitem zeroMargin_mobile" > < a href = "aboutcontact.html" > About Us < /a > < /li > ""

    < class li = "fluid footernavlistitem zeroMargin_mobile" > < a href = "mailto: " [email protected] "> email < /a > < /li > < class li = 'fluid footernavlistitem zeroMargin_mobile' > < a href ="www.facebook.com/insidejoplin"target ="new"> < /a > < /li > < /ul > Facebook .

    < / nav >

    "< article id ="footerarticle"class ="fluid"> < img src="Images/Logos/insidejoplinlogo.png "alt =" "/ > < / section >

    < / footer >

    < / div >

    < / div >

    +

    < script type = "text/javascript" >

    {$(function()}

    . $(«#Accordion1») accordion();

    });

    {$(function()}

    . $(«#Accordion2») accordion();

    });

    {$(function()}

    . Tabs() $(«#Tabs1»);

    });

    < /script >

    < / body >

    < / html >

    Hmm, nothing does highlight for me, but I'm on an older version of DW, maybe it's less picky.

    What happens if you ad a semicolon immediately before the tag in this line...

  • How to call a JavaScript script in Photoshop?

    Hello

    I created 3 simple scripts (convert PS Actions JavaScript) as a test: Script1.jsx, Script2.jsx, Script3.jsx

    How I would go about creating an another JavaScript that executes these three JavaScript consecutively (whereas in photoshop)
    .. I can create a simple Action of PS to open three scripts (that works)... but when I convert this back to a Javascript script, I get an error.

    My goal is that the possibility of creating a JavaScript code that can call the three scripts.

    Download
    call Script1.jsx
    call Script2.jsx
    call Script3.jsx

    Is this possible?

    Thanks for any help

    The f

    Change SCRIPTS_FOLDER for: -.

    var SCRIPTS_FOLDER = "/ z/ANIMATION/Max_Renders/FaceLevels/ActionsScripts";

  • About applescript syntax error

    Code:

    my itermExec1()

    on itermExec1()

    say application iTerm2

    Set newWindow to (create the window with the default 'yeongjun' value)

    end say

    end itermExec1

    It is this script run the ' iterm 2'. (reference. ( https://iterm2.com/applescript.html)

    Why is syntax error? Please

    Thank you

    I can't read the error, but you left on the keyword 'profile '.

  • DB connectivity Kit: syntax error in a SELECTION of data from joined tables

    Hello everyone

    I'm putting in labview a SQL query on joined tables.

    As an example I take a database to store the data of basketball 2on2 matches, which tables are

    corresponds to (matchId, Thomas, teamB)

    teams (teamId,PlayerAname, PlayerBname, nationality)

    nationalities (NatId, natName)

    To get an array of result with the game as well as the names of player as well as their nationality, I use this query on MySQL (which works on command line interface)

    SELECT MatchID,
    T1. PlayerAName, t1. PlayerBName, n1.natName,
    T2. PlayerAName, t2. PlayerBName, n2.natName
    MATCHES m
    INNER JOIN teams t1 ON t1.teamID = m.teamA
    INNER JOIN teams t2 ON t2.teamID = m.teamB
    INNER JOIN nationalities L1 ON n1.natID = t1.nationality
    INNER JOIN nationalities n2 ON n2.natID = t2.nationality

    When I put it in labview, using the block 'select data', I get a syntax error as shown in the attached screenshot.

    Am I something mistanking using the JOIN examples statements or aliases?

    Thanks in advance!

    The select VI is designed to be a simple way to select from a table. I doubt that he can do joins (and would not certainly need the 'FROM', even if it can). What you can do instead calls the query execute VI and give him the complete SQL query. I don't remember if it returns the data in the recordset object, so you must do so separately.

  • Please help improve the JavaScript script

    Please help improve the JavaScript scriptA.JPG

    Hello

    to increase or decrease the height of a subform, you use the following syntax in the click of + and - button

    cmdAdd::JavaScript

    _Row1.addInstance (1);

    var b is parseFloat (Subform3.h) - 6.5;.

    If (b<>

    b = 0;

    }

    Subform3.h = b + "mm";

    cmdRemove::JavaScript

    If (_Row1.count > 1) {}

    var b is parseFloat (Subform3.h) + 6.5.;

    Subform3.h = b + "mm";

    _Row1.removeInstance (this.parent.index);

    }

    This should do the trick, I hope this will help you

Maybe you are looking for

  • Background color of bookmarks

    I got the stylish Addon for FF and managed on the base to get the color to the bars, I like but the current bookmark menu back color I can't change the background and the color of the gray menu bar is only correct color of #333333 when it blurry I mu

  • Want 5530: Mind of its own!

    When I try to print labels under my laptop the printer ejects the labels and prints on the next piece of plain paper. If I use the printed page and copy to labels it works. HP says that it is because the printer does not recognize the paper. If this

  • SetMenuBarAttribute

    Hello I want to be visible under the United Nations as part of a. I used SetMenuBarAttribute. The question, what do I put as 1st and second listen: the menu bar or the parent point? Kind regards.

  • New computer down wireless

    Hi, just bought an acer computer after that I killed my laptop sitting on it.  He keeps visitor drop wireless.  We're back to zero, but happened every 2-5 minutes, making it unusable.  is not as check broadband I bought my neighbouring suburb to see

  • Problem with to demote a domain controller

    Hi all I tried today demote a domain controller, but my domain environment is still need of this domain controller to work. I have windows Server 2003 Small Business DC as DC1 & lately I added windows Server 2008 R2 DC as DC2 in the new box as an add