Forum Discussion

AlexiSage's avatar
AlexiSage
New Contributor
18 days ago

Problem entering character *

Problem appears in version 15.71.4.7. Before it worked.

In scripts, i use ".Keys" to enter data.

Since the latest version, the * character is no longer entered.

Ex : Before when i wrote "2*5", i obtened 10, and now i have 25.

    • scot1967's avatar
      scot1967
      Regular Contributor

      This is to force 'Keys' to use/send the numpad asterisk I believe. Worth a shot to see what happens though!

  • Hassan_Ballan's avatar
    Hassan_Ballan
    Regular Contributor

    Not sure why sending keystrokes "2*5" to the application you should end up with 10. 

    As rraghvani provided the correct syntax for the Keys Method, such method does not perform calculations.

    Perhaps your application receiving the keystrokes is performing the calculation, and also that for me would not be expected. If after updating the keys value to the correct syntax and still you do not get the expected results, perhaps you should investigate your application?

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    One of my replies seems to be missing!

    Was this working before upgrading TC? If yes, then it's most likely a bug that's introduced. I've upgraded to the latest version, and I've come across a number of issues. 

    • scot1967's avatar
      scot1967
      Regular Contributor

      Ah! yes, I am on Version: 15.68.8.7 x64.  I haven't upgraded yet. 

  • scot1967's avatar
    scot1967
    Regular Contributor

    Yes, perhaps a bit more info about what you expect to happen when you run obj.Keys("2 * 5");?  Is your app taking this string and performing a calculation?

    "Ex : Before when i wrote "2*5", i obtened 10, and now i have 25."

    What is giving you 10 or 25 ?

    .... Technically I think passing the string "2*5" to an app should include the asterisk.  What happens if you do this to a textbox in an app or can you visually verify the asterisk isn't there?

  • scot1967's avatar
    scot1967
    Regular Contributor

    Here I have added asterisks to a Keys call that enters the order entry elapsed time into a text box in my app.  I didn't need to use [NumAsterisk] to pass a * into my app.  So yeah, still maybe a little more background?  Don't rule out a 🪲 in your app.😉

    orderEntryObjs.txtSpecialInstructions.Keys("*** Total Order Time " + ((orderEntryTime + lineItemEntryTimeSum)/60).toFixed(3) + " minutes with " + intLineItems + " line item(s). ***");