This is one of those pointless scripts that I have just done for a lab tech who is using an old PC and cutting / pasting lots large memory items in various apps. He needed something to clear the clipboard mem as sometimes it was pasting the wrong information.
After much googling we spotted that someone just opens up notepad, hits the spacebar and then copies the single character to the clipboard. It worked for him, and the lab tech so I just automated the process for him.
Written in AutoIT - compile and change what you want - if you ever feel you have the need for such a thing !!
Code:; AutoIt Version: 3.2.0.1 ; Language: English ; Platform: WinXP ; Author: Matt ***** - ******@st-johns.org.uk ; Script Function: Clipboard Eraser ; Version: 0.5 Beta ; Date: Nov 2007 #include <GUIConstants.au3> $Form1 = GUICreate("ClipBoard Clearer", 220, 110, 348, 309) $helpmenu = GUICtrlCreateMenu("Help") $infoitem = GUICtrlCreateMenuitem("About", $helpmenu) GUISetBkColor(0x0066FF) $Button1 = GUICtrlCreateButton("Clear Clipboard", 10, 20, 89, 49, $BS_DEFPUSHBUTTON) $Button2 = GUICtrlCreateButton("Spare Button", 120, 20, 89, 49, $BS_DEFPUSHBUTTON) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $Button1 Run('c:\windows\notepad.exe', 'c:\windows') WinWait('Untitled - Notepad') Send('{space}') Sleep(1000) Send('^a') Sleep(1000) Send('^c') Sleep(1000) Send('!{F4}') WinWait('Notepad') Send('!n') MsgBox(0, "Clipboard Clearer", "Clipboard is now clear") Case $nMsg = $Button2 MsgBox(64, "Spare Button", "This button does not do anything.") Case $nMsg = $infoitem MsgBox(0, "Clipboard Clearer 0.5 Beta", "Written By **** *****." & @CRLF & "Comments & Suggestions to:" & @CRLF & "******@st-johns.org.uk") EndSelect Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
There are currently 1 users browsing this thread. (0 members and 1 guests)