thandong19

Copy and Paste data by typing it

7 posts in this topic

#1 ·  Posted

Hi everyone,

I hope I can make myself clear because English is not my native language.

Basically I need to Copy using the key " Ctrl+C" a text such as " 21042017" and Paste using the key " Ctrl +P"  but the Pasting Process should work like each letter is typed in.

The process should be 

1. Copy text to clip board

2. Get the text string from clipboard

3. Split the string

4. Send the string 

Can anyone give me the code in Autoit ? Thank you

Share this post


Link to post
Share on other sites



#2 ·  Posted

19 minutes ago, thandong19 said:

Can anyone give me the code in Autoit ? Thank you

Nah ... doesn't work like that unless you are prepared to pay $200 per hour. ;)

You already have the steps listed so what have you tried and found out already by opening the helpfile?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted

11 minutes ago, Jos said:

Nah ... doesn't work like that unless you are prepared to pay $200 per hour. ;)

You already have the steps listed so what have you tried and found out already by opening the helpfile?

Jos

Thank you for your reply. I have the following code :

$sData = ClipGet() ; Display the data returned by ClipGet.
$aArray = Stringsplit($sData,"")
For $i = 1 To $aArray[0] ; Loop through the array returned by StringSplit to display the individual values.
        Send($aArray[$i])
     Next

 

Share this post


Link to post
Share on other sites

#5 ·  Posted

3 minutes ago, Jos said:

That looks like a good start. So what is the issue?

Jos

Thank you Jos, my issue is after I run the code, the word immediately appear in the coding window. Is it possible to assign a hot key to delay and make those letter appeared in my intended program ?

Share this post


Link to post
Share on other sites

#6 ·  Posted

How long do you want between 2 characters? When this is a fix pause you simply add a Sleep(xxxx) after the Send() command. xxxx is time to pause in miliseconds.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#7 ·  Posted

Solve it, thank you Jos

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now