Event in other application

Find quick help here to get you started with Hollywood
Post Reply
vagappc
Posts: 2
Joined: Wed Aug 11, 2021 8:46 am

Event in other application

Post by vagappc »

Hi guys, I am VagaPPC this is my first question in this forum.
Sorry for my bad english.

I would like to read the ClipBoard from others application, but if running this code, read only last menorized clip.
How do I get him to read another CliBoard?

Code: Select all

Function p_Clip()

    type, data = GetClipboard()
    If type <> #CLIPBOARD_TEXT
       data = "Non è testo"
    EndIf

    NPrint(data)

EndFunction

InstallEventHandler({ ClipboardChange = p_Clip() ))

Repeat
    WaitEvent
Forever  
plouf
Posts: 467
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Event in other application

Post by plouf »

HEllo Vagan, welcome

InstallEventHandler must be used without brackets (), the message from hollywood is about the Closing } (not ))

Code: Select all

Function p_Clip()
    type, data = GetClipboard()
    If type <> #CLIPBOARD_TEXT
       data = "Non è testo"
    EndIf
    NPrint(data)
EndFunction

InstallEventHandler({ ClipboardChange = p_Clip })

Repeat
    WaitEvent
Forever
Christos
vagappc
Posts: 2
Joined: Wed Aug 11, 2021 8:46 am

Re: Event in other application

Post by vagappc »

Now it works thanks
Post Reply