SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Member
    Join Date
    Jun 2002
    Location
    california
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    which method could i use to type characters as is

    which method could I use that I could pass a string and will enter it as I exactly have it written down and not treat it as a keyboard function. if there's none, could anyone please give me a lead on how to do this. for example

    InputKeys ( "this is a test <enter>")

    Result will be "this is a test <enter>" and not
    "this is a test" [carriage return]


    thanks much in advance.

  2. #2
    Member
    Join Date
    Jul 2001
    Location
    Mission Viejo, CA, US
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: which method could i use to type characters as is

    STRING sInputString = "this is a test {Chr(60)}enter{Chr(62)}"

    Then you can use SetText to enter the string.

    NOTE: The same input string did NOT work when using the TypeKeys method.

    Hope this helps! [img]images/icons/smile.gif[/img]

  3. #3
    Member
    Join Date
    Sep 2001
    Posts
    69
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: which method could i use to type characters as is

    Yo yo yo ... what up dawg. Ok here is the break down ...

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">window.obj.TypeKeys(&quot;This is a test &lt;less&gt;enter&lt;greater&gt;&quot</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Don't even try {Chr(60)}or {Chr(62)} its wack. Keep it real dawgs. Im outta here.

  4. #4
    Member
    Join Date
    Jul 2001
    Location
    Mission Viejo, CA, US
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: which method could i use to type characters as is

    Just a quick note about the post from Joe_v; that input string will only work for the TypeKeys method.

    If you need or want to use the TypeKeys method Joe_v's post will do the trick.

    If your preference is the SetText method, then my input string should help you out.

    You have two possible solutions. [img]images/icons/smile.gif[/img]

  5. #5
    Member
    Join Date
    Jul 2001
    Location
    Mission Viejo, CA, US
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: which method could i use to type characters as is

    Question to mbt011:

    Did window.object.SetText("This is a test &lt;enter&gt;")not work?

  6. #6
    Member
    Join Date
    Jun 2002
    Location
    california
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: which method could i use to type characters as is

    Originally posted by mswoager:
    Question to mbt011:

    Did window.object.SetText("This is a test &lt;enter&gt;")not work?
    <font size="2" face="Verdana, Arial, Helvetica">When I run the code as you have exactly written will do a carriage return for the "&lt;enter&gt;" part. What I want to happen is to type exactly as it is written '&lt;enter&gt;' won't be treated as a keyboard action but instead just as a string '&lt;enter&gt;'

  7. #7
    Member
    Join Date
    Jul 2001
    Location
    Mission Viejo, CA, US
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: which method could i use to type characters as is

    What type of field are you trying to set this text into? A regular, normal TextField?

    Did you try the TypeKeys strategy suggested by Joe_v or the SetText method I proposed at first?

  8. #8
    Member
    Join Date
    Jun 2002
    Location
    california
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: which method could i use to type characters as is

    mswoager, it's just a standard texfield.

    the suggestion by Joe_v works... but in this case in the string I have to actually include the "&lt;lesser&gt;" and "&lt;greater&gt;" vs having a method that will be smart enough to detect that "&lt;enter&gt;" supposed to be treated as a string and not as a carriage return. i suppose SilkTest doesn't have this defined method.

  9. #9
    Member
    Join Date
    Jul 2001
    Location
    Mission Viejo, CA, US
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: which method could i use to type characters as is

    Does the SetText recommendation I made not work?

    window.obj.SetText ("this is a test {Chr(60)}enter{Chr(62)}")

    From my investigation, this would be the only way to use SetText and get the "&lt;" and "&gt;" included.

    As long as you found something that works... :-)

  10. #10
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: which method could i use to type characters as is

    window.obj.SetText("this is a test &lt;enter&gt;") works for me. It just types in verbatim what is passed and doesn't do a carriage return.
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

 

 
Page 1 of 2 12 LastLast

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 10.00%
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 04:28 PM.

Copyright BetaSoft Inc.