On Thursday 04 March 2004 19:58, Miles Stevenson wrote: > Anyone know how use the notify() dcop call for knotify? I'm not sure what > the function is expecting for the "event" and "fromApp" arguments. Tried a > few guesses, but didn't get the exepcted results. > > I ask because I'd like to call knotify through dcop using shell scripts. > I've seen this question asked before on the list but no responses. Google > hasn't been much help either. for examplelike this: dcop --user kevin knotify default notify "" "" "Message" "sound.wav" "" 3 2 the last number changes the notification level, the number before is the notifcation type. In the example 3 means message box and sound (1 + 2) and 2 means warning. See the definition in knotifyclient.h (below the declaration of the Instance class) http://tinyurl.com/28sws If you know the window ID of a running application, you can even use passive popup, like KMail can do for "new mail" messages. dcop knotify default notify "" "" "test" "" "" 16 1 39845930 16 means passive popup, 39845930 is the decimal window ID This is highly theoretical as it isn't easy to get the window ID in a script. I think the fromApp parameter, where I used just an empty string, can be used to have this applications Icon in the message. Cheers, Kevin -- Kevin Krammer <kevin.krammer@xxxxxx> Qt/KDE Developer, Debian User www.mrunix.de - Unix/Linux programming forum www.qtforum.org - Qt programming forum
Attachment:
pgp00144.pgp
Description: signature
___________________________________________________ . Account management: https://mail.kde.org/mailman/listinfo/kde. Archives: http://lists.kde.org/. More info: http://www.kde.org/faq.html.