SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Mar 2002
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    insert typing delays

    User (deepakeswaran.ks@orbitech.co.in.nospam) posted:

    hi group,
    iam using the "obj_key_type" function to enter data into a text field.
    the syntax is like this.

    strTemp="Hello World";
    obj_key_type("TextField",strTemp);

    but the text is inserted at one stretch into the text field.
    is there any way thru which i can add a typing delay,so that i can slow down
    the inputting of the data into the field


    regards
    deepak



  2. #2
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: insert typing delays

    User Dutta, Sujata (Sujata.Dutta@sdrc.com.nospam) posted:


    Try using obj_type(object,string) function.
    Sujata


  3. #3
    Senior Member
    Join Date
    Mar 2002
    Location
    Irvine, CA 92606 USA
    Posts
    384
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: insert typing delays

    This might do what you want.
    It depends if using the "type" function will work in your application. The "type" function sends the keys to the Window Not the object.

    static StringX;

    StringX = "This is the time for all good men"&
    " to come to the aid of thier country";

    # Get length of String
    len_StringX = length ( StringX );

    # Loop through the String 1 character at a time
    # type is to the Window Not the object

    # Untitled - Notepad
    win_activate ("Untitled - Notepad");
    startTime = get_time();
    for ( i = 1; i <= len_StringX; ++i )
    {
    StringY = substr( StringX, i, 1 );
    # wait(0,50); # You can add a wait here to slow it down more.
    type ( StringY );
    }
    endTime = get_time();
    totalTime = endTime - startTime;
    printf ( "Time in Seconds is : %s", totalTime);

    ------------------

  4. #4
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: insert typing delays

    User Franzen, SPS PROFI, DA (C.Franzen@DeutschePost.de.nospam) posted:

    Hi,

    RTFM :-)

    The dox for type () say:

    Pauses between keystrokes are indicated by the letter t followed by an
    integer, representing the number of time units, enclosed by greater/less
    than signs* (< >). The statement
    type("hello, <t3>world");
    depicts a pause of 3 seconds between the input of the words hello and world.
    The lowercase t can be replaced by a capital T, which indicates
    milliseconds.
    <<


    I think you can use this for obj_type as well. (You said obj_key_type, but
    meant obj_type, right?)

    Let us know if this helps.

    Regards.


    Christoph Franzen
    Durchwahl -907-3279
    DP AG/Team EPOS-NT
    Schwarz, Prof. Spruth & Associates
    Unternehmensberatung AG & Co. KG


 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 09:22 AM.

Copyright BetaSoft Inc.