Sign in to follow this  
Followers 0
krzyrice

auto copy/paste or typing

22 posts in this topic

Hi can any1 make me an autoit script that can type automatically or copy/paste a message non stop for a long time?

and between each message it would stop 2 seconds so its like "msg" wait 2 seconds "msg"

thx i would prefer copy/paste because thats faster

Share this post


Link to post
Share on other sites



um the tutorial doesnt tell me how to do wat i want to do

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

It's a really small request, so I thought I'd write you something quickly so you can learn from it:

#include <GuiConstants.au3> 

Dim $Start
HotKeySet("{F8}","Pause")
HotKeySet("{F9}","Start")

While 1 
    Sleep(50)
WEnd 

Func Start()
    $Start = NOT $Start
    If $Start Then ToolTip('Press (F8) to Pause',0,0)
    $start = TimerInit()
    While $Start
        If TimerDiff($start) > 2000 Then
            Send("{ENTER}")
            Sleep(50)
            Send("^v")
            Sleep(50)
            Send("{ENTER}")
            $start = TimerInit()
        EndIf
    WEnd
    ToolTip("")
EndFunc

Func Pause()
    ToolTip('Press (F9) to Start',0,0)
    While 1
        Sleep(50)
    WEnd
EndFunc

Controls:

F9 To Start

F8 To Pause

What it does:

Sends CTRL+V every 2 seconds

Kurt

Edited by _Kurt

Awaiting Diablo III..

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

thank you kurt

oh man i forgot something can you change that so like it does this:

ctrl+v...2 seconds

ctrl+v1...2 seconds

ctrl+v2....2 seconds

ctrl+v3....2 seconds

ctrl+v4....2seconds

ctrl+v5....2 seconds

ctrl+v6...2 seconds

ctrl+v7...2 seconds

ctrl+v8...2 seconds

ctrl+v9...2 seconds

ctrl+v1...2 seconds

and with a loop so i can go afk n it'll keep going

Edited by krzyrice

Share this post


Link to post
Share on other sites

oh man im sorry i forgot to add one more thing:

can u make it press enter before it does the ctrl+v and enter agen so itll b like:

enter ctrl+v...enter 2 seconds

enter ctrl+v1...enter 2 seconds

enter ctrl+v2....enter 2 seconds

enter ctrl+v3....enter 2 seconds

enter ctrl+v4....enter 2seconds

enter ctrl+v5....enter 2 seconds

enter ctrl+v6...enter 2 seconds

enter ctrl+v7...enter 2 seconds

enter ctrl+v8...enter 2 seconds

enter ctrl+v9...enter 2 seconds

enter ctrl+v1...enter 2 seconds

Share this post


Link to post
Share on other sites

oh man im sorry i forgot to add one more thing:

can u make it press enter before it does the ctrl+v and enter agen so itll b like:

enter ctrl+v...enter 2 seconds

enter ctrl+v1...enter 2 seconds

enter ctrl+v2....enter 2 seconds

enter ctrl+v3....enter 2 seconds

enter ctrl+v4....enter 2seconds

enter ctrl+v5....enter 2 seconds

enter ctrl+v6...enter 2 seconds

enter ctrl+v7...enter 2 seconds

enter ctrl+v8...enter 2 seconds

enter ctrl+v9...enter 2 seconds

enter ctrl+v1...enter 2 seconds

Your syntax is not correct, but the answer is yes:

ControlSend('Apps window name/handle', '', 'ControlID/ClassNameNN', '{ENTER}^v{ENTER}')

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Edited script above

Kurt

Edited by _Kurt

Awaiting Diablo III..

Share this post


Link to post
Share on other sites

It's a really small request, so I thought I'd write you something quickly so you can learn from it:

...

So, who do you think learned the most. You or @krzyrice?...:)

Share this post


Link to post
Share on other sites

So, who do you think learned the most. You or @krzyrice?...:)

Well I thought he'd study the example and see how it works. Well I guess I was wrong, since he doesn't know how to send ENTER and didn't bother to consult the helpfile.

Kurt


Awaiting Diablo III..

Share this post


Link to post
Share on other sites

@_Kurt: I think so to. But you were wrong for the right reasons. So kudos and well done to you for that...:)

Share this post


Link to post
Share on other sites

actually i did try the help file didnt learn much from it and well i did learn a lil from ur script cuz i tried to make it do

ctrl+v

ctrl+v1

but iono doesnt seem to b workin

Share this post


Link to post
Share on other sites

actually i did try the help file didnt learn much from it and well i did learn a lil from ur script cuz i tried to make it do

ctrl+v

ctrl+v1

but iono doesnt seem to b workin

In the example I showed, did I use ctrl? Also, what is v1? Look at Send() in the help file to learn how to use the proper syntax.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

i didnt use your example i used the one kurt gave because it was simpler

and ctrl+v is the copy/paste thing and the 1 after is so that a it types a one after ctrl+v then presses enter

Share this post


Link to post
Share on other sites

any idea how to do that? i tried possibly everythin i could think of

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

any idea how to do that? i tried possibly everythin i could think of

What part of Read the help file under Send are you not understanding.

It will show you proper syntax to use. (Just because something looks simple, it isn't always the right answer (and vice versa)).

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

DUDE YOU THINK I DIDNT DO THAT??? damm man i fuccin did but whatever i put it just does the ctrl+v and nothing else

Share this post


Link to post
Share on other sites

DUDE YOU THINK I DIDNT DO THAT??? damm man i fuccin did but whatever i put it just does the ctrl+v and nothing else

With that attitude, I doubt anyone would even consider helping you. Smoke was just telling you to read the helpfile since it has everything you're looking for. Him and others take their time to help people that need it, not people who are too lazy to look up something in the helpfile. So please, read over the helpfile and stop wasting our time. I gave you a perfect example of what you needed, and I regret it because you are being an asshole, well we might aswell make it a spoiled asshole since I gave you exactly what you needed and you asked for more.

Kurt

PS: If you still did not catch on, READ THE HELPFILE.


Awaiting Diablo III..

Share this post


Link to post
Share on other sites

DUDE YOU THINK I DIDNT DO THAT??? damm man i fuccin did but whatever i put it just does the ctrl+v and nothing else

Then post the code you have tried out. It will help the rest of us to spot your problem area. So fare you have only asked people to do your work for you.

Share this post


Link to post
Share on other sites

With that attitude, I doubt anyone would even consider helping you. Smoke was just telling you to read the helpfile since it has everything you're looking for. Him and others take their time to help people that need it, not people who are too lazy to look up something in the helpfile. So please, read over the helpfile and stop wasting our time. I gave you a perfect example of what you needed, and I regret it because you are being an asshole, well we might aswell make it a spoiled asshole since I gave you exactly what you needed and you asked for more.

Kurt

PS: If you still did not catch on, READ THE HELPFILE.

additude??? i aint givin no attitude im just sayin i read over whatever about the send thing in helpfile already and it doesnt work so far ive tried this:

Send("^v1")

Send("1^v")

Send("1""^v")

Send("^v" 1)

all give the same result just a normal copy/paste

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
Sign in to follow this  
Followers 0