Sign in to follow this  
Followers 0
Grantson

sending blocks of text

4 posts in this topic

Hi

Im piecing together a little app that when a button is clicked will dump a paragraph of text into an open telnet session

I know I can use the send function to send it a keystroke at a time or use ClipPut() to dump it tot eh clipboard then send ctrl V to paste it but would rather not use this as it would overwrite anything currently in the clipboard

is there another method of doing this ?

thanks

Grant

Share this post


Link to post
Share on other sites



ControlSetText() if it was a control, but im doubting it is if your telneting.

Try something like...

$text = "Your large block of text goes here"

$clipboard = ClipGet(); get current clipboard data

ClipPut($text) ; put your large block to clipboard
Send("CTRL+V") ; or controlsend() ; send to telent session
ClipPut($clipboard) ; replace clipboard as if nothing happend.

S


They call me MrRegExpMan

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Something like this maybe

Func _PasteText($SText)
    $var = ClipGet()
    ;code to gety your text
    ;code to send text to telnet
    ClipPut($var)
EndFunc

Edit: beaten to it.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Thanks :(

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