Jump to content
Sign in to follow this  
tschitscho

Paste Text

Recommended Posts

tschitscho

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

Share this post


Link to post
Share on other sites
Thatsgreat2345

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

Share this post


Link to post
Share on other sites
Xenobiologist

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

Share this post


Link to post
Share on other sites
tschitscho

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

Share this post


Link to post
Share on other sites
Valuater

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

Share this post


Link to post
Share on other sites
tschitscho

is it possible to enter the + (plus) sign in the text?

Share this post


Link to post
Share on other sites
slightly_abnormal

is it possible to enter the + (plus) sign in the text?

send("{lCTRL}+=")

the other way is confusing..

send("+=")
Edited by slightly_abnormal

Share this post


Link to post
Share on other sites
Xenobiologist

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

Share this post


Link to post
Share on other sites
slightly_abnormal

heh :think:

i didnt look far enough on the help file.

Edited by slightly_abnormal

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  

×