Applescript with GUI?

Howdy all,

I’m still looking at my previous code, and I can’t seem to find anything wrong with it. But while I was doing that, another app was released that handled what I was trying to do much better, and easier, and with a GUI. So 3/4 of what my app was made for had no more use :\ So a large part has been scrapped, except for one section which I’m going to continue to work on, which I’m hoping to improve by a large amount.

I don’t think it was in Applescript, but rather a form of Perl, or C that this was written in, but one thing that caught my eye was that it had a GUI, and that’s what made it easier. I know I’ve read things about GUI scripting in Applescript, but I can’t seem to find anything about it on this site, or anywhere, for that matter.

So basically what I’d like to do is once I get my code cleaned up, I would like to design a front end, or GUI for it. Could any of ya explain how that works, or direct me towards a resource for it? Can it be done in Applescript, or does it require Applescript Studio? Or does it just not exist, and I’m going crazy again? :stuck_out_tongue:

I guess I’m pretty much looking for any info on the subject :stuck_out_tongue:

-Parrot

if you need anything beyond a standard choose from or dialog box type interface you have two choices… AppleScript Studio or FaceSpan.

AS Studio is free and more powerful, but has a bit of a learning curve.
FaceSpan is a RAD (Rapid Application Development) Tool which is similar to AS Studio which is easier to use, but is a paid product and less robust.

Long term I would look at AS Studio. Short term you may want to consider FaceSpan.

Well, seeing as I’m in no hurry to release this, I have time to pick up applescript studio.

I know it can be found on Apples site… just need to track it down. Will any script I’ve got made now work in Applescript Studio? As for Facespan… does it have a demo or something to try it out?

FaceSpan 4.3 Demo = http://www.latenightsw.com/fs4/downloads.html
Xcode 2.3 - http://developer.apple.com/tools/xcode/ - requires a free developer connection account

Most code will work in AS Studio without modification… at least to my knowledge… I’m a total AS Studio noob myself.

I seriously can’t figure out why people use FaceSpan anymore. Studio does everything FaceSpan does, is free, has a better development environment than FS, and is no more complex than FS’s language additions.

Am I missing something here?

Depends on what your used to… I can see, having used both, why some people would prefer FaceSpan over Studio… I’m willing to bet though that when 5.0 ships it’s going to be a MUCH better product than it is today.

Eh… I checked out facespan, and AS Studio, and I have to say, I seem to be liking studio better at the moment. Now all is left is the learning curve :stuck_out_tongue:

I looked at FaceSpan and AS Studio and went with FaceSpan. Mostly because of the aforementioned learning curve…I don’t have the luxury to be honest, if all I’m after is an integrated application with some menus and progress bars. In other words “just a little bit fancier than vanilla AppleScript.”

Also, the help of the author has been superb.

Yeah FaceSpan feels a tad kludgy feeling because it’s a “pickup from another vendor” kind of deal, but I still like the overall feel and interface better.

Besides, it sounds like chunks of Script Debugger will be in FS5 (or maybe tight integration between the two products) and that in itself would be a heck of a usability point with me. I’ve just loved Script Debugger over Apple’s editor.

'Course, what does this n00b know? :wink:

Well, the problem lies in that I don’t want to pay, and I’ve got time to pick it up.

Now then… off to the tutorials section to see what I can find out :smiley:

Ah, a person after my own heart! I, like you, wanted to do more with applescript, and wound up learning AS Studio. There’s a lot to learn, but luckily you can learn it a bit at a time, only the parts you need as you build your application.

AppleScript Studio is (wait for it…) insanely great at what it does. I literally wrote a simple application that handled documents (save, open, etc) with only 23 lines of applescript. Since then, I’ve expanded it a lot, but the point is, it does a lot for you: handles window minimizes and zooms, hides the application, lets you use the stuff under the Services menu in the Application menu without much trouble, in short, it gives you the freedom to leverage the language you already know (applescript) and concentrate on the specifics of your program, rather than worrying about “how do I get a menu to display?”

Yes, there are really hard parts (try table views and datasources) but most of the GUI stuff is just telling the button (or window or other object) what event to respond to and then writing a handler for it.

If you have ever used HyperCard or SuperCard, it will feel very familiar (especially since AppleScript was based on HyperTalk to begin with).

Go install the Xcode tools (or the developer tools if you’re on Jaguar). AppleScript Studio isn’t a specific application, it’s a term used to mean “writing an AppleScript application in Xcode (or Project Builder).” You won’t find a program named “AppleScript Studio.” Just launch Xcode and start a new project. When it asks what kind, tell it “AppleScript Application” or “AppleScript Document Application.” I recommend a non-document application at first.

If you want examples, all of my programs are published with source code, on ScriptBuilders and GeekSuit. Taxman is an easy one that just has one window and some buttons, Timer’s a “one-window” app also.

Xcode’s documentation is pretty good, vague in some places (that’s where Macscripter helps and also the Applescript mailing lists at Apple). Just post when you need help and we’ll try to get you through it.

Good luck and hope you have fun! :slight_smile: