madafakas Posted September 26, 2009 Share Posted September 26, 2009 I am new to autoit and I wonder if it could help me. Tried to code script in PHP but failed. I need autoit to go to webpage http://www.labas.lt/lt/about/drivers/number/ . There are 3 numbers (mobile phone numbers). I need autoit to filter them and check if there is some kind of sequence in one of them (for example 4 same number in a row 37064444536 or combination 37064 144 144). If yes, then I want autoit to push "Rezervuoju" button below that number, type in my mail and submit the form. If no - clear cookies, refresh and do the same again and again. Could anyone at least tell me what functions should I use or so? Link to comment Share on other sites More sharing options...
dantay9 Posted September 27, 2009 Share Posted September 27, 2009 (edited) To go to the webpage, use _IECreate and _IENavigate if you have to go to another webpage. To get the numbers, you will first have to retrieve the source with _InetGetSource. Then you will have to parse through the text with String functions. Comparing numbers will also require String functions. StringRegExp would be best, but that is very difficult for a beginner to learn right off the bat. To click a button, use an _IE function that will click the button. Typing in your e-mail and submitting the form will also require _IE functions. I am not exactly sure how to refresh the page or clear the cookies, but you should be able to search the forum for those answers. Edited September 27, 2009 by dantay9 Link to comment Share on other sites More sharing options...
DaleHohm Posted September 27, 2009 Share Posted September 27, 2009 There are also many ways to get the source of the page using _IE functions instead of INetGet - this is important particularly if the page is generated dynamically or requires authentication (See _IEBodyReadHTML, _IETableWriteToArray and _IEPropertyGet innertext) Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble 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