Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 1.15 KB

clipboard-plaintext-copy-plaintext-to-clipboard-clipput-autoit.md

File metadata and controls

43 lines (31 loc) · 1.15 KB

Clipboard Plaintext; Copy Plaintext to Clipboard; ClipPut(); AutoIt

AutoIt: Put plaintext in clipboard using Ctrl + Shift + C.

#include <GuiConstantsEx.au3>

; AutoIt Code: http://www.autoitscript.com/
$gui = GUICreate('', 500, 300, 0, 0)

; input that will receive richtext clipboard data
$input_clipboard = GuiCtrlCreateInput('my hidden input', 0, 0, 0, 0)

; copy plaintext to clipboard: ctrl+shift+c (normal copy to clipboard ctrl+c)
HotKeySet('^+c', 'ClipPutPlainText') ; ctrl+shift+c

; replaces richtext in clipboard with plaintext
Func ClipPutPlainText()
	; set input value to whatever is currently in clipboard
	GUICtrlSetData($input_clipboard, ClipGet())
	; put plaintext data in clipboard
	ClipPut(GUICtrlRead($input_clipboard))
EndFunc

While 1
	$msg = GUIGetMsg()
	Switch $msg
		Case $GUI_EVENT_CLOSE
			Exit
	EndSwitch
WEnd

This script basically does the same thing as pasting your clipboard into notepad and then copying it back into the clipboard.

More useful hotkeys: http://authoitkey.googlecode.com/


Posted Feb 20, 2009.

https://www.darklaunch.com/2009/02/20/clipboard-plaintext-copy-plaintext-to-clipboard-clipput-autoit.html