I have an AppleScript that is nothing more than an on idle handler that I have saved as a Stay-Open app, and I’m trying to convert it to an ASOC app. I’m getting lost about how to make my ASOC app be a Stay-Open app with no window.
Could someone point me to the appropriate docs, or perhaps give me a hint?
Thanks in advance.
just delete the window in Interface Builder.
I’d like to know what is the advantage of AppleScript Studio compared to AppleScript without using the enhanced GUI features?
Thank you very much.
I deleted the window, but the app doesn’t stay open. How do I make it a Stay-Open app which appropriately calls an on idle handler?
The reason I’m doing this is because my original AppleScript app needs to call a Core Services function. The way I implemented that was to write an executable which does nothing more than call this function, and then invoke that executable via do shell script at the appropriate times during my AppleScript’s on idle handler.
I figured that since ASOC provides a bridge between AppleScript and Cocoa, I could write something that is more efficient by making a direct call to the Core Services function via my ASOC app, instead of having to invoke a new process simply to make that one, single function call.
In case anyone is interested, this is the AppleScript app that I’m talking about: http://macscripter.net/viewtopic.php?id=30456
Also, I think that it would be a good learning exercise for me to try to convert some of my existing AppleScripts to ASOC apps.
normally if you create a new AppleScript Application project and just Build & Go
the app stays open until you press âŒ˜Q oder terminate the task in Xcode
Well, I originally tried that, and the app didn’t stay open, and that’s why I posted my previous question. But I had been hacking with the application a lot before removing the Window, and so maybe I messed something up.
Therefore, after reading your reply, I started over from scratch, and this time the app did indeed stay open. So thank you.
But I still have a problem with the idle handler that I mentioned.
Here’s what I did:
- Create a new Cocoa-Applescript application.
- Open MainMenu.xib
- Delete the Window
- Save the changes in Interface Builder
- Go to my AppDelegate and implement an on idle handler
- Do a Build and Run
This time, the app stayed open like it was supposed to, but the on idle handler isn’t firing.
So do idle handlers not work in ASOC? Or is there something special I have to do in order to enable them?
At this point I must quit, because I don’t have Snow Leopard
Well, I just want to thank you for all your help.