How to run javascript programatically

hello,
I wonder if I can run javascript in bash to make photoshop convert raw to jpg.
Google returned a few answer, but none of them give enough details.
I just figured out photoshop can run javascript
in Mac OS X,
can I do something in bash like below:
./photoshop convert.js
2nd problem:
can photoshop & its javascript do batch processing?

I used JQuery to override the behavior of Next button in pagination in Interactive reports. I execute my custom code to remove "Sum" for aggregate columns and then do default code for Next button. My requirement can be met if I could execute my code after default behavior of Next button.
Below is the code I used in Header section of page attributes.
<script type="text/javascript" src="#WORKSPACE_IMAGES#jquery-1.3.1.js"></script>
<script type="text/javascript" src="#WORKSPACE_IMAGES#xx_util.js"></script>
<script>
$(document).ready(function() {
$('.pagination').live("click", function(){
eval(this.href);
remove_sum_label();
alert("Removed Sum Label");
return true;
</script>
{code}
Sample page is [http://apex.oracle.com/pls/otn/f?p=15944:3:235855021684863:::::]
How can I execute custom code after default behavior of Next button in pagination?
Thanks
Kishore

Similar Messages

  • How to run javascript step by step

    I write a javascript function.
    I want to the javascript can run line by line. For example, after finishing sumbit, then, it will run following code. However, the form is big, and saving variables to database need time. Therefore, rest code run before database finish saving form variables.
    How to run the rest code after database finish transactions?
    function processSaveZB(){
              document.getElementById("businessForm").action="${pageContext.request.contextPath}/pages/compreApp/compreApp_createGdjbxxzb.action";
              document.getElementById("businessForm").submit();           
              for(var v=0; v<allrows.length; v++){
                   var url='${pageContext.request.contextPath}/pages/compreApp/compreApp_createTdytNew.action';
    ...........run action......................
    window.close();
    }

    I write a javascript function.Then you're in the wrong place. This is a Java Programming forum, not JavaScript. Locking.

  • How to run javascript through action

    Is it possible to run the javascript file via illustrator action? How?
    Thanks,
    Prabudass

    My ultimate goal is to force a document to only use a specific color library. To do this, I have been using the Live Color options. Of course, the only thing I can do as an action is open the Live Color (recolor artwork) tool. The artist will still have choose certain settings.
    Also, there are specific layers that are locked with objects that need to conform as well. Figured I had to do that with a script. The script unlocks a layer, unlocks any objects on that layer, selects them and recolors them (With a swatch created in the script as well) then locks the object back and then locks the layer. So, the action calls the script for one part, and then the recolor artwork for the rest.
    The hope (plan) was to have this setup for the artist so all they would have to do is run the action.

  • How to run javascript from Item Button?

    How to make an Item Button to run a javascript?

    Specify custom URL target as : javascript:yourFunction().
    Alternatively, specify item attributes:
    onclick="yourFunction()"
    Ta,
    Trent
    Edited by: trent on Nov 25, 2010 4:39 PM
    typo

  • Run javascript (not in a jsx file) from the command line extendscript

    Hi all,
    I was wondering if anyone knew how to run javascript from the command line in Extendscript (meaning Extendscript would be the target application). I know about the -run command line flag in which allows you to run a .jsx script from the command line but what I'm looking for similar syntax to run a script directly without needing to put it in a file. For example I have tried (obviously unsuccessfully):
    C:\Program Files (x86)\Adobe\Adobe ExtendScript Toolkit CC\ExtendScript Toolkit.exe -run "alert('Hello World');"
    Thanks!

    You might be looking for something like this: javascript - Is it possible to execute JSX scripts from outside ExtendScript? - Stack Overflow
    Although that one is about executing JSX files, the solutions given (Applescript as well as COM/VBScript) can be adapted to simply run a javascript code snippet rather than JSX file because the solutions simply call the Adobe app's Applescript/COM API to "execute javascript" (actually execute ExtendScript technically), and in the solution, they using includes to pull in the JSX file. You'd simply replace the include with actual javascript code snippet inserted in.
    Though this would then require you to run a VBScript, Applescript, or other script (that calls the COM/Applescript API) rather than the ESTK command line option.

  • Running javascript with HTML

    Hi all,
    I am looking for a way and example of how to run javascript against an HTML file. My project is a web site test utility that can load HTML pages and submit forms, however some forms require executing javascript to set or validate various form fields. I've looked into the Rhino javascript engine, but I do not understand how to execute the javascript functions which change HTML form values. Can anyone give examples of how this can be done? Please let me know if I need to explain this further.
    Thanks!

    Sorry the description of what I am doing is a bit vague. My java application is like a web crawler, no web browser involved, but it needs to behave like a web browser. The application will parse html and follow links found in anchor HTML tags. When my app encounters a form, it can build the target URL by parsing the form action, and all form elements such as the input, select and whatnot. The tricky part is when forms involve javascript that may alter values in form input fields, for example, hidden input fields. In this case, my app cannot simply build the target URL combining form field values. My application must execute any found javascript functions so that the correct values are placed in the form fields, then the true URL can be built. I investigated the Rhino javascript engine, which seems great for executing javascript methods, but I cannot find how to include form fields in the HTML which the javascript function may alter. I'm not set on using Rhino, just anything that works.

  • How to run a job in background programatically after 10 sec

    Hi Forum,
    Can anyone tell me How to run a job in background programatically after 10 sec..
    Thanks in advance

    Hi,
    Here is the example code
    *Submit report as job(i.e. in background) 
    data: jobname like tbtcjob-jobname value
                                 ' TRANSFER TRANSLATION'.
    data: jobcount like tbtcjob-jobcount,
          host like msxxlist-host.
    data: begin of starttime.
            include structure tbtcstrt.
    data: end of starttime.
    data: starttimeimmediate like btch0000-char1.
    * Job open
      call function 'JOB_OPEN'
           exporting
                delanfrep        = ' '
                jobgroup         = ' '
                jobname          = jobname
                sdlstrtdt        = sy-datum    " You need to give the Date for execution the Job
                sdlstrttm        = sy-uzeit    " You need to give the Time for execution the Job
           importing
                jobcount         = jobcount
           exceptions
                cant_create_job  = 01
                invalid_job_data = 02
                jobname_missing  = 03.
      if sy-subrc ne 0.
                                           "error processing
      endif.
    * Insert process into job
    SUBMIT zreport and return
                    with p_param1 = 'value'
                    with p_param2 = 'value'
                    user sy-uname
                    via job jobname
                    number jobcount.
      if sy-subrc > 0.
                                           "error processing
      endif.
    * Close job
      starttime-sdlstrtdt = sy-datum + 1.
      starttime-sdlstrttm = '220000'.
      call function 'JOB_CLOSE'
           exporting
                event_id             = starttime-eventid
                event_param          = starttime-eventparm
                event_periodic       = starttime-periodic
                jobcount             = jobcount
                jobname              = jobname
                laststrtdt           = starttime-laststrtdt
                laststrttm           = starttime-laststrttm
                prddays              = 1
                prdhours             = 0
                prdmins              = 0
                prdmonths            = 0
                prdweeks             = 0
                sdlstrtdt            = starttime-sdlstrtdt
                sdlstrttm            = starttime-sdlstrttm
                strtimmed            = starttimeimmediate
                targetsystem         = host
           exceptions
                cant_start_immediate = 01
                invalid_startdate    = 02
                jobname_missing      = 03
                job_close_failed     = 04
                job_nosteps          = 05
                job_notex            = 06
                lock_failed          = 07
                others               = 99.
      if sy-subrc eq 0.
                                           "error processing
      endif.
    Regards
    Sudheer

  • [CS4:JS] How to run ".sh" file through Javascript

    Dear All,
    How to run the ".sh" file through Adobe InDesign Javascript, I used the below coding:
    //================== Code =============================//
    var myFile = File("xxx/xxx/xxx/Test.sh");
    var Exec = "sh" + " "+ "\""+myFile+"\"";
    File(Exec).execute();
    //================== End =========================//
    the above coding is not working, I checked before without "sh" also, It is not working.
    Please anyone can give me the solutions & suggestion, and I will appreciate.
    Thanks & Regards
    T.R.Harihara SudhaN.,

    Dear Hawkinson,
      Many thanks for this quick reply, I'm really very happy, but unfortunately the script is return the "Permission denied" value.
    I used the below code, Please kindly change if anything is wrong.
    //====================== Script Source =====================//
    var myFile ="/Applications/MacXinPro/IDMLExportparse.sh";
    shell(myFile);
    function shell(cmd) {
    var
    rv,
    call ='do shell script "'+ cmd.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"';
    try {
    rv = app.doScript(call,ScriptLanguage.APPLESCRIPT_LANGUAGE);
    } catch(e0) {
    rv = e0+"\n"+(rv?"":rv);
    return rv;
    //====================== End : Script Source =====================//
    //=========== Output ================//
    Execution finished. Result: Error: sh: /Applications/MacXinPro/IDMLExportparse.sh: Permission denied
    undefined.
    Please kindly help me...
    Thanks & Regards
    T.R.Harihara SudhaN

  • Run JavaScript in Dreamweaver CS6 (Was:please suggest me sir...)

    how to run  a javascript program in dreamweaver cs6?

    Primer for using jQuery plugins
    http://alt-web.blogspot.com/2012/11/primer-for-using-jquery-plug-ins.html
    Nancy O.

  • Help me!! How to use JavaScript with JSP ??

    I am using JDeveloper and I created a screen in JSP which uses a bean for database connectivity and retriving info onto the page.
    The page has a ListBox where list items are populated from the database.My requirement is
    whenever the list is changed the page shuold be refreshed with the selected item info.
    I tried to use 'JavaScript' for triggering the event with 'onChange' event of the ListBox.But the event is not getting invoked. I think JavaScript is not working with JSP.
    Please help me with how to Use javaScript with JSP or any other alternative where I can meet my requirement.
    I have one more question...I have gone through the JSP samples in OTN and I am trying do download the sample 'Travel servlet' which show list of countries...etc
    I have also gone through the 'readme' but I don't know how to extract .jar file.
    I would be great if you could help me in this.
    Thanks!!
    Geeta
    null

    We have a similar need. We have used Cold Fusion to display data from Our Oracle Database. We have a simple SElect Box in HTML populated with the oracle data. When someone selects say the State of Pennsylvania. then we have an On change event that runs a Javascript to go get all the cities in Pennsylvania.
    Proble we are having is that inorder for the Javascript to work , we currently have to send all the valid data.
    Do you know of any way to dynamically query the the Oracle database in Javascript

  • Running Javascript in Navigation Bar (URL)

    Question: How can I enable in Firefox (currently 7 - beta) to run javascript in the url bar. I mean running: javascript:alert('iaurt'); in the url bar. I remember this worked on previous firefox versions... And this works in IE but on Firefox it doesn't :(

    Ctrl+Shift+K

  • How to run my jar file on a webserver

    hello everybody,
    I've created a chat aplication which consists of a client-side and server-side. The client-side is an applet and is working fine. But i'm getting problem with the server-side. Actually, it is working fine on my local system and even in a local area network. But now, i want to put the server-side on a webserver. So, i want to know how can i do that. My server-side is a jar file "chatserver.jar" which i've developed using frame containers. I want to know also how to run the chatserver.jar on the webserver. Is it that i should have implemented jsp? Or javascript? coz my chatserver must be always running 24/7. It must not be available to user. users will chat through applets and the data will be sent to the server-side which will in turn control and recognise those data. Can anyone please help me in that issue.

    that was very kind of u for replying to me. thanks a lot. Well, the web software i'm running is nothing soo great but it's simply a chat server side application. In this application, i'm using a thread where my datagram socket will keep on receiving data from clients and this server side apllication must response to the client. For example, if a client has added a new room, or a new user has logged in, the server side must take care to inform all other clients that a new user has just logged in or a new room has been created. The main method is in the "chatserver.class". Then, i've combined all my classes including the chatserver.class into a jar file. When i click on the jar file on my local system or on the server of a local area network, it works beautifully. So, my server side application works like that. I have to click on the chatserver.jar once and nothing else. No other interaction with the applicaion. But my problem is how to run it on a web-server like apache. Or even if i upload this software on a website, how do i make it run? Shall i implement jsp codes? If yes, how to execute such jar file using jsp?
    here are part of the codes where my datagramsocket is receiving message from clients:
    public void run()
         while(thread!=null)
              byte[] recbuf=new byte[65536];
              recpacket=new DatagramPacket(recbuf,recbuf.length);
              try{
                   servsocket.receive(recpacket);
                   if(servsocket==null)
         byte[] bt=recpacket.getData();
         String recvmess = new String(bt, 0, recpacket.getLength());
         InetAddress clientaddress=recpacket.getAddress();
         int clientport=recpacket.getPort();
         chatcom=new chatcom(this,clientaddress,clientport,recvmess);
         try{
              thread.sleep(10);     
         catch(InterruptedException _INExc)      
    chatcom is another class which i've created to differentiate if the data received is a message, new room, new user, etc... I've created my own RFC to make those differences. Like i said above, if a client has created a new room, the chatcom class will recognise that a new room has to be created and will therefore send the new room created to all other clients. So, i want to know how to get my "chatserver.jar" run on a web server like apache or even on a website if i want to upload this software. Coz once it starts running, i dnt hav to close the application. I mean to say that this application will have to run 24/7. Do i have to execute it externally using jsp codes? Is there any way to get my application run on a webserver?

  • Please tell me how to call javascript(.js) in my vb exe for adobe illustrator cs.

    Could you please please give some sample codings "how to call javascript in my vb exe for adobe illustrator cs". I called through doscript in my vb program, but some time it throws an error. If i run the script directly in illustrator it does not throws error. So Please advice me how to solve this problem.
    Thanks in advance,
    Prabudass E

    I'm not sure if this helps but it's from the CS4 scripting examples:
    Set appRef = CreateObject("Illustrator.Application")
    Set fileSystemObject = CreateObject("Scripting.FileSystemObject")
    ' Creating a folder browser in VBScript can be a problem (relying on either Windows API calls
    ' or use of ActiveX controls which may not be present on a given system). Instead, use
    ' Illustrator's built-in JavaScript to display a file browser. DoJavaScript can return a value,
    ' in this example it's the platform specific full path to the chosen template file.
    doJavaScript = "var templateFile = File.openDialog(""Select CalendarTemplate.ai file:""); if (templateFile) filePath = templateFile.fsName;"
    myFilePath = appRef.DoJavaScript(doJavaScript)

  • How to invoke  javascript function after business action??

    How to call javascript function(such as "window.close(), window.open(...),...") in the action method(public String doBusiness(){...}) of <h:commandButton>?If not,then,is there any alternate approach to call javascript function when the bussiness action method finished??
    Thanks a lot!

    Since your business method is called after the form is submitted, and your code is running on the server, probably the only thing you can do is this:
    Create a custom component (Maybe call it the "onLoad" component) that you always render at the top of your JSP. In the regular situation it wouldn't render anything, but in the case you mention, after your busines method, you would call a method on this new component on the server that would cause it to actually render something the next time it is rendered. When rendered this time, it could then render the "onLoad" method which has your window.close() code in it. The window would then close right away.
    The key is that you are not doing any of this on the client. The form is submitted, your business logic is executed, then the next page is rendered. When the next page is rendered, your javascript could be rendered to close the window.
    If I'm offbase here, someone please say something, I'd hate to send this guy on a wild goose chase.
    Dave

  • HOW TO RUN ADOBE READER IN MACBOOK PRO

    HOW TO RUN ADOBE READER IN MACBOOK PRO

    Please stop using caps.  It is considered shouting and rude.
    You need to download the program. The reader runs when needed.
    Barry

Maybe you are looking for