Progress bar again....

Hi.
I wanted to make a little program with a progess bar. After running into a few problems, I decieded to code the most simple program I could think of. It still didn’t worked. Then I came here, read for about 3 hours every post, tried it, and it still wouldn’t work…

Here it is. Would some put an end to my miseary already, please…
The script below is the part in the program. The window itself only has the bar and a text.


on launched theObject
	set anzahlTemp to 10
	set maximum value of progress indicator "Progress_Bar" of window "Progress_Test" to anzahlTemp
	--set indeterminate of progress indicator "Progress_Bar" of window "Progress_Test" to false
	--set uses threaded animation of progress indicator "Progress_Bar" to true
	start progress indicator "Progress_Bar" of window "Progress_Test"
	repeat with a from 1 to anzahlTemp
		set contents of text field "Progress_Text" of window "Progress_Test" to "Bearbeite " & a & " of " & anzahlTemp
		set contents of progress indicator "Progress_Bar" of window "Progress_Test" to a
		update window "Progress_Test"
		delay 1
	end repeat
	quit
end launched

Hallo Thomas,

probier mal das


on launched theObject
	set anzahlTemp to 10
	tell window "Progress_Test"
		tell progress indicator "Progress_Bar"
			set indeterminate to false
			set minimum value to 0
			set maximum value to anzahlTemp
			set contents to 0
			set visible to true
			start
		end tell
		
		repeat with a from 1 to anzahlTemp
			set contents of text field "Progress_Text" to "Bearbeite " & a & " of " & anzahlTemp
			tell progress indicator "Progress_Bar" to increment by 1
			delay 1
		end repeat
		tell progress indicator "Progress_Bar" to stop
	end tell
	quit
end launched


Ok, das Funktioniert. Wieso ist das Fenster immer im Hintergrund? Der Balken ist auch immer grau. Wie ändere ich das?

Please let’s turn back to english for the others :wink:

Probably it depends on the settings of your window in Interface Builder