Check clipboard then auto copy text to Notepad.
Check clipboard then auto copy text to Notepad.
API Declarations
-->
You Need: Command button with name Command1 & Text Box with name Text1 containing some text.
* Paste code in the button (To check for images by pressing Printscreen on keyboard)
Rate Check clipboard then auto copy text to Notepad.
(2(2 Vote))
'Contact: [email protected]
'
'FIRST CHECK IF CLIPBOARD IS EMPTY.
'
'Text in clipboard.
If Clipboard.GetText = "" Then 'Text from the clipboard is pasted in text1.text
Else
If MsgBox("Delete existing text in clipboard ?", vbYesNo + vbDefaultButton2 Or vbExclamation, "Clipboard Contents") = vbYes Then
Clipboard.Clear 'Clear clipboard.
GoTo SendToNotepad:
End If
Exit Sub
End If
'
'Image in clipboard.
If Clipboard.GetData Then 'If the data in the clipboard is a picture then it is pasted in pciture1.picture
If MsgBox("Delete existing image in clipboard ?", vbYesNo + vbDefaultButton2 Or vbExclamation, "Clipboard Contents") = vbYes Then
Clipboard.Clear 'Clear clipboard.
GoTo SendToNotepad:
End If
Exit Sub
End If
'
SendToNotepad:
'
Clipboard.Clear
Clipboard.SetText Text1.Text
Shell "notepad", 1
SendKeys "^V"
'
End Sub
Check clipboard then auto copy text to Notepad. Comments
No comments yet — be the first to post one!
Post a Comment