Click here to Skip to main content
15,903,523 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ Pin
David Crow14-Sep-04 2:53
David Crow14-Sep-04 2:53 
GeneralVisual Studio .NET 2003 Add-Ins Pin
Franz Klein13-Sep-04 22:45
Franz Klein13-Sep-04 22:45 
GeneralRe: Visual Studio .NET 2003 Add-Ins Pin
Andrew Walker14-Sep-04 13:47
Andrew Walker14-Sep-04 13:47 
GeneralPlease Help Pin
ThatsAlok13-Sep-04 22:01
ThatsAlok13-Sep-04 22:01 
GeneralRe: Please Help Pin
Bob Stanneveld13-Sep-04 22:59
Bob Stanneveld13-Sep-04 22:59 
GeneralRe: Please Help Pin
ThatsAlok13-Sep-04 23:11
ThatsAlok13-Sep-04 23:11 
GeneralRe: Please Help Pin
Bob Stanneveld14-Sep-04 7:55
Bob Stanneveld14-Sep-04 7:55 
GeneralRe: Please Help Pin
David Crow14-Sep-04 3:02
David Crow14-Sep-04 3:02 
What you are after is IE Automation. I have dozens of little VBS files on my computer that do various things with Web sites. Some I have even added as a scheduled task if I want to do them regularly. For example, here is one that gets the current security threat level. It's not finished (I was just testing az theory), nor is it as "pretty" as the XML version that is floating around.

Dim objIE
Set objIE = WScript.CreateObject("InternetExplorer.Application")

objIE.Navigate "http://www.whitehouse.gov/homeland/"
objIE.Visible = true

While objIE.Busy = true
Wend

Dim objTables
Set objTables = objIE.Document.all.tags("TABLE")

Dim objTable
Set objTable = objTables(12)  ' get the 13th <TABLE> tag

Dim objRow
Set objRow = objTable.rows(0) ' get the 1st <TR> tag

Dim objCol
Set objCol = objRow.cells(0)  ' get the 1st <TD> tag

Dim objImg
Set objImg = objCol.all(0)    ' get the 1st <IMG> tag

MsgBox objImg.src
Here's one I made for a friend a few years back to help him enter a sweepstakes contest:

Dim IE

Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate "http://www.nralive.com/sweeps/enter.cfm", NULL, NULL, NULL, NULL

' wait until the page is fully loaded
While IE.Busy = true
Wend

' assuming there are 4 radio buttons named "enteringBy", operate on the 4th (index 3) one
IE.Document.all("enteringBy", 3).checked = true

IE.Document.all.fname.Value   = "J"
IE.Document.all.lname.Value   = "S"
IE.Document.all.email.Value   = "j"
IE.Document.all.address.Value = "2"
IE.Document.all.city.Value    = "S"
IE.Document.all.state.Value   = "O"
IE.Document.all.zip.Value     = "7"
IE.Document.all.phone.Value   = "4"

' click the "next" button
IE.Document.all.tags("INPUT").item(12).click()



"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen


QuestionWhat is GNU C++? Pin
sacoskun13-Sep-04 21:44
sacoskun13-Sep-04 21:44 
AnswerRe: What is GNU C++? Pin
Arsalan Malik13-Sep-04 21:50
Arsalan Malik13-Sep-04 21:50 
GeneralCSockets Error Pin
shiraztk13-Sep-04 21:22
shiraztk13-Sep-04 21:22 
GeneralRe: CSockets Error Pin
Arsalan Malik13-Sep-04 21:31
Arsalan Malik13-Sep-04 21:31 
GeneralRe: CSockets Error Pin
shiraztk13-Sep-04 22:17
shiraztk13-Sep-04 22:17 
QuestionHow to send user defined structure via PostMessage Pin
ledallam13-Sep-04 21:04
ledallam13-Sep-04 21:04 
AnswerRe: How to send user defined structure via PostMessage Pin
Arsalan Malik13-Sep-04 21:20
Arsalan Malik13-Sep-04 21:20 
GeneralRe: How to send user defined structure via PostMessage Pin
ledallam13-Sep-04 21:37
ledallam13-Sep-04 21:37 
GeneralRe: How to send user defined structure via PostMessage Pin
Arsalan Malik13-Sep-04 21:45
Arsalan Malik13-Sep-04 21:45 
GeneralRe: How to send user defined structure via PostMessage Pin
Mad__13-Sep-04 23:22
Mad__13-Sep-04 23:22 
GeneralRe: How to send user defined structure via PostMessage Pin
Roger Allen14-Sep-04 12:24
Roger Allen14-Sep-04 12:24 
GeneralAccessing data between threads Pin
ledallam13-Sep-04 19:30
ledallam13-Sep-04 19:30 
GeneralRe: Accessing data between threads Pin
Arsalan Malik13-Sep-04 19:38
Arsalan Malik13-Sep-04 19:38 
GeneralRe: Accessing data between threads Pin
Hardy_Smith13-Sep-04 21:40
Hardy_Smith13-Sep-04 21:40 
GeneralHandling multiple instances of an application in VC++ 6.0 Pin
Neeranjan13-Sep-04 19:07
Neeranjan13-Sep-04 19:07 
GeneralRe: Handling multiple instances of an application in VC++ 6.0 Pin
Arsalan Malik13-Sep-04 19:24
Arsalan Malik13-Sep-04 19:24 
GeneralRe: Handling multiple instances of an application in VC++ 6.0 Pin
Neeranjan13-Sep-04 19:40
Neeranjan13-Sep-04 19:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.