On Idle script never runs?

I am writing a script for which I need to regulaly check the status of iTunes and report it back to the user interface, currently I have the user interface working and the information will feed back if I click a button to update the information. However I want to triger the event without having to constantly click a button.

The best way to do this would seem to be by using for example;

on idle theObject
return 2
end idle

on GetTheInfo
end GetTheInfo

Unfortunatly this code never executes, I am following apples example countdown application as closly as I can, but I just cant get the code to execute once I put it inti my xcode project?

Can anybody please give me some clues on getting it working? Is there some option somewhere where you turn on pass idle events to applescript or something?


Have you hooked the idle handler up to the application (file’s owner) in the nib in Interface Builder?



I cant thank you enough for your prompt response. I was too caught up looking around the window properties to find all those properties within the owner section.

I thought it would be something like that, but i thought I had looked everywhere.

Fantastic, cheers.