Sign in to follow this  
Followers 0
CyberSlug

Some Cyberslug Scraps

2 posts in this topic

; A collection of clipboard utilities.
; 8 March 2004 - CyberSlug
;
; I assume that Ctrl+C and Ctrl+V perform Copy and Paste, respectively,
;    in the active application.
; Note:  The only reason for 'Send("{ShiftDown}{ShiftUp}")'
;    is to prevent a potential bug caused by running AutoSense 1.0....

HotKeySet("^+c", "append")  ;Ctrl+Shift+C
HotKeySet("^+v", "replace") ;Ctrl+Shift+V
HotKeySet("^+x", "clear")   ;Ctrl+Shift+X

While 1
   sleep(100)
WEnd


;--------------------------------------------------
; Clipboard "Append" Utility
; Appends linefeed plus selected text to clipboard.
;--------------------------------------------------
Func append()
   Send("{ShiftDown}{ShiftUp}") ;clear the Shift state [optional]

   Local $contents = ClipGet()
   
   Send("^c")
   
   If $contents <> "" Then ClipPut( $contents & @CRLF & ClipGet() )
EndFunc


;-------------------------------------------
; Clipboard "Replace" Utility
; Swap higlighted text with clipboard text.
;-------------------------------------------
Func replace()
   Send("{ShiftDown}{ShiftUp}") ;clear the Shift state [optional]

   Local $itemOne = ClipGet()

   Send("^c")
   Local $itemTwo = ClipGet()

   ClipPut($itemOne)
   Send("^v")

   ClipPut($itemTwo)
EndFunc


;--------------------------------------------------
; Clipboard "Clear" Utility
; Clear the clipboard and free up memory!
;--------------------------------------------------
Func clear()
   ClipPut("")
EndFunc


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites



I love reading old topics :shocked:

i542


I can do signature me.

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