RSS Forums RSS
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums

timer or something diffrent

Join Date: Apr 2005
Location: West Yorkshire, England
Posts: 74
Reputation: purplegerbil is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 6
purplegerbil's Avatar
purplegerbil purplegerbil is offline Offline
Junior Poster in Training

Re: timer or something diffrent

  #5  
May 2nd, 2006
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)


Private Sub Command1_Click()
Dim hWnd As Long

  hWnd = FindWindowByCaption("welcome to mia's website  - Mozilla Firefox")
    If hWnd = 0 Then
      MsgBox "Window not found", vbCritical, "Fehler"
    Else
      
      Call BringWindowToTop(hWnd):
      Call SendKeys("TAB", True)
      Call SendKeys("{ENTER}", True)
      Wait 20
      Call SendKeys("{F5}", True)
      Wait 660

    End If
End Sub





Public Sub Wait(Seconds As Single)
     Dim lMilliSeconds As Long
     lMilliSeconds = Seconds * 1000
     Sleep lMilliSeconds
End Sub


Not sure what you mean about looping?
Do you want to repeat

      Call SendKeys("TAB", True)
      Call SendKeys("{ENTER}", True)
      Wait 20
      Call SendKeys("{F5}", True)
      Wait 660

A set number of times?
If so you could wrap it in a for..Next loop




pG
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:30 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC