progress indicator bar is gray!!!

Hi. I am working on my first interface experiment with applescript studio, and I am having a few issues… The script currently just fills a progress bar up and generates random numbers above it…

I am finding is that when my app runs and the progress bar is filling-- for some reason right after I launch it, the Finder is activated and therefore the status bar is gray… When the bar fills completely then it switches to my app-- but at that point… its done… So------

I’ve been trying to do all kinds of stuff like set frontmost to true, and "activate application
‘addressbook2pine’ … but it seems like nothing is doing the job…

Here’s the code (which wont do you much good since you dont have my mainmenu.nib file… )

on opened theObject tell window "addressbook2pine" set x to 500 set y to 0 set maximum value of progress indicator "statusbar" to x tell progress indicator "statusbar" to animate repeat until y = x set y to y + 1 set the contents of text field "textblock" to random number tell progress indicator "statusbar" to increment by y end repeat end tell quit application end opened

I’ve had this problem before so I found out that I had to use application “System Events” to bring the process in front. For example, if my program is entitled “RandomMatters” with a main window that contains the progress bar, I needed to code like this:

tell application “System Events” to set frontmost of process “RandomMatters” to true

That brings up the window with the progress bar up front. I hope this helps. Try it and see if it does the job.

Good luck!


Oops! Sorry, I screwed up the AppleScript part. The one line code should have been inside the box.

Just the same. Good luck.