Solved

Web Browser Windows

Posted on 2006-07-04
4
176 Views
Last Modified: 2010-04-30
I need an application to test a case study and am in dire need of help, seeing as my knowledge of computer programming is lacking in sustenance. Help would be very much appreciated! I need a program that generates a random string that is 10 letters long and then opens it as a url in a web browser. This process should be repeated at random intervals of time.
Thanks for all your help experts!
0
Comment
Question by:momonja
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 35

Accepted Solution

by:
Raynard7 earned 165 total points
ID: 17036104
for the random string you would need something like

randomize timer

public function retStr(chrLen as long) as string
dim lngLc as long

retStr = ""

for lngLc = 1 to 10
    retstr = retstr & chr(cint(round(rnd() * 25 + 1)) + 65)
next lnglc

end function

for the random timer interval what I would do is have a timer on your form set to check every 1 second
I would have a global variable which was of a date - initilised to the current time on form load.

then when the timer event is triggered i would check if now() > timeVariable

when you have finished opening the url i would set timeVariable = dateadd("s", round(rnd()*500), now()) which would add a random number of seconds to the current time (between 0 and 500)

Finally for the opening of the url in a browser - you can use the internetExplorer object

like

    Set objIE = New InternetExplorer
    objIE.Visible = True
    objIE.navigate "http://www.yourpage.com"
    While objIE.readyState <> READYSTATE_COMPLETE
        DoEvents
    Wend
    Dim objHTML As HTMLDocument
    Set objHTML = objIE.document
    While objHTML.readyState <> "complete"
        DoEvents
    Wend

there is plenty of stuff if you google the InternetExplorer object
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month9 days, 18 hours left to enroll

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question