# Interface Builder w/AppleScript Studio



## simX (Feb 11, 2002)

Would someone mind walking me through the basics of building a Cocoa application using AppleScript Studio?

Specifically, I'm trying to write an application, but I'm not exactly sure how to make a button control a couple progress bars.  I'm trying to set the value of progress bars after clicking a button, and I also want titles next to the progress bars to change accordingly.

Also, how would I have the progress bars and titles auto-update (according to values set by my AppleScript) at set intervals, like once every second or once every five seconds?

Besides these specifics, I need a quick rundown of how to develop a Cocoa application.  Any help would be much appreciated.

Oh, the other thing that I wanted to know is how in the world do you set the names of objects (especially progress bars), and how do you refer to them in an AppleScript?


----------



## simX (Feb 11, 2002)

OK, so I figured out how to name elements and how to refer to them, but there's one thing that's still bugging me -- how to change the value of progress bars!!  How come the line

set contents of progress indicator "Progress Bar 1" of window "Window 1" to 50.0

doesn't change the progress bar to visually show 1/2 full???


----------



## simX (Feb 17, 2002)

Surely somebody out there can walk me through this...


----------



## whitesaint (Feb 18, 2002)

sorry im only into Cocoa.  The best way to learn Cocoa is try out the O'reilly Book, or Aaron Hillegass's book.  Or if you dont wanna spend money, read "Currency Converter" it's a pdf when you download the developer tools.

-whitesaint


----------



## Red Phoenix (Feb 18, 2002)

I would have replied, but I haven't built anything in AppleScript Studio that uses a progress indicator. I'm also subscribed to the AppleScript Studio mailing list and this came up in it, but was pretty much left unresolved. The only suggestion that came out of it was to make sure the indicator wasn't set to indeterminate, and also make sure the "Continuous" check box is on in the Attributes info panel.


----------



## simX (Feb 18, 2002)

I ****ing FIGURED IT OUT!!!!!!!  I AM SO HAPPY!

God am I a dork, though... I never named the window that the progress bar was in (it looked like it was named in the interface builder, but you actually have to get info on it and give it a name that AppleScript refers to it as), so it could never actually change the contents of the progress bar because it didn't know which window it was in.

YESSSSSSSSSSSSS.  I am SO HAPPY.  Now I can probably finish my application!


----------



## martinatkinson (Feb 18, 2002)

Hello!

Good for you SimX, I know that feeling when after hours or days of endless brain-racking you finally find the simple solution.

Well, I also know the feeling you get when you can not find a solution, simple or otherwise.  And I am feeling that right now.  Do you have any ideas of how I would do this:  http://www.macosx.com/forums/showthread.php?s=&threadid=13537

Have a great day!

Albert

P.S.  What app are you working on?


----------



## ThinkingDiff (Feb 18, 2002)

Check the max value of your indicator.  Maybe it's not 100.


----------

