Looking for suggestions,cocoa, applescript, or both for .app

Hi Everyone, I built a program(with tons of help from MacScripter) out of 3 applescripts. On start up checks to see if a certain plist exists, if not builds it and calls a script to get user ID and email address, then writes it to the plist, then calls the IP checker/email script. If plist does exist, checks email address for @ to see if it already has an email address in it. If so, calls a script to compare the current IP to the IP listed in the plist. If it has changed sends an email to the address in the plist. If no change, keeps checking hourly.

I found an xcode(cocoa) project that displays IP address in the status bar and updates every hour, or when clicked on here( http://macscripter.net/viewtopic.php?id=21036). Should I try to figure out how to do this in all one language(cocoa), or is it ok to have my scripts doing one thing, and the cocoa IP status menu doing another, all from the same app. Can I have one .app start both processes.


Hello adown,

I had a group of applescripts related to files (renumber, resize, group into folders and so on). I first used Applescript Studio to have an .app allowing to call these scripts using a unique window with buttons. I then discovered ApplescriptObjC, a more interesting alternative. Today my old scripts are just methods of a real, stand-alone application. But I learned it the “hard way”, and without this site it could definitely not have been possible.

First of all, cocoa is not a language, it is a framework, a set (a large set indeed) of objects and methods for the use of “regular” applications written in Objective-C. But ApplescriptObjC is a bridge that allows you to use virtually every cocoa object in writing “first-class citizen” applications in a syntax close from Applescript.

With patience (and “tons of help” of the MacScripters) you can do with ApplescriptObjC everything that you could do with Objective-C. The final app is a bit bigger, much more slower if you do intensive list treatments, but much more affordable for a Applescripter, too.

So your problem can definitively be solved in ASOC, if you give more details on what you want.


Thanks for the reply fiz. The menulet I want in my project is objective-c. Sorry, I am still figuring out Applescript and stumbled on this new language. I want to click an application icon, check the plist to see if there is an @ in the email address, if so, check the public IP, compare it against the plist. If it’s changed, send an email.

If no @ in the email, get user name and email address, write it plist, then do the check public IP/email routine. After which, it starts the menulet that displays the IP Address(default), or menulet icon, with a dropdown with IP address to click for update(although it auto updates also), and “Hide Dock Icon”, “Use Menulet Icon”, “Change Email Address” buttons.

Probably more detail than you wanted, and I’m not looking for someone to write this for me. Although if you have pieces already done, I wont turn them down. As I said, I have Applescript that does this, except the menulet is OBJ-C(the dropdown “options” listed are wants). Will they help in writing the ASOC. I welcome any and all suggestions. Back to the search bar.

Thanks for the advice, adown