How to access script from within Bridge

I have considerable experience scripting InDesign, but this is my first
Bridge script...
The following script does what I want from within the ESTK, but I have
no idea what to do to make it runnable from within Bridge... :(
Any pointers?
var brSel = app.document.selections[0].spec.toString();
var bt = new BridgeTalk();
//brSel = brSel.toSource();
bt.target = "indesign";
theScript = "var IDsel = app.selection[0]; \n";
theScript += "if (IDsel instanceof Graphic){ \n";
theScript += "var theGraphic = IDsel;\n";
theScript += "}else{\n";
theScript += "var theGraphic = IDsel.graphics[0];\n";
theScript += "}\n";
theScript += "var theFile = File(\""+brSel+"\");\n";
theScript += "theGraphic.itemLink.relink(theFile);\n";
theScript += "theGraphic.itemLink.update();\n";
bt.body=theScript;
bt.send()
Thanks,
Harbs

Harbs,
There isn't anything like a scripts palette in Bridge.
Because your working on a selection, you'll need to add a menu item to bridge.
You can also navigate to the folder containing the scripts and double click it. But then the script is the selection...
Bob

Similar Messages

  • OWSM Policy - how to access subject from within protected service

    I am setting up a new instance of SOA Suite 11g for integration purposes at my organization. I am planning to use predefined WSM policies to protect the services (see http://download.oracle.com/docs/cd/E12839_01/web.1111/b32511/policies.htm).
    Most communication is server-to-server (e.g. HR sending data to CRM), so it would make sense to use something like X.509 (i.e. oracle/wss11_x509_token_with_message_protection_service_policy). However, I have a requirement that the underlying services (BPEL processes, for example), must know the subject (i.e. the server) that sent the message. For example, did this incoming message come from the HR system or the CRM system. This is used internally by the BPEL process for audit logs and other things.
    We also use OAM, so I will likely eventually use the oracle/wss_oam_token_service_policy to verify ObssoCookie values. In those cases, the underlying Java service or BPEL process will need to have access to the username of the authenticated user.
    I've searched and searched the documentation, and I cannot find any instructions about how to access details about the authenticated subject (such as username, roles, or X.509 properties) from within the protected service, whether it be a Java-based service, a BPEL process, or anything else.
    I did find some information about how to read SOAP header values from within Oracle BPEL processes (see http://chintanblog.blogspot.com/2007/12/insertextract-soap-headers-in-bpel-it.html). However, this looks like it will only work if I use the WSS UsernameToken policy (e.g. oracle/wss_username_token_service_policy), since that is the only policy where the actual subject identifier (username) is specified in a SOAP header.
    Do the other policies (X.509, SAML, and OAM) provide a mechanism to convey properties of the authenticated subject to the underlying service? If so, where is this documented? Thanks much!
    Sincerely,
    Nathan Kopp

    Is it wrong question or wrong thing to do?
    Let's make it a little bit easier/better/worse:
    How can I change policy permissions at runtime?

  • How to access symbol from different stage

    Hi everyone,
    I'm really new at Edge, so I still have a lot to learn and I need your help with something..
    I want to know how to access a symbol from another stage, here's what I've and what I want to do..
    I've the main index page with symbol named "content", in content I load other composition (page). called "page2".
    all I want to do is when I click a symbol "XX" inside "page2". The "content" symbol loads other composition called "page3".
    I don't know how to access "Content" from "page2", so I could load "page3" ..  that's it
    I feel like it's simple, but I just couldn't know how to do it, I',m sorry for bothering you for such a question, but I've searched a lot and I got nothing.
    Thanks
    I thought I could use something like this
    var comp = Edge.getComposition("EDGE-638329");  
    var stage = comp.getStage(); 
    var symp= comp.stage.getSymbol("content");
    EC.loadComposition("assets/units/stage1/s1_3/s1_3.html",symp);
    but it's still not working, could someone please tell me what I'm doing wrong?

    I have multiple compositions, where I need to go from one to another.
    I use click scripts in an element to do this, using identical pages with different animations on each page.:
    Click script:
    AdobeEdge.goLoc(url); //url is the URL of an identical new html page with a different animation
    Then I have a custom .js page that I use that has the function:
    AdobeEdge.goLoc = function(url) {
    location=url;
    Peter Small

  • From my iPad I can print wirelessly in my office, but how do I print remotely via the web through my HP ePrint printer.  It is set up with an email address but i don't know how to access it from my iPad.

    I can print wirelessly in my office from my iPad, but how do I print remotely via the web to my HP ePrint printer.  The printer is set up with an email access address but I don't know how to access it from my iPad.

    Read through this for some information on how to do this:
    http://www8.hp.com/us/en/support-topics/mobile-printing/how-to-print-mobile-devi ces-ipad-iphone.html

  • Executing a Perl Script from within a Servlet

    I'm trying to call a script from within a servlet.This is the code i'm using:
    Process process = Runtime.getRuntime().exec(new String[]{"sh","-c",script,nick,pass});
    InputStream input = process.getInputStream();
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    int i;
    while ((i=input.read())!=-1) {
    baos.write(i);
    System.out.println(baos.toString());
    I can`t make it work.This is the output i'm getting.
    java.io.IOException: CreateProcess: sh -c /home/script.sh user pass error=2
    at java.lang.Win32Process.create(Native Method)
    at java.lang.Win32Process.(Win32Process.java:66)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Runtime.java:551)
    at java.lang.Runtime.exec(Runtime.java:477)
    at java.lang.Runtime.exec(Runtime.java:443)
    at controllers.EmailAcountCreate.doPost(EmailAcountCreate.java:34)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    Thanks in advance.

    I am facing the same problem. Could you please post the answer if you have one now. Please treat this as very urgent.

  • I created a folder from my camera roll and shared with my icloud acct, can't figure out how to access it from my computer?

    I created a folder from my camera roll and shared with my icloud acct, can't figure out how to access it from my computer? I log onto icloud and can't find anywhere where "shared" photos are..

    You need Mountain Lion (10.8.2 or higher) and iPhoto '11 (9.4 or higher) or Aperture 3.4 to get shared photo streams on Mac.
    Another option to transfer them is to either import them to iPhoto using your usb cable, as explained here:http://support.apple.com/kb/HT4083, or to us an app like PhotoSync to transfer them to your Mac over your wifi.  (PhotoSync will also transfer albums, not just photos from the camera roll.)

  • How do I shutdown from within Genome??

    How do I shutdown from within Genome??
    There is only a logout option - and that do not work.
    If I open a terminal and enter init 5 nothing happens.
    Or so it seems some services maybe stop.
    BUT there is no logoff and shutdown of Genome. So I swicth
    off my pc and next time I boot up my file system was corrupted.
    FSCK did not work I end up install everything this time use bypass
    option and install the patches for PC-Solaris 8.
    How do I go to a command line environment within Genome
    a .dtconfig stop ?? Will this let Genome come down without
    booting up and loosing my system again??

    ok... i figured it out... a 'Sprite' is really also a DisplayObjectContainer... so if i make my class an extension of Sprite i can 'addChild' to the Sprite and then add them all to the stage at once by adding Sprite to the stage...

  • Executing a perl script from within java application

    Hi,
    Does anyone knows a way to execute a perl script from within java.
    ---kirk

    Runtime.exec("perl myscript.pl");
    Of course whether that "works" depends on what the script does and where the java program runs.

  • How modificate this script from mouse click to release

    how modificate this script from mouse click to release
    package
    * A Colorful Fireworks Demonstration in Actionscript 3
    *   from shinedraw.com
    import flash.events.MouseEvent;
    import flash.system.ApplicationDomain;
    import flash.events.Event;
    import flash.display.MovieClip;
    import com.shinedraw.effects.ColorfulFireworks;
    public class Document extends MovieClip{
    private var _colorfulFireworks : ColorfulFireworks;
    public function Document(){
    this.addEventListener(Event.ADDED_TO_STAGE, on_added_to_stage);
    private function on_added_to_stage(e : Event):void{
    // place the object to the stage
    _colorfulFireworks = new ColorfulFireworks();
    addChild(_colorfulFireworks);
    // add the cover to save CPU time
    var coverClass : Class = ApplicationDomain.currentDomain.getDefinition("Cover") as Class;
    var cover : MovieClip = new coverClass();
    addChild(cover);
    cover.addEventListener(MouseEvent.CLICK, on_cover_click);
    // remove the cover after click
    private function on_cover_click(e:MouseEvent):void{
    var cover:MovieClip = e.target as MovieClip;
    removeChild(cover);
    _colorfulFireworks.start();

    solved close pls

  • Accessing tunes from within STP or Toast

    When using Toast, or Motion, or Soundtrack Pro, etc media browser files provide access to iTunes for selecting whichever tune you want. Very nice. However I cannot see all my tunes. They're listed in Compilations, Albums, etc. But for the life of me I cannot figure out how to get the ones I want to appear in that browser window. For instance, in iTunes I imported 4 tracks. I selected them, created a playlist with those 4, and indicated they were a compilation. I also included them in an existing playlist that does somehow appear in the browser in outside apps (Motion, STP, Toast, etc). But no matter what I try, those 4 songs are not accessible from within Toast. I simply cannot see them to burn to a CD. They are songs that are legal, nothing shady from that department, but my eyes and brain are foggy about how/where those browsers are accessing the data. Any help appreciated.

    There used to be something called high-level API. Abandoned ages ago because most of us preferred the "real thing" or went to scripting.
    TextStyleRange like all the other Text scripting objects are second class citizens of the object model - they are created only on the fly as "proxy" objects. On the down side that means they consume memory until the document is released/saved/closed, and may fall apart (point to the wrong chunk of text) after any manipulation in preceding text. Besides the implementation is overkill by several degrees - each instance (I think it was kTextScriptingSuiteBoss) is the equivalent to a whole selection suite boss.
    That said, you can use IScriptUtils to access kScriptInfoManagerBoss.
    IScriptRequestHandler is aggregated there to execute script requests.
    Be warned that constructing such script requests also has some learning curve, and the interfaces in the scripting area are extremely unstable across InDesign versions. Every other version renames methods, classes, adds or removes arguments. You will need plenty preprocessor conditions for cross-version code.
    From the plugin side I only use that approach where the official interfaces do not work and the working interfaces (as used by scripting) are not exposed. One concrete case is TOP (type on path).
    Dirk

  • Data Model damaged, Cannot connect to Access 2013 from within Excel 2013

    Hello,
    Recently I am not able to use PowerPivot for Excel 2013 and I cannot connect to my Access 2013 database tables from within Excel 2013. Whenever I try to click on a slicer in my Excel worksheet, it gives me the following error: "Excel was unable to load
    a necessary component. This component might have been damaged or deleted. Reinstall the client software or data source driver software for your database."
    I am using Microsoft Office Pro Plus 2013 on Windows 7, 64-bit version. I have tried reinstalling Microsoft SQL Compact Edition 2005 and reinstalling Office 2013. I have run out of ideas and am a loss what to do next ? 
    Can anyone help point in the right direction for a possible solution to this problem ??? 
    Would appreciate all help.
    Thank you.
    ~Maneesh
    The problem with being punctual is, there's nobody there to appreciate it !!!

    Hi
    This is the forum to discuss questions about apps for office develop. For your question is more about Excel, I will move this thread to the TechNet forum for
    Excel
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly
    can either share their knowledge or learn from your interaction with us.
    Thank you for your understanding.
    Best Regards
    Lan
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to call methods from within run()

    Seems like this must be a common question, but I cannot for the life of me, find the appropriate topic. So apologies ahead of time if this is a repeat.
    I have code like the following:
    public class MainClass implements Runnable {
    public static void main(String args[]) {
    Thread t = new Thread(new MainClass());
    t.start();
    public void run() {
    if (condition)
    doSomethingIntensive();
    else
    doSomethingElseIntensive();
    System.out.println("I want this to print ONLY AFTER the method call finishes, but I'm printed before either 'Intensive' method call completes.");
    private void doSomethingIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    private void doSomethingElseIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    }Question: how do you call methods from within run() and still have it be sequential execution? It seems that a method call within run() creates a new thread just for the method. BUT, this isn't true, because the Thread.currentThread().getName() names are the same instead run() and the "intensive" methods. So, it's not like I can pause one until the method completes because they're the same thread! (I've tried this.)
    So, moral of the story, is there no breaking down a thread's execution into methods? Does all your thread code have to be within the run() method, even if it's 1000 lines? Seems like this wouldn't be the case, but can't get it to work otherwise.
    Thanks all!!!

    I (think I) understand the basics.. what I'm confused
    about is whether the methods are synced on the class
    type or a class instance?The short answer is; the instance for non-static methods, and the class for static methods, although it would be more accurate to say against the instance of the Class for static methods.
    The locking associated with the "sychronized" keyword is all based around an entity called a "monitor". Whenever a thread wants to enter a synchronized method or block, if it doesn't already "own" the monitor, it will try to take it. If the monitor is owned by another thread, then the current thread will block until the other thread releases the monitor. Once the synchronized block is complete, the monitor is released by the thread that owns it.
    So your question boils down to; where does this monitor come from? Every instance of every Object has a monitor associated with it, and any synchronized method or synchonized block is going to take the monitor associated with the instance. The following:
      synchronized void myMethod() {...is equivalent to:
      void myMethod() {
        synchronized(this) {
      ...Keep in mind, though, that every Class has an instance too. You can call "this.getClass()" to get that instance, or you can get the instance for a specific class, say String, with "String.class". Whenever you declare a static method as synchronized, or put a synchronized block inside a static method, the monitor taken will be the one associated with the instance of the class in which the method was declared. In other words this:
      public class Foo {
        synchronized static void myMethod() {...is equivalent to:
      public class Foo{
        static void myMethod() {
          synchronized(Foo.class) {...The problem here is that the instance of the Foo class is being locked. If we declare a subclass of Foo, and then declare a synchronized static method in the subclass, it will lock on the subclass and not on Foo. This is OK, but you have to be aware of it. If you try to declare a static resource of some sort inside Foo, it's best to make it private instead of protected, because subclasses can't really lock on the parent class (well, at least, not without doing something ugly like "synchronized(Foo.class)", which isn't terribly maintainable).
    Doing something like "synchronized(this.getClass())" is a really bad idea. Each subclass is going to take a different monitor, so you can have as many threads in your synchronized block as you have subclasses, and I can't think of a time I'd want that.
    There's also another, equivalent aproach you can take, if this makes more sense to you:
      static final Object lock = new Object();
      void myMethod() {
        synchronized(lock) {
          // Stuff in here is synchronized against the lock's monitor
      }This will take the monitor of the instance referenced by "lock". Since lock is a static variable, only one thread at a time will be able to get into myMethod(), even if the threads are calling into different instances.

  • How to access data from node of other view into node of diff view?

    Hi all,
                  My requirement is that I have account defined in 'CLEAR_HEAD' component , view is 'CLEAR_HEAD/ClearAccountsEF'
    context node is 'TARGETVALUE' and attribute is 'ACCOUNT1'. I need to access this account information in the same component but in another view 'CLEAR_HEAD/ClearAddressEL' and the context node is 'DEPLIST' and attribute is 'RADIO1'. I have one custom controller 'CLEAR_HEAD/CuCoHead'  already defined in this component. I checked the above 'TARGETVALUE' node but it is not bind to any Custom controller. And I also checked the above pre-defined custom controller  'CLEAR_HEAD/CuCoHead'  and the context node in this Custom controller is different from those of the above context nodes and the only one context node defined in this custom controller  'CLEAR_HEAD/CuCoHead' is 'LISTNODE'.
    My quesitons are
    1. How to bind the above context node(TARGETVALUE) to the custom controller. Can I bind it to the above existing custom controller  'CLEAR_HEAD/CuCoHead'  , if so then how can I do since the above custom controller doesn't contain this context node(TARGETVALUE) and it contains only  the context node 'LISTNODE'. If I can use the above existing Custom Controller then can I directly do binding by right clicking the context node(TARGETVALUE) -> Create binding. Then what should be the value in Target Contex Node?
    2. Do I need to create another custom controller If so then can I directly follow the steps defined in this link '/people/vikash.krishna/blog/2009/12/28/crm-70-how-to--5d-custom-controller-and-binding-of-context-nodes' ? If so then what should be the Model node and Bol Entity name?
    I appreciate your help..
    Thanks,
    Chinnu.

    HI Chinnu, <br />
    <br />
    Approach 1: <br />
    Bind the context node view1  TARGETVALUE with Component controller.<br />
    and in View2 <br />
    data lr_comp_controller type ref to X----component controller<br />
    lr_entity TYPE REF TO cl_crm_bol_entity.<br />
    lr_comp_controller ?= me-&gt;comp_controller.<br />
    <br />
    lr_entity ?= lr_comp_controller-&gt;typed_context-&gt;Y-&gt;collection_wrapper-&gt;get_current( ). Y---CONTExt node in view1.<br />
    <br />
    Approach 2: <br />
    Declare a static attribute in the View controller of first view.<br />
    Read the attribute D1 value from DO_PREPARE_OUTPUT of first View and pass it to the Static sttribute.<br />
    In your 2nd view u can read this Static Atribute and use it.<br />
    Static Attribute u need to call as follows . Z********IMPL(Implemantation Class)=&gt;ATTR1<br />
    <br />
    Approach 3: <br />
    Creae a custom controller with the same context node used in view 1. <br />
    Bound the custom controller context node to view 1 context node.<br />
    <br />
    Now in view 2, get the custome controller and read data from it.<br />
    <p />
    <br />
    View1 context node: BTADMINH<br />
    <p />
    Custom controller: BT115QH_SLSQ/AdminH   context node: BTADMINH_CUCO<br />
    <p />
    In view 1 context class (CTXT class), go to CREATE_BTADMINH method and append the below code to bind both the context nodes,<br />
    <pre class="jive-pre"><code class="jive-code jive-java">* bind to custom controller
       owner-&gt;do_context_node_binding(
                iv_controller_type = CL_BSP_WD_CONTROLLER=&gt;CO_TYPE_CUSTOM
                iv_name =
                <font color="navy">'BT115QH_SLSQ/AdminH'</font>                         <font color="red">&quot;#EC NOTEXT</font>
                iv_target_node_name = <font color="navy">'BTADMINH_CUCO'</font>
                iv_node_2_bind = BTADMINH ).
    Now in view 2 get the custom controller using the below code,
    Data: lr_cuco type ref to &lt;custom controller class&gt;.
    lr_cuco   ?= me-&gt;get_custom_controller( controller_id = <font color="navy">'BT115QH_SLSQ/AdminH'</font> ).
    lr_entity     = lr_cuco-&gt;typed_context-&gt;BTADMINHCUCO-&gt;collection_wrapper-&gt;get_current( ).
    </code></pre> <br />
    <p />
    If you are just reading a attribute value  from view1, then approach 2 shud b easy one. <br />
    Approach 1 & 3, more or less the same, except we are using component controller vs custom controller. These approaches holds good when the data required to be accessed/updated from either views. <br />
    <br />
    Coming to your specific scenario, I think there is already a context node available in the compoenent controller TARGETBP, which can have the required data for you. Please look into that. <br />
    <br />
    Cheers, Satish<br />
    Edited by: Satish Reddy Palyam on Aug 13, 2011 12:50 PM

  • How To Access Files Remotely In Bridge Mode?

    Hey guys, so I've got a TC and my roomate has a TC the only way we can get them both to work is hooked up to our router and placing both TC's to Bridge Mode. The issue is in Bridge Mode we've lost a lot of remote functionality. The main thing we both want to do is access our files when we're on the go. Is there a way to remotely access our TCs in bridge mode? I'm pretty techy so I'm open to any creative solutions.

    but how will this solve the problem where I don't see "Share disks over WAN" on my TC?
    The TC does not need that option....since it is already in Bridge Mode. 
    If the TC were also your router.....then it would be providing DHCP and NAT service....and the option to "Share..." would be needed....so it would appear so you could allow or open the WAN port. The example that Tesserax provides assumes that the TC is also the router......providing DHCP and NAT service.
    You have a different layout. Another device is providing the DHCP and NAT routing, and the TC  is in Bridge Mode.
    Are you saying that option will become available when my TC sees the approptiate port is open?
    You don't need the "option" at all in Bridge Mode.  All ports are already open when the TC is in Bridge Mode. There is no WAN port in Bridge Mode....it automatically becomes a LAN port, so no need to "open" a port if it is already "open".

  • Access ViewObject from within DataBean

    How do you call a View Object from within a java class?
    This statement returns null:
    SessionCookie cookie = container.getSessionCookie(am);
    Is there another way to do this?

    Add the following code to your managed bean.
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExternalContext extContext = facesContext.getExternalContext();
    Application app = facesContext.getApplication();
    DCBindingContainer binding = (DCBindingContainer) app.getVariableResolver().resolveVariable(facesContext, "bindings");
    DCDataControl dcCtl = binding.findDataControl("MyDataControl");
    ApplicationModule appModule = dcCtl.getApplicationModule();
    ViewObject vo = appModule.findViewObject("MyView");

Maybe you are looking for

  • SHIP-TO-PARTY & SOLD-TO-PARTY

    Hi Friends, What is the main defference between Ship-to-party and Sold-to-party. In my sales order i am getting multiple Ship-to-party for a perticular Sold-to-party. Can any one tell me whats the main defference between this both. Regards,

  • How to change line width runtime?

    Hi, I want to change line width dynamically or runtime depending on certain conditions. I had written format trigger on line and used SRW.SET_BORDER_WIDTH but it does not work. so what is other possible solution for this? Thanks in advance.

  • Role info not appearing once role assignment request is submitted from UI

    Hi Everyone, We have a strange problem in our project in IDM 7.2 SP8 where IDM role concept is used which contains privileges (could be role/profile) of backend systems. Usually when ever a role (i.e IDM role) assignment request is submitted from UI,

  • Updating to Lion on my macbook and not able to access iPhoto

    I have updated my macbook (Mac OS X) to Lion but I can't seem to update iphoto. I have no access to iphoto and there is a wheel that continually spins saying it is updating, but it is now Day 7 and there is no update and there are no photos. Help!

  • Check FM - SGOSSUB_CHECK_FB  having error 'Check FM ends with exception'

    Hi All, System ECC 6.0 Scenario --> When inbound IDOC type ORDERS05 fails system should sent notification. Event linkage is active for for BO --> BUS2032 Event --> Changed Receiver Type --> Subscribe In Linakage setting following has been set Receive