Solved

Set text _ formatted string


Badge +1

Team, I am providing a string value while using Set text in recorder. However its pasting in formatted text. For example: My string is as below:

Input :- this test string

  • ABU 
  • xyz 

Output:-this test string . ABU . xyz

I have mentioned (.) as i am not bale to put here

icon

Best answer by DK 964 29 May 2024, 20:13

View original

5 replies

Userlevel 2
Badge +6

The Set action in recorder will use the characters and strings you provide. It will include spaces and special characters if your Set text value includes them. For instance, if your bot has two variables”

sOne: ABU
sTwo: xyz

And the Set value is:

$sOne$ $sTwo$

the output will be:

ABU xyz (including the space

Does that help?

Badge +1

@jon.stueveapeople  Thank you for the reply. Actually I want same format to be pasted, like the bullets used in input string or paragraph format.

Userlevel 2
Badge +6

@jon.stueveapeople  Thank you for the reply. Actually I want same format to be pasted, like the bullets used in input string or paragraph format.

Use simulate keystrokes, ctrl+c then ctrl+v

Userlevel 2
Badge +6

 

@jon.stueveapeople  Thank you for the reply. Actually I want same format to be pasted, like the bullets used in input string or paragraph format.

Okay, so you’re capturing the text with bullets, but plain text doesn’t have a bullet character, or the control your pasting into doesn’t recognize the formatted text, so it’s going with the plain unformatted text. A “Get” doesn’t capture the format of the control. So using Simulate Keystrokes may work, since the desktop’s cut and paste information may include the formatting you want.

Userlevel 1
Badge +3

Hi @Ani 2211,

The Set Text action in the recorder command is designed to set the contents of a control, replacing the previous content with the specified text. If you’re experiencing unexpected formatting when pasting the string, there are a couple of approaches you can try:

  1. Simulate Keystrokes:

    • Instead of directly using the Set Text action, consider using simulate keystrokes to achieve the desired format.
    • First, use Ctrl+C to copy the original string (including the formatting you want).
    • Then, use Ctrl+V to paste it into the target location.
    • This approach should retain the formatting you’ve specified.
  2. Check for Internal Delays:

    • If you’ve configured an internal delay for the Set Text action, it may inadvertently affect the formatting.
    • Ensure that there are no unnecessary delays or interactions that alter the pasted content.

Remember that the Set Text action will use the characters and strings you provide, including spaces and special characters. If your input string contains bullets or paragraph formatting, simulating keystrokes might be the best way to maintain the desired format.

Reply