Cross script communication

Hi- Im writing a plug in, that I want people to be able to call via script.  Some parts of the plug in are actually scripts themselves, and I wanted to allow the client scripter to call functions inside our scripts.  How do I do this?
I found this snippit in the InDesign Scripting Guide (PDF):
#engine library
export random, libVersion;
const libVersion = "Library 1.0"; function random (max) {
return Math.floor (Math.random() * max);
But the ESTK just says that im using export incorrectly (of course this is copy and paste from the PDF).  How do I mark a function as exportable, or how do i call a function betwen scripts of different engines?
Thanks!

I am going to go ahead and guess that this is not possible, since I can't find anything about it anywhere online.  I understand that other people cou
ld write a script in the same engine, but that there seems to be no cross engine support.

Similar Messages

  • Prevent cross-scripting from the same domain

    Hello,
    i have 2 swf files, example1.swf and example2.swf, both on
    the same domain.
    I load example2 in a Loader control (Flex) from example1.
    I want to prevent example2 from accessing (cross-scripting
    actionscript) example1. It seems that it can't be done because both
    files are on the same domain.
    I can't solve this problem by moving example2 to another
    domain and then use Security.allowDomain, because i don't have
    access to the source of example2 : and i have to be able to access
    example2 from example1, but have to deny access to example1 from
    example2 (always talking about cross scripting here).
    Any ideas on this?
    I looked at LoaderContext without any success.
    To sum it up: i want to load example2 inside example1, allow
    scripting from example1->example2 and deny scripting from
    example2->example1. All this using a Loader control in Flex.
    tnx,
    Gregor

    Hello,
    i have 2 swf files, example1.swf and example2.swf, both on
    the same domain.
    I load example2 in a Loader control (Flex) from example1.
    I want to prevent example2 from accessing (cross-scripting
    actionscript) example1. It seems that it can't be done because both
    files are on the same domain.
    I can't solve this problem by moving example2 to another
    domain and then use Security.allowDomain, because i don't have
    access to the source of example2 : and i have to be able to access
    example2 from example1, but have to deny access to example1 from
    example2 (always talking about cross scripting here).
    Any ideas on this?
    I looked at LoaderContext without any success.
    To sum it up: i want to load example2 inside example1, allow
    scripting from example1->example2 and deny scripting from
    example2->example1. All this using a Loader control in Flex.
    tnx,
    Gregor

  • Jscript cross scripting with BSP's

    Hi BSP consultants,
    I have one BSP embedded in another BSP (actually done using the SEM Web Interface Builder which is a front end for building BSP's in SAP SEM).
    All I want to do is access the HTML code in the embedded BSP from the parent web page (BSP), but I keep getting a 'permission denied' error.
    I understand it to be linked to cross 'iframe' scripting security type error, but both BSP are on the same domain, and all my research indicates that as long as they are on the same domain then you should be able to use javascript to access the HTML code inside the iframe (child BSP).
    Parent BSP url:
    http://ldndsmsa64.intranet.barcapint.com:1080/sap(bD1lbiZjPTk1MCZkPW1pbiZ3PTU2MjAwMDAr)/bc/bsp/sap/zvalidation/zvalidation.htm?bps-design_messages=X
    Child BSP url:
    http://ldndsmsa64.intranet.barcapint.com:1080/sap/bc/bsp/sap/z_bps_comments/list.htm?area=ZBA00001&plevel=TEST4&package=COMMENT&view=CONTENT&showtitle=YES&showselection=YES&showproperties=YES
    Any pointers would be greatly appreciated.
    Thanks,
    Rael Bethlehem

    Hi Durairaj,
    While I wait for my IT team to help me access the internet browser settings to set the 'trusted sites' option(browser security is greyed out for me), I thought maybe you could confirm that my javascript code I am using is correctly going to call the contents of an embedded iframe (embedded BSP)...:
    function showcontentofBSP (){
    //fetch all the tables and cells inside of the 'iframe'
    var table = window.myFrame.document.getElementsByTagName("table");
    for (i= 0; i < table.length; i++){
    var tableitem = table.item(i);
    var cells =tableitem.getElementsByTagName("td");
    var tableid = tableitem.id;
    alert(tableid);
    Thanks,
    Rael

  • Nexus 1000v / pvlan promiscuous trunk / Cross-host communication.

    Hello,
    We are planning the deployment of Nexus 1000v with “promiscuous trunk” uplink ports. We want to be sure cross-host in isolated pvlan will not be possible .
    Looking at the picture, I was wondering if the communication between VM-A on ESX1 and VM-B on ESX 2 (both on isolated pvlan) will be impossible as expected.
    Example: If VM-A on ESX 1 tries to send traffic to VM-B on ESX-2, the vlan 11 tag is remapped to vlan 10 tag at the outgoing uplink on ESX 1.
    Then the flow arrives on ESX 2 with vlan 10 tag on the promiscuous trunk. I understand the promiscuous port can talk to all secondary pvlans, so VM-A can in this case talk with VM-B.
    Is my understanding correct ?
    Or does the Nexus 1000v have an enhanced cross-VEM mechanism which allow to check the source mac address and know that it comes from pan isolated pvlan and as a result cannot communicate.
    Best regards.
    Karim  

    Hello Karim,
    N1k enforces pVLANs across all hosts.  Think of all the N1k VEMs as a single switch.  In your example, VM-A will not be able to talk with VM-B.  We accomplish this isolation by poisoning VEM mac address tables with a null destination.  For example, ESX1 would contain a dynamic entry for VM-B that points to a null LTL value.  If VM-A attempted to send traffic to VM-B's mac, it would not leave the host.
    Please be aware that N1k can only enforce pVLANs for traffic behind the VEMs.  If you have other servers in VLAN 10 on the blue switch, it would be seen as a promiscuous port from N1k standpoint.  Additional configuration would be required to prevent communication.

  • Inter-script communication and script cloning

    How does a calling script pass information about itself to a script it calls via a tell statement? I'd want to pass the name and path of the calling script's application file, among other things. The called script would then talk back to the calling script, and so forth. Must this be done explicitly by, say, having the called script invoke a script object in the calling script, or can information about the calling script be passed by the call itself?
    Also, how would one get a script application to clone a copy of itself? Would having the Finder just make a copy of the application file from within the script itself work?
    Thanks for any insights.

    I saved the following as an application and ran it as an application (outside the Script Editor!) and it 'cloned' itself as expected.
    click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">tell application "Finder" to duplicate (path to me)</pre>Another interesting feature of script objects, however, is that you don't need to duplicate scripts with the Finder to get multiple script objects. The preferred method is to load the same script into multiple variables of the calling script, and then assign different properties to each new instance of the called script.
    You can even do this with scripts that you define within the calling script itself, or with particular handlers or scripts defined in other files. I've rarely needed to go that far in my own scripting adventures, but I've done it before. More frequently I just use the much simpler run script command to pass parameters and return results from a called script file. See this thread for info on that:
    http://discussions.apple.com/message.jspa?messageID=1163768

  • Cross-scripting from Extendscript to JSFL

    Details here:
    http://ajarproductions.com/blog/2008/12/14/easy-and-readable-extendscript-to-jsfl-workflow /
    Here's a script that I created using that technique:
    http://ajarproductions.com/blog/2008/12/05/send-colors-from-indesign-and-illustrator-to-fl ash/

    Details here:
    http://ajarproductions.com/blog/2008/12/14/easy-and-readable-extendscript-to-jsfl-workflow /
    Here's a script that I created using that technique:
    http://ajarproductions.com/blog/2008/12/05/send-colors-from-indesign-and-illustrator-to-fl ash/

  • Java and java script communication

    how to access a javasript string variable in java

    If you are trying to access it from an applet you can do the following:
    // call the html page
    JSObject win = JSObject.getWindow(this);
    JSObject doc = (JSObject) win.getMember("document");
    JSObject loc = (JSObject) doc.getMember("location");     
    String s = (String) loc.getMember("href");
    String stringArg = "status from init()";     
    win.setMember("status",stringArg);     
    Here win is the JSObject that gets the html page
    stringArg is the object value that will be placed into the javascript var.
    win.setMember sets the javascript var 'status' with the value placed in stringArg.
    You will need to import
    import netscape.javascript.*;
    also
    Mark

  • Cross component communication

    Hi, I have two components in my application. One contains a
    repeater and a button. When the button is pressed it calls a
    function in an actionscript file that throws an alert and fills the
    repeater.
    The second component just has a tree control. When I click a
    node in the tree it calls the same function in the actionscript
    file which throws the alert correctly but does not fill my
    repeater. My repeater is bound to [bindable] XMLListCollection
    declared in the actionscript file. Do I need to make reference to
    'this' to make the objects bindable when click is initiated form
    another component. Examples would be great.
    Ken

    Got this sorted by using:
    Application.application.myComponent2.myFillRepeaterFunc();
    My function in component2 was previously being called but not
    from the same scope as if a click was initiated from component2.
    When component1 called the function directly the repeater did not
    bind but using the Application.application object it worked a
    treat.

  • Cross component communication query

    Hi All,
    The scenario is in SAP SRM system.
    I am trying to access the Contract number attribute (V_CTR_H_BD.HEADER_BD.OBJECT_ID) from the webdynpro component /SAPSRM/WDC_CTR_DODC_H_BD.
    I want that attribute to be accessed in the WD component /SAPSRM/WDC_DODC_CND view V_DODC_CONDITION.
    So, in order to achieve the above requirement, I tried to add a node as an Interface Node in the webdynpro component /SAPSRM/WDC_CTR_DODC_H_BD. But, I am unable to create any node in the component controller of WD component /SAPSRM/WDC_CTR_DODC_H_BD as a Interface Node, and hence, I am unable to create any node of Interface Controller. This is due to the reason that the node that we are creating have the Interface Node option in disable state.
    Can anybody suggest what approach we need to follow to satisfy the above requirement? (It would be great if the resolution will be containing the steps)
    Regards,
    Susanta

    In that case declare an attrubute of  OBJECT_ID  type in your component at component controller level. Lets call is m_cc_objID. Declare a method at component controller ReadObjID  call this method inside WDDOMODIFY of the view V_CTR_H_BD  and in code specify that it copies value of OBJECT_ID to our attribute m_cc_objID.
    now follow the steps from my previous reply
    Create a INTERFACE method in the component controller of the component /SAPSRM/WDC_CTR_DODC_H_BD, lets
    call it GetContractAttribute. This method will return contract number. Dont forget to tick the Check Box
    Inteface when creating this method, this tells you that this method is interface method and can
    be called from outside.
    next in the component /SAPSRM/WDC_DODC_CND instantiate /SAPSRM/WDC_CTR_DODC_H_BD under component usage. Now you can
    call the method GetContractAttribute.
    Greetings
    Prashant

  • DOM Based Cross-Site Scripting issue in RoboHelp 10

    We're using a WebHelp system originally deplyed using RoboHelp 9.0.2.271, and a recent security scan revealed the DOM based cross-site scripting issue.
    I recently upgraded to RoboHelp 10, migrated my help system to this version, and redeployed the system, but our security scan is still detecting the cross-scripting vulnerability in WebHelp. Wasn't this issue resolved in RoboHelp 10?
    Thanks

    Hi,
    I’m not a security expert, but this script reads the URL of the current topic and redirects to the current topic with a bookmark. This is needed for when the same topic is used in multiple locations in the TOC.
    I’ll ask around about this security issue.
    Greet,
    Willam

  • Which hotfix corrects cross-site scripting vulnerability?

    Our security-auditing scanning service is failing to certify
    our ColdFusion 7.02 servers, saying that there's a cross-site
    scripting vulnerability, even though we've installed the most
    recent hotfixes relating to cross-site scripting.
    The specific vulnerabilities we're being told exist are
    described here:
    http://nvd.nist.gov/nvd.cfm?cvename=CVE-2007-0817
    and
    http://www.securityfocus.com/archive/1/459178/30/0/threaded
    Exactly what hotfixes or patches are needed to correct this?
    Or is this known to be a false positive in these tests?
    Thanks.

    I think is time for you to upgrade to ColdFusion 8, it has a
    new variable in the cfapplication tag that will activate cross
    scripting attack protection.
    Dario

  • New Network Infrastructure Design and Architecture Community

    All,
    I'm pleased to announce our new Network Infrastructure Design and Architecture Community.  In this community we encourage everyone to share their knowledge and start conversations on design and overall network topology. All topics are welcome, including requirements and constraints of the network, tools and techniques, issues of hierarchy, leading practices, services, build strategies, architectures and solutions to solve business problems.        
    Who will be the first to make it on that leaderboard?
    Cheers,
    Dan     

    Mike,
    Thanks for the kind words about the community.  It's always nice to hear the things we do make a difference. 
    Launching a scripting community has come up a few times in the past and I'm open to it.  Anyone else have thoughts on this?
    On a separate note, you'll be thrilled to hear what one of our CSC booth give-aways will be at Cisco Live San Diego next week.  Your best friend the cross-over-cable    For those of you out there attending the event be sure and stop by the CSC booth.
    Cheers,
    Dan

  • I need a script that can save images in whatever directory they reside in

    I am working on a project where I have over 1500 directories that have multiple .TIF images in each one. I am looking for a solution where I can run a script (which may or may not call on actions) that allows me to save each .TIF as a .PSD and again as a .PNG (with specific optimization settings) in the same directory as the original .TIF. The main idea here is I need to be able to run the script and walk away. So I'm looking for a one press option for each directory.
    I can create an action that saves the files in the proper format but when I record the action it saves the file in "folder 1". When I run this action again on "folder 2" it saves the images in "folder 1."  I could certainly make adjustments in the "Batch" dialog box by choosing the over ride "save as" function but the goal is to not have to do that 1500 times.
    So, my question is, is there a single script out there that can save images next to the original .TIFFS regardless of what directory the reside in? I'm no scripting guru, but perhaps the code uses something with a "this" command to specify the folder to save images to? Is this even possible? If so, are there web sites I can buy this from? Is there a scripting community that can provide these services?
    Any help to point me in the right direction is much appreciated.
    Mike

    You could try my Picture Processor ...
    http://www.ps-scripts.com/bb/viewtopic.php?f=10&t=3409&sid=3925f7039423a428ed082feba2c0aee 9
    Use the second download.

  • How to begin with Photoshop scripting

    After years of working with Photoshop I have started to device my own Photoshop scripts to automate my workflow.
    My search for formal Photoshop script training produced no concrete results. In the past the Photoshop World Conference has offered Photoshop Scripting workshops.
    Acquiring Photoshop scripting skills requires detective work and perseverance. The results are gratifying when a custom Photoshop script adds additional functionality and efficiency to your workflow.
    Below is a list of resources I have compiled learn Photoshop scripting.
    FORUMS AND BLOGS
    TUTORIALS AND TRAINING
    TEXT BOOKS AND GUIDES
    SCRIPTING TOOLS
    FORUMS AND BLOGS
    Adobe Photoshop Scripting Community
    https://forums.adobe.com/community/photoshop/photoshop_scripting
    Independent Photoshop Scripting Community
    http://ps-scripts.com/
    PHOTOSHOP FOR GEEKS 2008
    http://www.tranberry.com/photoshop/photoshop_scripting/PS4GeeksOrlando/IntroScripts/presen tations_materials/ps_geeks_slides.pdf
    PHOTOSHOP FOR GEEKS 2007
    http://www.tranberry.com/photoshop/photoshop_scripting/tips/photoshopforgeeks2.html
    Jeff Tranberry’s blog
    http://blogs.adobe.com/crawlspace/category/photoshop-scripting
    http://tranberry.com/photoshop/photoshop_scripting/index.html
    TUTORIALS AND TRAINING
    Lynda.com
    http://www.lynda.com/Photoshop-tutorials/Photoshops-scripting-backbone/289/22351-4.html
    Trevor Morris Scripting Photoshop Part 1 and Part 2
    http://morris-photographics.com/photoshop/tutorials/index.html
    Code School (Javascript)
    https://www.codeschool.com/paths/javascript
    Tuts+ (Javascript)
    http://courses.tutsplus.com/courses/javascript-fundamentals
    w3schools
    http://www.w3schools.com/js/default.asp
    TEXT BOOKS AND GUIDES
    Adobe Photoshop Scripting
    http://www.adobe.com/devnet/photoshop/scripting.html
    Power, Speed & Automation
    http://www.amazon.com/Power-Speed-Automation-Adobe-Photoshop/dp/0240820835
    Adobe Press: Learn How to Script Adobe Photoshop
    http://www.adobepress.com/articles/article.asp?p=433750&seqNum=4
    AdobeScripting: Your visual blueprint for scripting in Photoshop and Illustrator
    http://www.amazon.com/Adobe-Scripting-blueprint-scripting-Illustrator/dp/0764524550/ref=la _B001KE7GZM_1_2?s=books&ie=UTF8&qid=1394514490&sr=1-2
    Photoshop Speed Clinic
    http://www.amazon.com/The-Photoshop-CS2-Speed-Clinic/dp/0321441656
    SCRIPTING TOOLS
    Photo Script Builder
    http://madebyvadim.tumblr.com/post/71403984777/script-builder-free
    This tool was available online for free until recently but has since become unavailable.
    The idea behind this tool is excellent. Perhaps it will resurface as a commercial product in the future.
    Script UI Builder (User Interface Dialogs)
    https://sites.google.com/site/scriptuibuilder/ 
    Adobe ESTK (Extended Script Tool Kit CC)
    https://creative.adobe.com/products/estk
    xtools
    http://sourceforge.net/projects/ps-scripts/files/xtools/v2.1/
    http://ps-scripts.sourceforge.net/xtools.html

    https://github.com/search?q=photoshop&ref=cmdform
    github is a great place to find jsx scripts

  • Different keywords in scripts

    I was curious to know if it is just a personal choice, carry over from prior AS versions, browser adaptation, cross script language compatability, or is there some specific functionality difference between essentially the same mouse events end result.
    For example I notice some use "MOUSE_DOWN", others "onRelease", some use "buttonDown"  and still others just "CLICK". All seem to work identically, but there has to be a reason why there are so many.
    It can be confusing when to use what. Enlightenment is requested.

    It's doubtful that the W3C will ever get along with the world of Flash... for some reason they just don't want to cooperate... otherwise there wouldn't have to be all this extra code to help make Flash content presentable in browsers without being rejected as being non-compliant with the W3C standards.

Maybe you are looking for