Thursday, October 15, 2009

Automate Internet Explorer from VB Script

Control Internet Explorer from VB Script using the Internet Explorer COM object.  The code below shows how to do the following:

  • Open Internet Explorer
  • Navigate to different URL’s
  • Make Internet Explorer visible/invisible
  • Populate a textbox on a web page
  • Click a button on a web page

You can use scripts like this to automate anything you do repeatedly to save time, such as: Web logins, screen captures, fake traffic or vote in internet polls.  I used a script similar to this one to enter my self in a drawing for a new house, I set the script up on the windows scheduler to run once a day since the contest specified that you were allowed to enter once daily. I didn't win!

Code – *.vbs

Dim oIE	

' Put your name into the "Search" textbox
' Notice below that the textbox's name is "q"
oIE.document.all.q.value = "Rick Casady"


' Click the Search button
' Notice below that the button's name is "q"

' Create a Internet Explorer COM object and then Navigate the Navigate sub
' Also sets the Internet explorer to be visible
Public Sub IeNew(ByVal strURL)
Set oIE = CreateObject("InternetExplorer.Application")
oIE.Visible = True
End Sub

' Navigates to the URL provided then waits for IE to complete.
Public Sub Navigate(ByVal strURL)
Loop Until Not oIE.Busy
End Sub

Monday, October 12, 2009

Review of the Acer Aspire One

    So, I decided to purchase the Acer Aspire One with the Intel Atom CPU N270 @ 1.60 GHz. I think I'm happy with the choice so far, time will tell. Below is a picture of of the "Aspire One" next to my 19" monitor, keyboard and mouse.

    Overall the "Aspire One" is a strong buy and I recommend it for the price.
    It's a good deal at around $299 and up depending on where you buy, and when you get the Costco bundle at $349 its even better.... The Costco bundle includes the 6 cell battery, wireless optical mouse, carrying case and external DVD-R drive.
    Some say it's a little big for its class and heavy especially with the 6 cell battery, but that's not true if weight over 90 pounds... Actually if it was any smaller I couldn't use it! The highest resolution is 1024 x 600 and some programs actually check the resolution and fail if it is set that low.... Additionally it's a little hard to set it on your lap and keep stable and while using the very small keyboard.... Skip to the end Rick! It is small but not too small...

    Intel Atom CPU N270 @ 1.60 GHz
    • 1 GB RAM
    • 160 GB hard drive
    • WebCam built in
    • 10.1" LED LCD

    My New Netbook purchase of a "Aspire One" was long coming. I hadn't bought a "NEW" computer since around 2003 when I purchased a AMD Athlon 750 MHz motherboard with a 200 MHz FBS. That seems like a lot longer now that I've said it, but the truth is a Athlon 750 will do almost anything you need a computer to do.

    My Needs
    So I wanted to get a machine that's portable so I can use it on the couch or while on the run. But I also want a machine powerful enough to edit video and play games. My first and only thoughts for the past 3 years had been buy the most powerful laptop I can find and dock it to my monitor, keyboard, mouse, external DVD burner, stereo....Skip to the end Rick! What a pain I would need to get a business laptop that is also sold with a docking station or suffer the process of getting a USB hub and plug/unplug way to many cords multiple times a day. Additionally I would end up paying a lot of money for a laptop that might not fulfill all my requirements for a good desktop, so then why bother... I decided to get two computers; one a supper portable computer and the other a work horse. The portable computer would of course be the "Aspire One"

    One day I found this thing called an Eee PC it was great, the price was cheep, and it was very small/light. This "Netbook" was perfect it solved half my needs at %20 of my budget, there was no reason not to buy it immediately. So I did what any person would do before making such a purchase, I told a group of people at work about the Eee PC and all of its wonder (not mentioning that I was in fact about to buy one). I have never heard grown men so upset at a product, if you listened to them you would have thought "Hitler" him self had built each one. In hind sight the two people most confused at the concept of a small laptop where the two mangers most responsible for the "product" my team built. That "product" confused our customers so much our department was closed and most everyone laid off.... Skip to the end Rick! So I backed down and decided not to buy this new unproven ultra small laptop. Now these laptops are extremely cool everyone wants one, or hates them it seems. That's the definition of "cool" everyone like or hates a person place or thing.

    Next steps
      Install Windows 7 and find the hope only President Obama him self can give.