Remote Desktop Load Simulation Tools - RUIDCOM.PressKeyAndWaitForEvent RRS feed

  • Question

  • I would try to explain my situation by steps to be better understood :

    1. I'm working on an application using .NET and MVVM Pattern and now I'm building an online service so I need to use the Remote Desktop Load Simulation Tools to prove the conections of the clients.
    2. To do that I've configurated the Tools and I've written a VBscript using the RUIDCOM object and his functions.

    The problem: I need to know the state of the execution of my script and for do that I use the RUIDCOM function PressKeyAndWaitForEvent. This function uses one parameter to know what kind of event is waiting for. My problem is that the script keeps waiting no matters what kind of event executes the program.

    Any idea?

    Here is the description of the function:

    Long PressKeyAndWaitForEvent( Label, KeyCode, KeyFlags, szWaitString, SEvent, lTimeout)

    This function is the heart and soul of the automation. It sends keyboard input to the Remote Desktop session and also waits for an event which is expected as a consequence of the input. Additionally, it logs an entry in a response-times log specifying the amount of time taken for this action.

    Label: is the string used for logging the elapsed time in the response-times log

    KeyCode: is the ASCII code of the key that you want to press. Example: asc(“f”) will send the “f” key

    KeyFlags: is a combination of the following flags. This is used to send special key combinations like Alt+”f”

    VKeyFlag = 1 AltFlag = 2 CtrlFlag = 4 ShiftFlag = 8

    Example: AltFlag OR CtrlFlag - this will send a combination of Alt + Ctrl key

    szWaitString: is the string associated with the event that you expect to occur on the server as a response to sending the keys

    SEvent: is one of the following accessibility events


    lTimeout: is the optional time out value in milliseconds. If this is not specified, the script will wait indefinitely for the specified event. Otherwise it will return after the timeout elapses

    Return value: the function will return the time elapsed in milliseconds between sending the keyboard input and the firing of the server event. If the wait times out, it will return -1

    • Moved by Moderador M Friday, July 17, 2015 5:23 PM
    • Moved by Jiayi Li Tuesday, September 1, 2015 8:41 AM
    Thursday, July 16, 2015 7:12 AM


All replies