Thanks for the reply, but I'm still getting the usage errors with this script, no matter how I call Hook. With the attached file, I tried these 3 ways of calling it:#$win->Hook($win, WM_ENTERIDLE, \&Idle($win)); #$win->Hook(WM_ENTERIDLE, \&Idle($win)); Win32::GUI::Hook($win,WM_ENTERIDLE, \&Idle($win)); The strange thing is that the hook works in the example that Rob sent out (last week, I think). Am I missing something here?
try $win->Hook(WM_ENTERIDLE, \&Idle); Cheers, jez.