Jump to content

Reaction to any change in the clipboard


ttt480
 Share

Recommended Posts

Now the script reacts to the presence of words in the clipboard

Global $sClip, $sCurClip, $sText = "text"

While 1
    $sClip = ClipGet()
    If $sClip <> $sCurClip Then
        If StringInStr($sClip, $sText) Then MsgBox(0, "", "TEXT !!!")
        $sCurClip = $sClip
    EndIf
    Sleep(250)
WEnd

How to make the script respond to any change in the clipboard ?

Link to comment
Share on other sites

Don't understand your question, what do you want to happen to changes in the clipboard, you had already shown how to respond to any changes in the clipboard, here is a slightly modified version.

Global $sClip, $sCurClip

While 1
    $sClip = ClipGet()
    If $sClip <> $sCurClip Then
        If IsString($sClip) Then
            MsgBox(4096, "Clip Info", $sClip)
            $sCurClip = $sClip
        EndIf
    EndIf
    Sleep(250)
WEnd

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...