Jump to content

Better paste?


Recommended Posts

Topic says it all. Im trying to learn autoit and right now im wanting to learn how to send data around thats in the clipboard.

Right now the paste function Send("^v") is what i use to put data into a window or something to get the data from the clipboard. The problem is that alot of times it wont paste and missess or something. I dont know.

Can anyone recommend better code for such an action?

Link to comment
Share on other sites

Use FileWrite()

********************

!TAKEN FROM HELP FILE!

$file = FileOpen("test.txt", 1)

; Check if file opened for writing OK
If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf

FileWrite($file, "Line1")
FileWrite($file, "Still Line1" & @CRLF)
FileWrite($file, "Line2")

FileClose($file)

It works great, and the file does not have to be open, it does it by itself. PM if you need a more in depth description of that.

:) Good luck!

Edited by mysterious

[center]Class... Now in session ( Thanks to Valuater )Not much more you need to know. ^_^[/center]

Link to comment
Share on other sites

Use FileWrite()

********************

!TAKEN FROM HELP FILE!

$file = FileOpen("test.txt", 1)

; Check if file opened for writing OK
If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf

FileWrite($file, "Line1")
FileWrite($file, "Still Line1" & @CRLF)
FileWrite($file, "Line2")

FileClose($file)

It works great, and the file does not have to be open, it does it by itself. PM if you need a more in depth description of that.

:) Good luck!

Thanks that seems like it will fix writing directly to a file.

What Im trying to do is write to differant windows. Like say paste a website to my

broswer, or open my aim and paste something to a window where im chatting to a friend. Im not sure writing to a file could help with that.

Link to comment
Share on other sites

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...