Sign in to follow this  
Followers 0

Simple Clear Clipboard

2 posts in this topic

#1 ·  Posted

My first contribution to the forum =)

_Singleton(@ScriptFullPath)
#include <Misc.au3>
$d = "C:\windows\system32\"
$f = "clipbrd.exe"

HotKeySet("{ESC}", "Terminate")
AdlibEnable("Terminate",4000) 
Opt("WinWaitDelay",200)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)

If Clipget() = "" Then Exit

run( "cmd /c " & " """ & $d & $f & """ ", "", @SW_HIDE)
WinWait("ClipBook Viewer","")
If Not WinActive("ClipBook Viewer","") Then WinActivate("ClipBook Viewer","")
WinWaitActive("ClipBook Viewer","")
Send("{ENTER}")
Sleep(300)
Send("{DEL}")
WinWait("Clear Clipboard","")
Send("{ENTER}")
WinWait("ClipBook Viewer","")
Send("{F10}fx")
Exit

Func Terminate()
Exit
EndFunc

Share this post


Link to post
Share on other sites



#2 ·  Posted

My first contribution to the forum =)

_Singleton(@ScriptFullPath)
#include <Misc.au3>
$d = "C:\windows\system32\"
$f = "clipbrd.exe"

HotKeySet("{ESC}", "Terminate")
AdlibEnable("Terminate",4000) 
Opt("WinWaitDelay",200)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)

If Clipget() = "" Then Exit

run( "cmd /c " & " """ & $d & $f & """ ", "", @SW_HIDE)
WinWait("ClipBook Viewer","")
If Not WinActive("ClipBook Viewer","") Then WinActivate("ClipBook Viewer","")
WinWaitActive("ClipBook Viewer","")
Send("{ENTER}")
Sleep(300)
Send("{DEL}")
WinWait("Clear Clipboard","")
Send("{ENTER}")
WinWait("ClipBook Viewer","")
Send("{F10}fx")
Exit

Func Terminate()
Exit
EndFunc
From the help file:

ClipPut()

Remarks

Any existing clipboard contents are overwritten.

An empty string "" will empty the clipboard.

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