Ok, here is an example of filling in a form and submitting it automatically.
This example uses the KiXtart search page, and set the following fields:
- Membership number to "494" (my number)
- Search forums to "all"
- Search date to "Since 5 days"
It then submits the search form.
code:
Break On
; Create application instance and open search page...
$oIE = CreateObject("InternetExplorer.Application")
$oIE.Visible=1
$oIE.Navigate("http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=search")
; Wait for page to stop loading...
While $oIE.busy AND $oIE.readystate <> 4 AND @ERROR = 0 Loop
$oDoc=$oIE.document
; Form is not named, so identify the form with the relevant field...
For Each $oForm In $oDoc.forms
; Set membership number
$oForm.search_user.value="494"
; If there is no error, then this is the right form
If @ERROR = 0
; Set the period and forum scope
$oForm.search_date.value="5"
$oForm.search_forum.value="ALL"
; Submit the form.
$oForm.submit.click
EndIf
Next
$oIE = 0