[Bug] not selecting text partially on Windows 10 ? - SOLVED

Discuss RoboTask here
Post Reply
snowseals
Posts: 59
Joined: Mon Apr 11, 2016 10:17 am

[Bug] not selecting text partially on Windows 10 ? - SOLVED

Post by snowseals »

I think I found a bug in the macrorecorder of RT on the Windows 10 platform.

When I record to select a text partially on Windows 7 (7601), all works fine.
When I do the same on Windows 10 (1909); tried 2 totally different PC's, it won't select.

See video example on Win7 (Robotask will select text partially): https://i.imgur.com/JbMemtg.mp4
See video example on Win10 (Robotask won't select text partially): https://i.imgur.com/6J7YoG9.mp4

Tested with Robotask 7.0 and 7.6.
Attached the .tsk files.
Attachments
testing select with mouse tsk [win7 + win10].zip
(2.08 KiB) Downloaded 1009 times
Last edited by snowseals on Thu Sep 30, 2021 1:55 pm, edited 1 time in total.
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: [Bug] not selecting text partially on Windows 10 ?

Post by Oleg »

We'll investigate the problem.
Try to select text by using keyboard: Shift+Left - select symbol before cursor
Also look at my example, it works
The task selects some symbols from the text in Notepad window

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|444033236
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task177"
Hide=INTEGER|0
ID=INTEGER|458847361
LogOnAsUser=INTEGER|1
Name=STRING|"Select and copy text from Notepad"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER

[Actions\Action1]
ActionID=STRING|"A_MISC_COMMENT"
Enabled=INTEGER|-1
Name=STRING|"//Begin of MacroRecoder block"
Params=FOLDER

[Actions\Action1\Params]
=STRING|""
comment=STRING|"Begin of MacroRecoder block"

[Actions\Action2]
ActionID=STRING|"A_MOUSE_MOVETO"
Enabled=INTEGER|-1
Name=STRING|"Move To Object"
Params=FOLDER

[Actions\Action2\Params]
bottom=STRING|"541"
controlclass=STRING|"Edit"
ctrlclassexact=STRING|"0"
ctrltextexact=STRING|"1"
left=STRING|"0"
right=STRING|"668"
top=STRING|"0"
winclassexact=STRING|"0"
windowclass=STRING|"Notepad"
windowtext=STRING|"- Notepad"
wintextexact=STRING|"0"
x=STRING|"566"
y=STRING|"8"

[Actions\Action3]
ActionID=STRING|"A_MOUSE_CLICK"
Enabled=INTEGER|-1
Name=STRING|"Click button"
Params=FOLDER

[Actions\Action3\Params]
=STRING|""
action=STRING|"0"
button=STRING|"0"

[Actions\Action4]
ActionID=STRING|"A_GENERAL_PAUSE"
Enabled=INTEGER|-1
Name=STRING|"Delay"
Params=FOLDER

[Actions\Action4\Params]
=STRING|""
delay=STRING|"6"

[Actions\Action5]
ActionID=STRING|"A_MOUSE_MOVETO"
Enabled=INTEGER|-1
Name=STRING|"Move To Object"
Params=FOLDER

[Actions\Action5\Params]
bottom=STRING|"541"
controlclass=STRING|"Edit"
ctrlclassexact=STRING|"0"
ctrltextexact=STRING|"1"
left=STRING|"0"
right=STRING|"668"
top=STRING|"0"
winclassexact=STRING|"0"
windowclass=STRING|"Notepad"
windowtext=STRING|"- Notepad"
wintextexact=STRING|"0"
x=STRING|"577"
y=STRING|"10"

[Actions\Action6]
ActionID=STRING|"A_MOUSE_CLICK"
Enabled=INTEGER|-1
Name=STRING|"Click button"
Params=FOLDER

[Actions\Action6\Params]
=STRING|""
action=STRING|"0"
button=STRING|"0"

[Actions\Action7]
ActionID=STRING|"A_GENERAL_PAUSE"
Enabled=INTEGER|-1
Name=STRING|"Delay"
Params=FOLDER

[Actions\Action7\Params]
=STRING|""
delay=STRING|"12"

[Actions\Action8]
ActionID=STRING|"A_GENERAL_SENDKEYS"
Enabled=INTEGER|-1
Name=STRING|"Send keys to current window"
Params=FOLDER

[Actions\Action8\Params]
=STRING|""
currentwindow=STRING|"1"
fixedwindow=STRING|"0"
keylayout=STRING|"0"
keys=STRING|"""+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT})+({LEFT}){DELAY 563}^(c){DELAY 765}{END}{DELAY 750}{ENTER}{DELAY 578}^(v)"""
pause=STRING|"40"
release=STRING|"1"
sendkind=STRING|"0"
wincaption=STRING|"Notepad"

[Actions\Action9]
ActionID=STRING|"A_MISC_COMMENT"
Enabled=INTEGER|-1
Name=STRING|"//End of MacroRecoder block"
Params=FOLDER

[Actions\Action9\Params]
=STRING|""
comment=STRING|"End of MacroRecoder block"
Oleg Yershov
snowseals
Posts: 59
Joined: Mon Apr 11, 2016 10:17 am

Re: [Bug] not selecting text partially on Windows 10 ?

Post by snowseals »

Sure, with real plain text in Notepad for example, I could use Shift+Left to select certain symbols.
However, this was just a simple test scenario, what is going wrong.

Eventually where I've been using this feature for is like this video example: https://i.imgur.com/RNrg2Cz.mp4

...I can't simply select the part €1000x, since they made this whole entry clickable.
So hence I select the whole text, where I end up with the amount of money, which will be copied to my Word document.


This worked fine on Windows 7....
Until I made the switch to Win10.
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: [Bug] not selecting text partially on Windows 10 ?

Post by Oleg »

You can use such trick:
- click mouse on necessary position
- Hold SHIFT key
- click mouse on another position
- Release SHIFT key.

You can see that the text has been selected between 1-st and 2-nd position.

The problem is that macro-recorder can't record holding of SHIFT key as yet. We'll try to correct this.
But now you can add these actions manually. Use Shift Keys State action
I tried this, it works under Windows 10
Oleg Yershov
snowseals
Posts: 59
Joined: Mon Apr 11, 2016 10:17 am

Re: [Bug] not selecting text partially on Windows 10 ?

Post by snowseals »

The problem with this method, is that it will CLICK on the end of the process.
And since they made it clickable, a pop up appears....
which I then have to click away again, to make it disappear.

See video example: https://i.imgur.com/jahJmZA.mp4

A Release Button > Button Release won't cut it at the moment; I had to change the value to Button Click, as you mentioned.

Image
snowseals
Posts: 59
Joined: Mon Apr 11, 2016 10:17 am

Re: [Bug] not selecting text partially on Windows 10 ?

Post by snowseals »

The problem is that macro-recorder can't record holding of SHIFT key as yet. We'll try to correct this.
Do note, macro-recorder does record holding of SHIFT key on Windows 7.
It just won't record it on Windows 10.

Can you let me know if you will add this for Windows 10 too?
Otherwise, I'll have to change approx. 8 scripts, with the new Shift State Key method...
And then prolly add more click away recordings, which seems alot of work.
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: [Bug] not selecting text partially on Windows 10 ?

Post by Oleg »

The problem is that macro-recorder can't record holding of SHIFT key as yet. We'll try to correct this.
But now you can add these actions manually. Use Shift Keys State action
I tried this, it works under Windows 10
Try to put some pause after Local move step and before release mouse button (300-500 ms)
In this case you can select text by using mouse under windows 10. This algorithm works on Windows 7 without pause.
look at the screenshot
pause-after-localmove.png
pause-after-localmove.png (10.79 KiB) Viewed 13165 times
We'll improve macro-recorder.
Oleg Yershov
snowseals
Posts: 59
Joined: Mon Apr 11, 2016 10:17 am

Re: [Bug] not selecting text partially on Windows 10 ?

Post by snowseals »

Thanks Oleg!
Try to put some pause after Local move step and before release mouse button (300-500 ms)
In this case you can select text by using mouse under windows 10.
Justed test 1 recording, by adding the delay (and Release Button set to Release) and works fine on Win10 \o/
Post Reply