lagostada Posted April 30, 2007 Share Posted April 30, 2007 hi, i'm new to autoiti'm really excited about its potencial, it's a awesome tool but i'm not a pro about coding so i need some help to get startedi wanna make a tool that opens an input box where i will place something to google find out as an exact phrase (exact phrase is a tool provided by google)so..i wanna open ie (7.0) and send it to www.google.co.ukpress tab on google page untill autoit reads the "advanced search" textor the hyperlink "http://www.google.co.uk/advanced_search?hl=en"wait for the advanced search page to be openchoose (somehow) the tab "with the exact phrase"and search for the text i set on my first input boxi found something about reading html herehttp://www.autoitscript.com/forum/index.ph...amp;hl=read+tabbut i really have no clue how to do it, or how to make autoit tab untill it "reads" advanced search(a while cycle maybe, but how to "read" it?)i'm very gratefull for any kind of helpthank you Link to comment Share on other sites More sharing options...
evilertoaster Posted April 30, 2007 Share Posted April 30, 2007 IELinkClickByText() and _IEFormElementSetValue() should be able to do that. Link to comment Share on other sites More sharing options...
herewasplato Posted April 30, 2007 Share Posted April 30, 2007 Welcome to the forum. Try this code: $in = InputBox("Autoit", "Type the words to search.") $URL = StringReplace($in, " ", "+") ShellExecute("http://www.google.co.uk/search?as_q=&hl=en&num=100&btnG=Google+Search&as_epq=" & $URL) [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
lagostada Posted April 30, 2007 Author Share Posted April 30, 2007 thank you guys Link to comment Share on other sites More sharing options...
lagostada Posted April 30, 2007 Author Share Posted April 30, 2007 on this code Opt("WinWaitDelay", 6000) Run("D:\Program Files\Internet Explorer\iexplore.exe") WinWaitActive("Google - Windows Internet Explorer") IELinkClickByText("Advanced Search") i get this error : ERROR: IELinkClickByText(): undefined function. IELinkClickByText("Advanced Search") and about herewasplato, i can't run it, it shows only a user call tips entries stuff on the menu :\ i totally feel like a noob.. but wait, that's what i'm :\ Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted April 30, 2007 Moderators Share Posted April 30, 2007 This should do what you are wanting... #include <IE.au3> $sURL = "http://www.google.co.uk/advanced_search?hl=en" $sSearch = InputBox("Search", "What would you like to search for?") If $sSearch == "" Then Exit $oIE = _IECreate($sURL) $oForm = _IEFormGetObjByName($oIE, "f") $oInput = _IEFormElementGetObjByName($oForm, "as_epq") _IEFormElementSetValue($oInput, $sSearch) _IEFormSubmit($oForm) Link to comment Share on other sites More sharing options...
lagostada Posted May 1, 2007 Author Share Posted May 1, 2007 just got it, thank you i was missing the include ie.au3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now