[snippet=]
// Control speed of printing the clipboard
Let>delay=.5
Getclipboard>clipboard
Let>clipboard_size={length(%clipboard%)}
Let>iterator=0
While>iterator<%clipboard_size%
let>SK_IGNORECAPS=1
Let>clipboard_text={copy(%clipboard%,%iterator%,1)}
sendtext>%clipboard_text%
let>iterator=iterator+1
Wait>%delay%
endwhile
[/snippet]
One of the most irritating things on the Internet is not being able to fill out web forms because they disable the paste functionality. This is my workaround, but there is something wrong when the clipboard begins with the character 0.
Rephrased, if you copy 01234 to the clipboard, it registers string length 4 in the debug! And sure enough, when it prints the characters, it omits 0.
Using an input of 1234 does not produce the same effect and registers the same length of 4.
Is this a bug? I'm including screenshots. MCS 15, Windows 10.
Iterating through a string beginning with character '0'
Moderators: Dorian (MJT support), JRL
- Dorian (MJT support)
- Automation Wizard
- Posts: 1359
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Iterating through a string beginning with character '0'
Try this :
Also, just in case you're not aware and in case this helps, you can set a SendText character delay (in milliseconds) with sk_delay.
Code: Select all
putclipboard>01234
// Control speed of printing the clipboard
Let>delay=.5
Getclipboard>clipboard
len>clipboard,clipboard_size
Let>iterator=0
While>iterator<%clipboard_size%
let>SK_IGNORECAPS=1
let>iterator=iterator+1
MidStr>clipboard,%iterator%,1,clipboard_text
sendtext>%clipboard_text%
Wait>%delay%
endwhile
Code: Select all
putclipboard>01234
getclipboard>clipboard
let>sk_delay=500
send>%clipboard%
Yes, we have a Custom Scripting Service. Message me or go here
Re: Iterating through a string beginning with character '0'
Thanks, that works.