New topic in General: 

Help with timer/while to wait until window exists

Maggot2duhmax - Mon Mar 31, 2008 7:35 pm

<http://forums.realsoftware.com/viewtopic.php?t=21564>
                                                                                
                                                                                
Hi. I am new to RB (but have some exp. w/ scripting) and I am building off the 
URL manager in the getting started section of the help in RB. Basically, I want 
to add a process wheel to run until the browser comes up. I tried two ways of 
doing this:
1. Use a while with 2 if statements to check if firefox or internet explorer is 
running (if it isn't, process wheel is visible; if process exists, process 
wheel isn't visible)
 -PROBLEM: The while caused the program to crash.
2. After the fail with the while, I resorted to a timer. Bascially I want the 
timer to check every second to see if the window exists. Here is my code (it 
goes with the connect to site button):
Code:dim w as new window1
dim timer1 As new timer
timer1.period = (1000)
timer1.mode = (2)
ShowURL LIstURL.Text
if w.visible Then
  ProgressWheel1.Visible = True
end if
timer1.Enabled = true
if not w.visible then
  progresswheel1.Visible = False
end if


What am I doing wrong? Also, can I make the while work?                         
        
                                                                                
                                                                                
                                                                                
                                                                                
                                        



-- 
Over 900 classes with 18000 functions in one REALbasic plug-in. 
The Monkeybread Software Realbasic Plugin v8.1. 

&lt;http://www.monkeybreadsoftware.de/realbasic/plugins.shtml&gt;

[email protected]

Reply via email to