Variable Rectangle Sizing

Hello,

I’m struggling with validating text using the ReadText function. I’m pulling a value from a database. The value can vary in length and can contain spaces or hyphens.

I’m using a search rectangle to validate the value but the position of the bottom right hot spot will sometimes truncate but other times include text to the right of the target text which should be excluded depending on the length of the text.

Is there a better function to use or a way to account for the variability of the text length?

Thanks

Hey Bill,

You can use the Readtext with a point as well.

put Readtext([100,100]) into myVar

It will read the text till end of line.

Another option is (if you can select the text

  • Highlight the text and use copy + paste via Keyboard shortcuts and access the remote clipboard
Click text:"MyDatabaseCell" # use a text, location or text
typetext Controlkey + "a" # select all content
Typetext Controlkey + "c" # copy selection into clipboard
put remoteclipboard() into Myvar # put clipboard content into a variable
put myvar # print variable

Cheers,
Karsten

Thanks! Let me see if I can use on those suggestions.