Jump to content

Event Handler - not catching events


Recommended Posts

I know the Event Handler is ancient and essentially unsupported. But I'm trying to make it work with a custom script. But I can't even get the basics to work.

 

I have the following script:

 

---

display dialog "This works" --a test to confirm the handler launches

 

on scriptStart given scriptName:theScript, startDate:theDate

display dialog "This doesn't work"

end scriptStart

---

 

Saved as an application "Retrospect Event Handler" in the right folder. I've removed the .app extension. The handler app launches when it's supposed to; I see the icon in the dock, and the first line of the script causes the "This works" dialog to pop up. But when I start a script, the scriptStart event isn't triggered; that dialog never appears. I have other commands in scriptStart which also don't work.

 

Obviously I want to do more than display dialogs, but if I can't catch the events there's little else I can do. I've had the same lack of success with serverStart and retrospectQuit.

 

This is on a MacPro, OS X Server 10.4.7, and Retrospect Server 6.1.126.

 

Any suggestions appreciated. Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

Copying from the example worked for me. Thanks for the tip on removing the .app extension, =)

 

 

on scriptStart given scriptName:theScript, startDate:theDate

activate

set dialogResult to display dialog ¬

"scriptStart:" & return & return & "Retrospect script “" & theScript & "” is starting on " & theDate ¬

buttons {"Skip", "OK"} default button "OK"

return button returned of dialogResult is "OK"

end scriptStart

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...