How to capture events from vbs script in java

Hello all
i have vbs script that executing some actions after its done running or after its fails the vbs script
returns string , my question is how can i execute this script but also capture in java the returned string from the vbs script
Thanks

Hello
nop im talking about java here is what i got untill now .. ( not working )
for example say i have vbscript that do only that :
myVbs.vbs :
set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Echo "Hello World!" and i like to capture this "Hello World!" string in my java code how can it be done?
this is my java code , but its does not working ..
public class ExcVbs {
     public static void main(String args[]) throws InterruptedException{
          Process p = null;
          try {
               p = Runtime.getRuntime().exec( "rundll32 url.dll,FileProtocolHandler myVbs.vbs" );
          } catch (IOException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
          p.waitFor();
          OutputStream pus = p.getOutputStream();
          System.out.println(pus.toString());
          System.out.println( "Code=" + p.exitValue() );
}

Similar Messages

  • Triggering background job event from Unix script

    Hi all,
      I am having one question regarding triggering of background job in SAP using Events from Unix script. Is this possible? If so, can anyboy provide some sample code related to Unix script and how do we communicate to SAP from Unix system. Actually, here the backend of R/3 system is MSSQL. I am having a program in R/3 system which is scheduled as a background job based upon event trigger. I want to trigger that even from the unix script.
      Appreciate for your help in advance.
    Thanks,
    Adithya K

    Hi,
    Check if this can help you
    http://help.sap.com/saphelp_sm32/helpdata/en/fa/096e6b543b11d1898e0000e8322d00/content.htm
    Regards,
    Atish

  • How to export events from iPhoto in Iphone 5 to Mac?

    How to export events from iPhoto in Iphone 5 to Mac? Thanks

    Is this waht you want to do?
    It's built into the File Export function of iPhoto 9 (11).  Select what every photos you want and use that option to put each photo in a folder with the Event title it came from as in this test of six randomly picked photos:
    OT

  • How to get event from message?

    Hi,All:
    I write a run-time interface by CVI, I use TS_EngineRegisterUIMessageCallback to register my callback function, but when message passed to the callback function, as the type is struct IDispatch but not CAObjHandle, I don't know how to read event from message.
    Can you help me to solve it? Thanks
    Chang Zhang

    Hello Chang-
    If your question is simply how to obtain an object handle from an object of type IDispatch, have you investigated the function "CA_CreateObjHandleFromIDispatch"? I would recommend you look over the testexec.prj that is installed along with the TestStand engine (the CVI Operator Interface) and inspect how we handle our callbacks, this may help you understand how to go about emulating the behavior in your own project. To see this particular function in use it may be most helpful to look in the file 'engine.c' and inside the function UIMessageDeferredCallback here you will see the IDispatch pointer being handled and decoded for use by the TS engine.
    Regards,
    Elaine R.
    Applications Engineering
    National Instruments
    http://www.ni.com/ask

  • How run a batch file from VBS script?

    I have written a script in which I create a batch file that I want to run. Running it from the Start menu with "Run..." works fine but I would like to do it automatically from the script. I can't find a command that works but I am a beginner, so I'm hoping someone's got a solution?!

    Hi again!
    Thank you for your help but I've just discovered that my problem probably doesn't have to do with the way that I call for the batch file. It's more like this:
    The batch file is run but it only does its job some of the times... The batch contains one name of a converter application (Convert.exe) and the names of some databases and files. I've been told that the conversion should work if Convert.exe is located in the same folder as the files. Which it also does, if I run the batch from "Run..." but not from my code.
    I had it working for a while when I had fiddled (as I said, I'm a beginner at this) with setting some drives, such as userDrv and changing some paths in the script settings. Since I didn't really know what I was doing though, I didn't save these settings when closing down DIAdem and now it's not working again. When it worked, it only worked for the file where my .VBS was saved. The point of the program is to convert files in different folders so that wasn't enough.
    Just for clearity: I can't write the name as "C:\My Folder..." because the batch file name and the folder it is situated in is different each time so I have variables for the path and the batch, but that part seems to work. (Call ExtProgram(batFilename_) where batFilename_ includes the path).  
    So I guess what I need to understand is how the different drives work or maybe I need to somehow change my path settings?

  • How to send event from flex extension to other flex extension in InDesign?

    I have two extensions created using flex for InDesign. I need to send an event from one of these extensions and capture that event in other extension. How can it be done? Please help me.

    Hi,
    What I believe that data cannt be send from flex to java as hash maps...... we can send data from flex to java, but this data can be in form of array, string or boolean value..... Then the data can be send using ExternalInterface...............
    and if it is web application you need to use java script in between to communicate and if it is desktop application you can send data using MERAPI...
    MERAPI will act as a bridge for sending data from java to flex and vice versa... and you can send any type of data using merapi.

  • Capture event from mxml component

    I have an accordian control in my main mxml application. Each
    item in the control is a custom mxml component that I created that
    consists of a label and some text. When the label is clicked, I
    need to fire off a message to the containing application with a
    string value. I'm not sure how to do this. Here's what I have right
    now. I'm not sure if I'm going down the right track but if I am,
    how do I pass the string argument with the event and then capture
    this event and the argument in the main application?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="200">
    <mx:Script>
    <![CDATA[
    private var _title:String = "";
    private var _desc:String = "";
    [Inspectable(defaultValue=true)]
    public function set Title(title:String):void{
    _title = title;
    public function set Description(desc:String):void{
    _desc = desc;
    private function SetMovie(url:String):void{
    dispatchEvent(new Event("MovieTitle"));
    [Bindable(event="MovieTitle")]
    ]]>
    </mx:Script>
    <mx:VBox>
    <mx:Label id="lblTitle" text="{_title}" width="190"
    click="SetMovie('testmovie.flv');/>
    <mx:Text id="txtDescription" text="{_desc}"
    width="190"/>
    </mx:VBox>
    </mx:Canvas>

    You have several issues, and several options here. First, a
    custom event can pass any data you want, and is not very hard to
    create.
    However, there is a still easier way. All of the Event
    objects have a "target" and "currentTarget" property which give you
    a reference to the object that dispatched the event.
    So, in your component, implement a public property, say like
    this:
    public function get Title():String{
    return _title;
    then in a handler function you can do:
    private function onMovieTitle(event:Event):void {
    var sMovieTitle:String = event.currentTarget.Title; //watch
    out for reserved words, though
    There are two ways to listen for an event. One easy way is to
    use a bubbling event. Some folks advise against bubbling event
    because of potential event name collisions, but this may not be a
    concern for you. It has not yet concerned me enough to make me
    avoid using bubbling.
    The other way is to declare handler on the component itself.
    Also, if you use a metadata tag, you can assign the handler on the
    mxml tag, instead of using addEventListener():
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="200">
    <mx:Metadata>
    [Event(name="MovieTitle", type="flash.events.Event")]
    </mx:Metadata>
    <mx:Script>
    Then, in you main app:
    <myComp id="mc1" ... MovieTitle="onMovieTitle" ...
    Without the metadata, you would do
    mc1.addEventListener("MovieTitle",onMovieTitle)
    Using a bubbling event:
    change the dispatchEvent to this:
    dispatchEvent(new Event("MovieTitle",true)); //the 'true'
    makes it bubble
    Then, in the main app, listen ON the main app(this):
    this.addEventListener("MovieTitle",onMovieTitle);
    Tracy

  • How to delete events from iPhone/iCal

    How can I delete old/no longer happening recurring events--or any events--from my iPhone?

    If you see the "+" button then you have not clicked on the event you want to delete.  When you do you will see another screen that looks like the one below.

  • Capturing events from a JCheckBox in a JTable cell

    I am trying to capture item state changed event from a JCheckbox in a JTable. When user selects checkbox I do insert in database and on deselect I do delete from database. The item state changed event is not firing correctly...can you please tell me what I am doing wrong. My JTable uses CustomModel which is used by many other apps. So I can not really modify CustomModel only to work with my JTable. Here is my code.
    public class MyClass extends JPanel
    .....some code to add panel, jscorollpane, etc.
    ResultSet res;
    GUI gui; //Custom Class to deal with different GUI layouts
    JTable myJTable = new JTable();
    GUI.CustomModel custModel;
    public void init()
         displayJTable();
    attachCheckBoxListeners();
    private void displayForms()
         res = //resultset from DB
    Vector cols = new Vector(10);
    cols.addElement(new Integer(1);
    gui.DisplayResultSetinTabel(res, myJtable, cols, null);
    custModel= (GUI.CustomModel) ((TableSorter) myJTable.getModel()).getModel();
    custModel.setEditableColumn(0, true);
    //Attach CheckBox Listener to all the checkbox in JTable
    private void attachCheckBoxListeners()
    for(int row = 0; row< myJTable.getRowCount(); row++)
    Object val = cm.getValueAt(row, 0);
    final JCheckBox jcb = (JCheckBox) gridForms.getCellEditor(row, 0).getTableCellEditorComponent(gridForms, val, true, row, 0);
    jcb.addItemListener( new java.awt.event.ItemListener() // Add Item Listener to trap events
    public void itemStateChanged(java.awt.event.ItemEvent event)
                   if(myJtable.getSelectedRow() == -1) // if no row is selected in table return
                        return;
                   try               
                   if (res.absolute(myJtable.getSelectedRow())+1))
         if(jcb.isSelected())
    saveData();();      
         else
    deleteData();
         catch(Exception e)
    System.out.println("ERROR ");
    } //end of AttachCheckBoxListeners ()
    private void SaveData() {}
    private void DeleteData() {}
    Okay....the problem is when JCheckBox state is changed (by user) from Selected to Deselected itemStateChanged() is fired and it does delete from database. then again itemStateChanged() called it detects Jcheckbox as selected and does inseret in database. On Jtable gui...that checkbox is still shown as desected.
    Please tell me what is going on here.....
    Thank you.

    In short - never listen to low-level events from editorComponents (low-level meaning everything below - and most of the time including - a editingStopped/editingCancelled of the cellEditor). Your problem belongs to the model realm - save if a cell value is changed - so solve it in the model realm by listening to event from the tableModel and trigger your business logic when you detect a change in that particular cell value.
    Greetings
    Jeanette

  • How to move events from iMovie 10 to iMovie 9.0.2

    I haven't been having any luck using iMovie 10.  It keeps shutting my Mac down and rebooting it.  I thought adding more RAM would help and added another 8GB, but that hasn't fixed the issue.  I have now re-installed iMovie 9.0.2, but I have a project started in iMovie 10.  After the last reboot, I can find my events, but my project that was nearly finished seems to be gone.  So frustrating.  Can anyone tell me how to move my events from iMovie 10 to iMovie 9.0.2?
    Thank you.
    PegM
    My OS is Mavericks 10.9.2 if that makes a difference.

    I'm afraid that its not possible to transfer projects form iMovie 10 to iMovie 9.
    Imovie 10 should not be behaving how you describe.  Are you short of disk space?  (You certainly have plenty of RAM.).
    If not I would consider re-installing iMovie 10.
    Another alternative would be to use Final Cut Pro.  You can easily transfer projects from Imovie 10 to FCP 10.1.  I have done this myself.  It is very similar to iMovie 10 but much more powerful and personally I have found it easier to use and more stable than iMovie 10.  Although it is not cheap, you can try it out free for one month.
    Geoff.

  • Capturing events from a bluetooth remote control

    I purchased a Fujitsu Remote Control RC900 and installed it on my Windows 7 computer.
    Now I try to capture the remote control key events in a Java application.
    I can catch some events as keyboard events (such as "Enter" or arrow keys) but for many keys I have not found a way to catch any event.
    Still, some media applications can recognize the events.
    I also tried listening mouse events with this swing tutorial class
    http://docs.oracle.com/javase/tutorial/uiswing/examples/events/MouseEventDemoProject/src/events/MouseEventDemo.java
    But no success. Any ideas?
    Is there any remote control event framework for Java, apart from keyboard or mouse events?

    In short - never listen to low-level events from editorComponents (low-level meaning everything below - and most of the time including - a editingStopped/editingCancelled of the cellEditor). Your problem belongs to the model realm - save if a cell value is changed - so solve it in the model realm by listening to event from the tableModel and trigger your business logic when you detect a change in that particular cell value.
    Greetings
    Jeanette

  • How to send event from gecko to gaia to by taking even i can do further operation in gaia

    i want to send an event from gecko to gaia. I am doing some operations in gecko and once it finish gecko should send event like onComplete to gaia. So i can capture this event in gaia and do further operations.
    Plese let me know the procedure for sending events. I m working on ffos phone.

    The following site would be a better choice for your question
    [https://developer.mozilla.org/de/docs/Mozilla/Firefox_OS MDN - Firefox OS]

  • How to delete event from iCloud

    How do you delete an event from iCloud on iOS devices?  I have an appointment (sent from outside) that I accepted into iCal and now want to delete (or decline) the event. I can delete it on my Mac but not on iOS devices (iPad 2 & iPhone 3Gs both using latest software). If I try to delete the event on iCloud from the web I get an error that says "This event could not be deleted due to a server error. Please try again"
    tia
    Dave

    Look like you have duplicate calendars. Find the name of the calendar on your iPhone and the color of the event labels. Then look at your computer. Find the one with the different label/name/color. You can delete that calendar.

  • How to pass events from subpanel(s) to the main VI ?

    hi all,
    I found a lot of solutions to pass the events from the main VI to the subpanel(s) but none about passing the events from subpanel(s) to the main VI. In the attached VIs, I just want to generate an event in the main_VI.vi when I click on the button positionned in the subPanel1.vi. How can I do that ?
    thanks.
    Cedric
    Attachments:
    main_VI.vi ‏13 KB
    subPanel1.vi ‏6 KB

    Cedric,
    You could use a queue to transfer the button data to your main vi.
    See the attached files:
    subPanel1mod - Detects a button change and Enqueues the state.
    main_VI mod - uses the Timeout event to poll for data in the queue.
    main_VI mod1 - gets the queue data without having to poll.
    Like your orginals, these files are in LV2010.
    steve
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.
    Attachments:
    subPanel1mod.vi ‏10 KB
    main_VI mod.vi ‏16 KB
    main_VI mod1.vi ‏15 KB

  • HOW TO DELETE EVENTS FROM CALENDARS

    I use my iPod rarely and only for music.  I want to delete events, (birthdays, meetings etc.), from my iPod that were synced from my Outlook calendar.  The iPod is a 2009 model MB598ll version 1.0.4 PC.  How can I delete these events from the iPod.  Also, how do I avoid future syncing to my Outlook calendar?
    Thanks

    Look like you have duplicate calendars. Find the name of the calendar on your iPhone and the color of the event labels. Then look at your computer. Find the one with the different label/name/color. You can delete that calendar.

Maybe you are looking for

  • How do I create a Distribution List in the Mail App?

    I am a recent convert from MS Outlook on Windows. I am loving Apple's Mail, Address Book and iCal. But I am still learning how to do all the things I do everyday without even thinking. I just want to create a Distribution list for each team of people

  • HT1553 Back up and upgrade from leopard to lion

    Can I use same external hard drive to back up os x10.5 then use same external HD after upgrading to lion?

  • Is there anywhere I can download Apple Special Events and WWDC?

    I really love to watch the Special Events and WWDC, but everytime I want to watch it my Internet is too slow. So I want to download them to watch offline on my Mac, but it is too long to convert it from YouTube. Any suggestions and where to download

  • External optical not recognized

    the burner is gone on my mac book pro    AGAIN   went to an external burner ....samsung portable dvd writer model se-208 ....computer does not recognize it and i cannot burn anything ..it does read ...is there something im missing or have i over look

  • Gl account require assignment to Co object

    Hi while  doing PGI .it is giving error of  "account require assignment to CO object" please clear where to assign Co object & how. do i need to assign the Gl in okb9 seeting