Jump to content
PlatinumDruggie

AutoIt script to put text in the clipboard every X seconds.

Recommended Posts

PlatinumDruggie

I'm new to AutoIt, but i'm starting to unlock it's potentials. Can someone give me an example code that would put "/-" without quotations in the clipboard every X seconds?

Share this post


Link to post
Share on other sites
aa2zz6

You can use this to get msgs to clipboard --> ClipPut("/-") and use Send("^v") to paste on the application. I'll provide links so you can read more. If you don't understand, feel free to let us know :)

HotKeySet("{ESC}", "_Terminate")

While 1
    Run("notepad.exe")
    WinWaitActive("Untitled - Notepad")
    ClipPut("/-")
    Send("^v")
    Sleep(1000)
WEnd

Func _Terminate()
    Exit
EndFunc   ;==>_Terminate

https://www.autoitscript.com/autoit3/docs/functions/ClipPut.htm

https://www.autoitscript.com/autoit3/docs/keywords/While.htm

https://www.autoitscript.com/autoit3/docs/functions/Sleep.htm

  • Thanks 1

Share this post


Link to post
Share on other sites
PlatinumDruggie

Thanks a lot, I did not need it to open Notepad or anything, so just the CipPut command works great, thanks for the info, it is much appreciated.

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

×