Jump to content

Faster way to "print" a variable than SEND?


mohenly
 Share

Recommended Posts

I'm a couple of hours into using AutoIt so, bearing that in mind...

When I use the Send($string, 1) command to put the contents of a string variable into a form, it's doing so one character at a time, as though it was being entered with a keyboard.

Is there a faster way to do this -- i.e., to enter the entire string in one go?

Thanks.

Edited by mohenly
Link to comment
Share on other sites

This is the fastest way.

$var = "Some text you want to send..."
$backup = ClipGet()  ;save previous content of clipboard
ClipPut($var)    ;Put contents of variable in the clipboard
Send("^v")  ;Send Ctrl+V
Edited by SlimShady
Link to comment
Share on other sites

  • Developers

could also try to set the following to see if that helps (default=5):

Opt("SendKeyDelay", 1)
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

This is the fastest way.

$var = "Some text you want to send..."
$backup = ClipGet() ;save previous content of clipboard
ClipPut($var)   ;Put contents of variable in the clipboard
Send("^v") ;Send Ctrl+V

<{POST_SNAPBACK}>

Thanks Slim (and JdeB). That makes all the difference!
Link to comment
Share on other sites

if you use the clipget stuff you can mess up the users clip board if they have somthing important in it

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

if you use the clipget stuff you can mess up the users clip board if they have somthing important in it

<{POST_SNAPBACK}>

; Program Start
$prevclip = Clipget()
While 1
   Sleep (10)
Wend
ClipPut($prevclip)
Exit
; Program End

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...