25 posts in this topic
Good evening everyone
Before all, I want to say that I'm doing this script to see how _IE* functions work, and see if my studs can hack a quiz I'm working on.
I want to clarify that I'm not automating any game, bypassing any CAPTCHAs, or anything that could damage anyone.
I was trying to autofill a form, based on which question is displayed.
The question is always stored in here:
<header> <h1><span class="questionid">1. </span>Here goes the question</h1> </header> And answers are stored in here:
<ul class="answers"> <li><label><span><input id="answer_0" name="answer" type="radio" value="0">Answer 1</span></label></li> <li><label><span><input id="answer_1" name="answer" type="radio" value="1">Answer 2</span></label></li> <li><label><span><input id="answer_2" name="answer" type="radio" value="2">Anwser 3</span></label></li> <li><label><span><input id="answer_3" name="answer" type="radio" value="3">Answer 4</span></label></li> </ul></fieldset></form></div> And, there are 15 questions like this.
How can automatically fill my form?
Thanks in advance
I have previously used _IEFormElementGetObjByName and _IEFormElementSetValue to enter text into a search box on a form and then submit the form.
I am now trying to enter text into a search box which is not part of a form.
Here is the HTML from the website that i'm trying to enter the data on and then submit the search.
<div class="form-group col-xs-12">
<span id="FullWidthWithSubmenuContent_FullWidthContent_MainContent_AircraftRegistry_lblSearchText" for="input-search">Registreringsbeteckning</span>
<div class="input-group col-xs-12">
<span id="FullWidthWithSubmenuContent_FullWidthContent_MainContent_AircraftRegistry_preSearchText" class="input-group-addon">SE -</span>
<input name="ctl00$FullWidthWithSubmenuContent$FullWidthContent$MainContent$AircraftRegistry$txtSearchText" type="text" value="DTH" id="FullWidthWithSubmenuContent_FullWidthContent_MainContent_AircraftRegistry_txtSearchText" class="form-control" />
<div class="form-group col-xs-12">
<label class="sr-only" for="">Sök</label>
<input type="submit" name="ctl00$FullWidthWithSubmenuContent$FullWidthContent$MainContent$AircraftRegistry$btnSearch" value="Sök" id="FullWidthWithSubmenuContent_FullWidthContent_MainContent_AircraftRegistry_btnSearch" class="btn btn-primary ladda-button" data-style="expand-right" />
Many thanks in advance
I am fairly new to AutoIT and I am still trying to learn, I have been using _FileListToArray to list all the files with a particular extension in an array and then loop through it for operation ( For $i = 1 To UBound($FileArray) - 1).
So far this has been working fine. But I am not able to figure out a problem that I have; what if I have 50 files but I only want to loop through first 10 files and then next ten and so on? Or rather I should say, how I can I only feed max 10 files to the array at a time when I do _FileListToArray regardless of the total number of files in the folder?
Any insight/help will be much appreciated
Is this possible:
Executing a function from an include, but taking the function name from a gui input and then executing that function using the include:
#include <Something.au3> ;input reads "Tree" $functionName = GuiCtrlRead($input1) $functionName(1) And the include is gonna have
Func Tree($x) If $x = 1 Then $this = "text" MsgBox(0,$this,"whatever") EndFunc is it possible?
#include <IE.au3> #include <MsgBoxConstants.au3> Local $oIE = _IECreate("website") Local $oForms = _IEFormGetCollection($oIE) For $oForm In $oForms MsgBox($MB_SYSTEMMODAL, "Form Info", $oForm.name) _IEImgClick($oForm.name, "Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=12.0.5522.0&Name=Microsoft.ReportingServices.Rendering.HtmlRenderer.RendererResources.TogglePlus.gif", "src") Next I am having trouble clicking an image. Here is what I have tried.