Random Stuff Forums
 

Go Back   Random Stuff Forums > Technical > Programming

Programming Discuss any type of programming here.

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 11-09-2007, 06:46 PM
Matt's Avatar
(Offline)
Administrator
 
Join Date: Jan 2007
Location: United States - Ohio
Posts: 3,830
Matt is an unknown quantity at this point
Default [AutoIt] Open IE + Search for a string

#include <IE.au3>
$search = InputBox("What?","What would you like to search for?")
$oIE = _IECreate()
_IENavigate($oIE, "http://www.google.com")

$oForm = _IEFormGetObjByName($oIE, "f")
$oQuery = _IEFormElementGetObjByName($oForm, "q")
$oButton = _IEFormElementGetObjByName($oForm, "btnG")

_IEFormElementSetValue($oQuery, $search)
$oButton.click
_IELoadWait($oIE)

Exit
This bit of code will open internet explorer, and navigate to google.com. It will then enter the $search value into the search field, and preform a .click event.
__________________
"Facts do not cease to exist because they are ignored."
Reply With Quote
  #2  
Old 11-09-2007, 08:40 PM
Woody's Avatar
Woody (Offline)
Hmmmm
 
Join Date: Feb 2007
Location: Virginia
Posts: 1,609
Woody is an unknown quantity at this point
Default

Anyway to make that work for firefox?
__________________

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

I heart my weighted companion cube.


To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
And then jesus said "Let there be Asterisks!"
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 09:09 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright © 2006 - 2012, Rsforums.org