Progress Indicator

Hi Folks,

can someone tell me how to work with the progress bar?


tell progress indicator "pegel_con" of tab view item "Connection" of tab view "tab" of window id 1
		if con_status is "0" then
			set the content to 10
		else if con_status is "2" then
			set the content to 20
		else if con_status is "4" then
			set the content to 30
		else if con_status is "7" then
			set the content to 60
		else if con_status is "8" then
			set the content to 100
		else if con_status is "10" then
			set the content to 50
		end if
	end tell


The Syntax is ok, but there will nothing be displayed…

Thanks for any suggestions!

Stefan

It should work. I can only assume con_status’s value has not been set properly, if you’re not receiving any error message for anything else.

Shouldn’t the progress indicator be started first?

tell progress indicator "pegel_con" of tab view item "Connection" of tab view "tab" of window id 1
start
       if con_status is "0" then
           set the content to 10
       else if con_status is "2" then
           set the content to 20
       else if con_status is "4" then
           set the content to 30
       else if con_status is "7" then
           set the content to 60
       else if con_status is "8" then
           set the content to 100
       else if con_status is "10" then
           set the content to 50
       end if
   end tell

Dear Folks,

thanks for your help! I will try and do my best to solve this issue by setting con_status to a fixed number for debugging…

Best regards,

Stefan

Sorry Folks,

I was using a Level Indicator instead the progress indicator:

Here is the correct source for the level indicator (LevelIndicator)


tell application "Internet Connect"
		set con_status to state of status as string
	end tell
	
	
	
	tell progress indicator "pegel_con" of tab view item "Connection" of tab view "tab" of window id 1
		
		start
		if con_status is "0" then
			set content of control "pegel_con" of tab view item "Connection" of tab view "tab" of window id 1 to 1
		else if con_status is "2" then
			set content of control "pegel_con" of tab view item "Connection" of tab view "tab" of window id 1 to 2
		else if con_status is "4" then
			set content of control "pegel_con" of tab view item "Connection" of tab view "tab" of window id 1 to 3
		else if con_status is "7" then
			set content of control "pegel_con" of tab view item "Connection" of tab view "tab" of window id 1 to 4
		else if con_status is "8" then
			set content of control "pegel_con" of tab view item "Connection" of tab view "tab" of window id 1 to 5
		else if con_status is "10" then
			set content of control "pegel_con" of tab view item "Connection" of tab view "tab" of window id 1 to 0
		end if
	end tell
	

Hi Folks,

regarding to the “pegel_con” I have another level indicator “pegel_signal”

the code is the same - but it looks like that there is a problem with “then” because I have a built error on the first
line…


if pegel_show is smaller than or equal to 20 then 
	set content of control "pegel_signal" of tab view item "Connection" of tab view "tab" of window id 1 to 4
	else if pegel_show is greater than or equal to 20 and smaller than or equal to 30 then
	set content of control "pegel_signal" of tab view item "Connection" of tab view "tab" of window id 1 to 5
	else if pegel_show is smaller than or equal to 10 then
	set content of control "pegel_signal" of tab view item "Connection" of tab view "tab" of window id 1 to 3
	end if


thanks for any suggestions…

Best Regards,

Stefan