Jump to content

Paste Text


Recommended Posts

Hi there

i need a script which pastes a text from the clipboard into a running program when i press a key (like F7). Maybe it works over the clipboard (when needed)

The text looks like this: "text (Timestamp)"

thats all

how can i do this?

Thank you

Link to comment
Share on other sites

ummm ok... kinda get it

hotkeyset("{f7}","get")
hotkeyset("{esc}","quit")
while 1
sleep(100)
wend

func get()
$clipboard = Clipget()
send($clipboard)
EndFunc

func quit()
    Exit
    EndFunc

his is better i just like to use variables :think:

Edited by thatsgreat2345
Link to comment
Share on other sites

Hi,

HotKeySet("{F7}", "put")

While 1

Sleep(50)

WEnd

Func put()

Send(ClipGet())

EndFunc

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Thaks for the fast replies

My script looks like this now:

#include <Date.au3>

hotkeyset("{f7}","get")

hotkeyset("{esc}","quit")

while 1

sleep(100)

wend

func get()

;$timestamp = _Now()

$timestamp = @MDAY & "." & @MON & "." & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC

$clipboard = "(texttext, " & $timestamp & ")"

send($clipboard)

EndFunc

func quit()

Exit

EndFunc

Link to comment
Share on other sites

maybe

HotKeySet("{f7}", "get")
HotKeySet("{esc}", "quit")
While 1
    Sleep(100)
WEnd

Func get()
    
    $timestamp = @MDAY & "." & @MON & "." & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC
    
    $text = ClipGet()
    
    $clipboard = $text & ", ( " & $timestamp & " )"
    Send($clipboard)
EndFunc  ;==>get

Func quit()
    Exit
EndFunc  ;==>quit

8)

NEWHeader1.png

Link to comment
Share on other sites

  • 2 weeks later...

HI,

or did you mean this.

Send("{+}")

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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