I have used the "sendtext" function to add text to a field on a website, however, I noticed the text file is not completely added despite the web form having space. Only 5 % of the text gets added. I even added a significant delay to ensure that the text function had sufficient time to input the text...
any help is appreciated.
Amount of text in file: approx. 100 words
type of file on desktop: txt file.
Entering text into a form from a txt file.... text is truncated?
Moderators: JRL, Dorian (MJT support)
-
- Junior Coder
- Posts: 20
- Joined: Wed Jul 31, 2019 9:38 am
- Grovkillen
- Automation Wizard
- Posts: 1132
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Entering text into a form from a txt file.... text is truncated?
Have you added delay inn the send text command (I.e. key delay)?
-
- Junior Coder
- Posts: 20
- Joined: Wed Jul 31, 2019 9:38 am
Re: Entering text into a form from a txt file.... text is truncated?
Please elaborate. Thank you.Grovkillen wrote: ↑Mon Sep 30, 2019 4:15 amHave you added delay inn the send text command (I.e. key delay)?
-
- Junior Coder
- Posts: 20
- Joined: Wed Jul 31, 2019 9:38 am
Re: Entering text into a form from a txt file.... text is truncated?
I figured it out and it worked.Grovkillen wrote: ↑Mon Sep 30, 2019 4:15 amHave you added delay inn the send text command (I.e. key delay)?
Added the line:
Let>SK_Delay=25
before the
SendText>myText2 line
-
- Junior Coder
- Posts: 20
- Joined: Wed Jul 31, 2019 9:38 am
- Dorian (MJT support)
- Automation Wizard
- Posts: 1414
- Joined: Sun Nov 03, 2002 3:19 am
Re: Entering text into a form from a txt file.... text is truncated?
I have another workaround for you on this.
Sometimes the performance of the target app can be a real issue. I've seen apps or forms that wouldn't accept all the characters unless SK_delay was in the region of 400.
This is a problem when some web forms won't accept the usual methods of using any Macro Scheduler Native IE function, so it has to be typed text
In these cases I use PutClipboard to put the data into the the clipboard, and then use CTRL-V to paste it. This allowed me to type very long string in a fraction of a second. Of course, you still have to make the script click in the right place, unlike using the IE commands, so this is only for those instances when we need to send text.
I used Gosub to reduce repetition.
It went something like this :
*All "waits" in the above script can be edited or omitted. Trial and error -sometimes we need them, sometimes we don't. 
Sometimes the performance of the target app can be a real issue. I've seen apps or forms that wouldn't accept all the characters unless SK_delay was in the region of 400.
This is a problem when some web forms won't accept the usual methods of using any Macro Scheduler Native IE function, so it has to be typed text
In these cases I use PutClipboard to put the data into the the clipboard, and then use CTRL-V to paste it. This allowed me to type very long string in a fraction of a second. Of course, you still have to make the script click in the right place, unlike using the IE commands, so this is only for those instances when we need to send text.
I used Gosub to reduce repetition.
It went something like this :
Code: Select all
//Pseudo get data code
XLGetCell>XLBookHandle,SheetName,Row,Col,Result
//Put it in the clipboard
Put>Result
//Click in the desired location (use whatever method suits the scenario
MouseMove>100,100
lClick
Wait>0.1
Gosub>Paste
SRT>Paste
Press CTRL
Wait>0.05
Send>V
Wait>0.05
Release CTRL
END>Paste
