Jump to content

Search the Community

Showing results for tags 'internet explorer'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum
  • AutoIt

Calendars

  • Community Calendar

Found 50 results

  1. Hi, I have a situation where I need to make one request to get a kind of pre-logon page, then click a link on that pre-logon page, which then returns a login form page, and then fill in information in the form page and submit it. How can I handle that using AutoIT? I can get the AutoIT script to tab to the link, then send an ENTER, which then causes the FORM page to appear in IE. However, I cannot seem to get the form object from the FORM page (_IEFormGetObjByName fails when it searches for the form). Why is that, and how can I get the AutoIT to process the FORM page? Thanks, Jim
  2. I have a script that opens some Excel books that are stored in SharePoint . Without getting to much into detail as its a very long story I have to open Internet Explorer to the SP site in order for all of this crap to work. Anyway I have a bit of code in my script that i found via google-fu $ieList = ProcessList("iexplore.exe") If IsArray($ieList) Then For $I = 1 To Ubound($ieList) -1 ProcessWaitClose($ieList[$I][1]) Next EndIf Exit Now on Windows 7 this bit works great. On Windows Server 2012 R2 where this things runs is another story. I need to be able to force close all instances of Internet explorer that are running as part of my code. Any help is appreciated.
  3. Hi, I'm struggeling with the following: In a website I have to fill in several items. For the normal fields I am able to fill in the information by using UDF "_IEGetObjByName". But there is also a dropdown menu and I can't figure out how to choose te right information from it. I have searched the helpfile and the forum but I can't figure it out. Here's an excerpt from the html-page of the site where the dropdown-menu is mentioned: <div class="col-md-10 padding-5"> <div class="btn-group m-r"> <input type="hidden" name="bedrijfId" class="bedrijfId" value=""> <button type="button" data-toggle="dropdown" class="btn btn-sm btn-default dropdown-toggle" > <span class="dropdown-label">Choose Company</span> <span class="caret"></span> </button> <ul class="dropdown-menu dropdown-select" > <li data-value="2" data-field="bedrijfId"><a href="#"><input type="radio" name="drp1" />Company 1</a></li> <li data-value="38" data-field="bedrijfId"><a href="#"><input type="radio" name="drp1" />Company 2</a></li> <li data-value="42" data-field="bedrijfId"><a href="#"><input type="radio" name="drp1" />Company 3</a></li> </ul> </div> </div> How do I select one of the companies from the dropdown menu? Thanks Joost
  4. Hello, usually I do Win automations, so I have no skills at all to handle HTML forms :-/ The script to catch and syntax check the required information from Excel is done. Now I'd like to automate the upload using this form, too: http://flashcardsdeluxe.com/flashcards/Upload.aspx What browser is easiest to do so? (IE, Chrome, FF) The Values $DeckCode, $DeckName, $DeckDefinition shall go to their HTML form fields finally "click" the button "upload flashcards" <table width="70%" class="cssCenter" border="0"> <tr> <td style="width: 1%">Deck&nbsp;Code</td> <td style="width: 100%"><input name="ctlDeckCode" type="text" id="ctlDeckCode" style="width:50%;" /> (no spaces allowed)</td> <td></td> </tr> <tr> <td style="width: 1%">Deck&nbsp;Name</td> <td style="width: 100%"><input name="ctlDeckName" type="text" id="ctlDeckName" style="width:50%;" /> (optional)</td> <td style="width: 1%" align="right"><input type="submit" name="ctlUpload" value="Upload Flashcards" id="ctlUpload" /></td> </tr> <tr> <td valign="top" style="padding-top: 5px" >Flashcard&nbsp;Text</td> <td colspan="2"><textarea name="ctlFlashcardText" rows="2" cols="20" id="ctlFlashcardText" style="height:280px;width:100%;"></textarea></td> </tr> </table> If someone kindly could jump in showing how to address just one of the input fields and how to "click" the "upload flashcards" button, I should be able to do the rest myself. TIA, Rudi.
  5. Hi all, I've written the script below to automatically login to a website, in this case infusionsoft.com The auto login works fine. Is there a way for me to get errors from Internet explorer, if the login fails because of wrong login credentials. I have searched around, but cannot make sense of this. Please forgive me if I have overlooked something simple. I am new to autoit. Please see my script below. #include <IE.au3> #include <MsgBoxConstants.au3> Func AccountAutoLogin() ;This line sets the website page to open and inject information Global $oIE = _IECreate("https://signin.infusionsoft.com/login") ;set the variables to pull the username and password object names Local $username = _IEGetObjByName ($oIE, "username") Local $password = _IEGetObjByName ($oIE, "password") ;set the $oButtons variable to pull all the values of the button class Local $oButtons = _IETagnameGetCollection($oIE, "button") ;set the username and password values on the login form _IEFormElementSetValue ($username, "") _IEFormElementSetValue ($password, "") ; loop through the button class until we find the text on the login button, then click the button For $oButton in $oButtons If String($oButton.value) = " Log In " Then $test = $oButtons _IEAction($oButton, "click") _IELoadWait($oIE) if (@error) then MsgBox (0, "Error", @error) ExitLoop Next EndFunc
  6. I have a workplace GUI that has a search field function that pulls up customer records to allow changes. I am attempting to 1)LOGIN 2)Enter Search field, enter a number and then {ENTER} 3)change specific field once customer record loads. I have very limited experience in GUI manipulation but I am able to login using the below: #include <IE.au3> Const $navOpenInNewTab = 0x0800 Dim $oIE = _IECreate('http://asag.xxxxxxx.com/ASAG/index.htm') Call ("RacksheetSignIn") Func RacksheetSignIn () Local $username = _IEGetObjByName ($oIE,"uname") Local $password = _IEGetObjByName ($oIE,"pword") $oIE.Navigate2('http://asag.xxxxxxx.com/apps/RackSheets/LogInSAG/login.asp',2048) _IEFormElementSetValue ($username, "xxxxxxx") _IEFormElementSetValue ($password, "xxxxxxx") Send('{Enter}') EndFunc However I can't seem to use the _IEGetObjByName or Mouseclick to focus on the search field to allow me to enter my search criteria. When I "inspect element" in the Search field I get the attached: Any help would be MUCH appreciated
  7. Hi All I am new to AutoIT, its community, and pretty much programming in general. After a bit of online research, I decided to focus on AutoIT as my first programming attempt as it seems quite powerful and amazing once you become advanced at it. I have read some introductory pdfs which where good, including from the guy I think who invented it. I also watched various sketchy youtube videos, checked out the forum etc. I have to admit it's a bit confusing starting off but I reckon if I just keep pushing forward with continual hard work I can only get better. My first AutoIT project has been to open Internet Explorer and automatically log into Twitter to save doing it manually. I plan to run this after windows start up via task scheduler. I am using the #include <IE.au3> UDF but for some reason about 20% of the time I receive the following orange error notifications at the bottom of the editor (pic attached). When it happens the IE browser just doesn't open but the program continues to run which mucks up the script. Does anyone know why this is happening and how it can be fixed? Also is there some other better, less error prone way, to open IE and automatically log in? I have tried to use the Get Object NAME and ID commands to insert the username and password (i.e. the xxxxxxxxxx's) but when I right click to use "Inspect element" there is no name or id. It seems to be some sort of java script reference? I am using Windows 7 with latest updates and Internet Explorer version 11. As this is my first post I hope I am following protocols, and if not, please let me know and I will improve. Thanks
  8. For the below form, I am able to automate using below code for textboxes. #include <IE.au3> Local $oIE = _IEAttach("http://localhost:18170/MartAdmin/", "url") _IELoadWait($oIE) $Search = _IEGetObjById($oIE,"x-auto-16-input") _IEPropertySet($Search, 'innerText','Uday KIran') $Search = _IEGetObjById($oIE,"x-auto-18-input") _IEPropertySet($Search, 'innerText','Uday KIran') But for the Login button, there is no id or name. The html code when I click on Inspect element in browser, shown below. <button tabindex="0" class="x-btn-text" style="width: 64px; position: relative;" type="button">Log In</button> Please let me know how to click this.?
  9. I'm doing a script to login and check my grades for college and some other useful things. But how can I check if i'm already logged in. What I have tried is to _IEDocReadHTML and then try to read the string with my username or anything that indicates I am logged. But it never returns the actually real html that I am seeing on my browser. It only returned a logged out html version. Anyway I can find out when I am logged or not. Thanks.
  10. Hi guys, I was trying to automate a webpage after getting input from excel. The script worked fine for like 5 iterations but then stopped all of a sudden, I dont have the exact error msg now, but it was pointing to this in the IE UDF:- Return SetError($_IESTATUS_Success, $oTemp.GetElementsByTagName($sTagName).length, When i looked up the forum there was a similar question which said that I have to fix KB 3008923 update by uninstalling it, but I am unable to do that. here is the link for download:- ( i guess ) https://support.microsoft.com/en-us/help/3024777/error-0x800706f7-occurs-after-you-install-kb-3004394-and-then-run-windows-update-in-windows-7-and-windows-server-2008-r2 Does anybody know the proper steps to solve this?? Plus I wont be able to send the code here because of privacy policy n all by the company. Desperately looking for a reply.....
  11. Hello there, https://stackoverflow.com/questions/901712/how-to-check-whether-a-checkbox-is-checked-in-jquery I want to check the checkbox in the frame which pops up after choosing "run code snippet" option. ( Internet Explorer one would be prefered ) Can you please please send the right code or some snippet here..
  12. Hi All, I have a question related to _IEFormElementOptionSelect in the reference file. This drop down contains three items; Homepage, Midipage, Freepage. How can I get the name of these items? If I use .innertext, in another drop down list contains spaces, so I cannot split them. ; Open a browser with the form example, get reference to form, get reference ; to select element, cycle 10 times selecting options byValue, byText and byIndex #include <IE.au3> Local $oIE = _IE_Example("form") Local $oForm = _IEFormGetObjByName($oIE, "ExampleForm") Local $oSelect = _IEFormElementGetObjByName($oForm, "selectExample") _IEAction($oSelect, "focus") For $i = 1 To 10 _IEFormElementOptionSelect($oSelect, "Freepage", 1, "byText") Sleep(10) _IEFormElementOptionSelect($oSelect, "midipage.html", 1, "byValue") Sleep(10) _IEFormElementOptionSelect($oSelect, 0, 1, "byIndex") Sleep(10) Next _IEQuit($oIE) ;== Question == $aItems = StringSplit($oSelect.innerText, " ") For $i = 1 To $aItems[0] - 1 ConsoleWrite("Item-" & $i & ": " & $aItems[$i] & @CRLF) Next
  13. Because there is no GPO/GPP to set the printing margins to the minimum size in Internet Explorer, I was searching a way to achieve it with a script. Well, not easy... An easy way to set the margins to there minimum size is to set margin values to 0 from the Page setup window in Internet Explorer. When you re-open the Page setup window, the margins are set to there minimum sizes. It's because the minimum margins are based on the default printer's capabilities. When we set the margins values in the Page setup window, Internet Explorer checks if each value can me supported by the default printer, else it uses the minimum size from the printer capabilities. We could think that we have just to set the registry margins values to 0 but no, the Page setup window keeps 0 for each margin, so it doesn't work. Here is the code I made to define the margins, without using the Page setup from Internet Explorer : #Include <WinAPI.au3> #include <WinAPISys.au3> Global Const $PHYSICALOFFSETX = 112 Global Const $PHYSICALOFFSETY = 113 Global Const $LOGPIXELSX = 88 Global Const $LOGPIXELSY = 90 Global Const $PHYSICALWIDTH = 110 Global Const $PHYSICALHEIGHT = 111 Global Const $HORZRES = 8 Global Const $VERTRES = 10 Global $aRes = DllCall("GDI32.dll", "hwnd", "CreateDC", "str", "winspool", "str", _WinAPI_GetDefaultPrinter(), "long", 0, "long", 0) If @error Then Exit Global $hPrintDc = $aRes[0] Global $iLOGPIXELSX = _WinAPI_GetDeviceCaps($hPrintDc, $LOGPIXELSX) Global $iLOGPIXELSY = _WinAPI_GetDeviceCaps($hPrintDc, $LOGPIXELSY) Global $iPHYSICALWIDTH = _WinAPI_GetDeviceCaps($hPrintDc, $PHYSICALWIDTH) Global $iPHYSICALHEIGHT = _WinAPI_GetDeviceCaps($hPrintDc, $PHYSICALHEIGHT) Global $iHORZRES = _WinAPI_GetDeviceCaps($hPrintDc, $HORZRES) Global $iVERTRES = _WinAPI_GetDeviceCaps($hPrintDc, $VERTRES) Global $iPHYSICALOFFSETX = _WinAPI_GetDeviceCaps($hPrintDc, $PHYSICALOFFSETX) Global $iPHYSICALOFFSETY = _WinAPI_GetDeviceCaps($hPrintDc, $PHYSICALOFFSETY) Global $iMarginsLeft = $iPHYSICALOFFSETX / $iLOGPIXELSX Global $iMarginsTop = $iPHYSICALOFFSETY / $iLOGPIXELSY Global $iMarginsBottom = (($iPHYSICALHEIGHT - $iVERTRES) / $iLOGPIXELSY) - ($iPHYSICALOFFSETY / $iLOGPIXELSY) Global $iMarginsRight = (($iPHYSICALWIDTH - $iHORZRES) / $iLOGPIXELSX) - ($iPHYSICALOFFSETX / $iLOGPIXELSX) RegWrite("HKCU\Software\Microsoft\Internet Explorer\PageSetup", "margin_bottom", "REG_SZ", $iMarginsBottom) RegWrite("HKCU\Software\Microsoft\Internet Explorer\PageSetup", "margin_left", "REG_SZ", $iMarginsLeft) RegWrite("HKCU\Software\Microsoft\Internet Explorer\PageSetup", "margin_right", "REG_SZ", $iMarginsRight) RegWrite("HKCU\Software\Microsoft\Internet Explorer\PageSetup", "margin_top", "REG_SZ", $iMarginsTop) The code was adapted from here : http://www.swissdelphicenter.ch/en/printcode.php?id=1039 I hope it will be useful for someone
  14. Hi, I've written a script to automate the logging in to a website and the generation of results as shown in Capture1.JPG You'll see the number of results is displayed at the top, 12 in this case. What I can't work out is how to read that number into a variable. The section of code from the site is displayed in Capture2.JPG The only way I can think is to read the whole page with _IEBodyReadText($oIE) then use StringInStr to find it, however the result may be 1, 2 or 3 digits depending on the number of results so I'm not sure how that would be coded. Any help greatly appreciated.
  15. Hey, So I've written this code which successfully populates a form but when 'Calculate' is clicked it says that the loan amount & purchase price need to be entered; which of course they have been. Any idea why? Here's the form https://online.leedsbuildingsociety.co.uk/public/mortgages/quick_enquiry.do Here's the code:- Local $oIE = _IECreate("https://online.leedsbuildingsociety.co.uk/public/mortgages/quick_enquiry.do") If Not IsObj($oIE) Then Exit ConsoleWrite("Error in $oIE" & @CRLF) Local $oIE = _IEAttach("Leeds Building Society - Borrowing Calculator") _IELoadWait($oIE) $oSelect = _IEGetObjByName($oIE, "termYears") $oSelect.Value = $MtgTermYrs $oSelect = _IEGetObjByName($oIE, "termMonths") $oSelect.Value = $MtgTermMths $oSelect = _IEGetObjByName($oIE, "adults17Over") $oSelect.Value = ($NumOfApplicants + $OtherAdultOccupants) Local $TotalDependents = ($Deps10To5 + $Deps16To11 + $Deps112To17 + $Deps20To5 + $Deps26To11 + $Deps212To17) If $TotalDependents > 0 Then $oSelect = _IEGetObjByName($oIE, "childrenUnder17") $oSelect.Value = $TotalDependents Else EndIf $Blah2 = ($MonthlyPensionIncomeOne + $MonthlyPensionCreditIncomeOne + $MonthlyInvestmentIncomeOne) $Blah2 = $Blah2 * 12 $oSelect = _IEGetObjByName($oIE, "applicantOneGrossIncome") $oSelect.Value = ($SalaryOne + $Blah2 + $SalaryPlusDividendsLatestYrOne) $oSelect = _IEGetObjByName($oIE, "applicantOneCommission") $Blah1 = (($BonusOne + $OvertimeOne + $CommissionOne) + ($MonthlyMaintenanceIncomeOne * 12)) $oSelect.Value = $Blah1 $oSelect = _IEGetObjByName($oIE, "applicantOneOvertimeOrBonus") $oSelect.Value = ($MonthlyUniversalTaxCreditIncomeOne * 12) $Blah2 = ($MonthlyPensionIncomeTwo + $MonthlyPensionCreditIncomeTwo + $MonthlyInvestmentIncomeTwo) $Blah2 = $Blah2 * 12 $oSelect = _IEGetObjByName($oIE, "applicantTwoGrossIncome") $oSelect.Value = ($SalaryTwo + $Blah2 + $SalaryPlusDividendsLatestYrTwo) $oSelect = _IEGetObjByName($oIE, "applicantTwoCommission") $Blah1 = (($BonusTwo + $OvertimeTwo + $CommissionTwo) + ($MonthlyMaintenanceIncomeTwo * 12)) $oSelect.Value = $Blah1 $oSelect = _IEGetObjByName($oIE, "applicantTwoOvertimeOrBonus") $oSelect.Value = ($MonthlyUniversalTaxCreditIncomeTwo * 12) $oSelect = _IEGetObjByName($oIE, "applicantOneLastYearProfit") $oSelect.Value = ($NetPreTaxProfitLatestYrOne + $ShareOfNetPreTaxProfitLatestYrOne) $oSelect = _IEGetObjByName($oIE, "applicantOneYear2Profit") $oSelect.Value = ($NetPreTaxProfitPrevYrOne + $ShareOfNetPreTaxProfitPrevYrOne) $oSelect = _IEGetObjByName($oIE, "applicantTwoLastYearProfit") $oSelect.Value = ($NetPreTaxProfitLatestYrTwo + $ShareOfNetPreTaxProfitLatestYrTwo) $oSelect = _IEGetObjByName($oIE, "applicantTwoYear2Profit") $oSelect.Value = ($NetPreTaxProfitPrevYrTwo + $ShareOfNetPreTaxProfitPrevYrTwo) $PropertyValue = _IEGetObjByName($oIE, "purchasePriceValuation") $PropertyValue.Value = $PP $MortgageRequired = _IEGetObjByName($oIE, "repaymentAmount") $MortgageRequired.Value = $MtgAmt $oSelect = _IEGetObjByName($oIE, "interestOnlyAmount") $oSelect.Value = 0 $Button = _IEGetObjByName($oIE, "calculateBtn.value") _IEAction($Button, "click") _IELoadWait($oIE) Exit Obviously I've got values stored in all the variables so I haven't posted all that code.
  16. How do I click the 'Calculate' image at the bottom of this page? https://www.platform.co.uk/webapp/WEBAPP.EXE?WSYD_EVENT=PW10kkfF
  17. I'm having unpredictable results - rather than post all the code right away (as it's quite lengthy) I've attached an image of the code section in question and an image of the result I'm getting and an image of the result I'm expecting. As you'll see, box 1 and 2 under Source have the default 'Please select' whereas they should have 'Working Tax Credits' and 'Disability living allowance' in 1 and 2 respectively. Whilst watching the code run I can see the correct results are being selected but by the time the script finishes executing those boxes have changed back to default. Here's the site https://www.platform.co.uk/webapp/WEBAPP.EXE?WSYD_EVENT=PW10kkfF I should mention that if I add in a delay e.g. Sleep(500) then selection remains as expected - but I would rather not do this as it slows the script down. If $MonthlyUniversalTaxCreditIncomeOne > 0 Then $oSelect = _IEGetObjByName($oIE, "AP1AMT1") $oSelect.Value = ($MonthlyUniversalTaxCreditIncomeOne * 12) $oSelect = _IEGetObjByName($oIE, "OGICMB1A") _IEFormElementOptionSelect($oSelect, 8, 1, "byValue") Else EndIf If $MonthlyStateDisabilityIncomeOne > 0 Then $oSelect = _IEGetObjByName($oIE, "AP1AMT2") $oSelect.Value = ($MonthlyStateDisabilityIncomeOne * 12) $oSelect = _IEGetObjByName($oIE, "OGICMB1B") _IEFormElementOptionSelect($oSelect, 10, 1, "byValue") Else EndIf
  18. I've written a program with the help of others on here (thank-you) that interacts with this website http://nationwide-intermediary.co.uk/calculators/aff_calc You will notice if you visit that website that when you try to navigate away or close the window/tab there is a pop-up that checks that you want to leave the site. Currently to handle this I simply Send("{ENTER}") After a short delay to allow time for the pop-up to appear. This works but isn't ideal as often this program will run without user attention to the computer and so if focus is taken away from IE when the {ENTER} is sent it will not get executed and IE will remain open. Is there a better way to handle this pop-up and close the browser?
  19. Is there a way to read just the text within a <div> container with a specific id using _IEBodyReadText ? <div id="results"> Results </div>
  20. Ok so I'm writing an AutoIT script to interact with a Javascript based form on this website http://www.nationwide-intermediary.co.uk/calculators/aff_calc With the help of MichaelHB I've been successful in completing the whole form and obtaining a result using fixed values for entries to the form. Now I'm at the stage where I'm replacing the fixed values with variables that are read into an array from a text file. However, despite using the same data as was previously hard coded and the same input method ['Send' as this is all that works] when I get to the second page of the form I am encountering a problem. So the second page is about employment type and income details. If there are two applicants and they have the same employment type, then the form is completed correctly. However if the employment types differ (which would be common in reality) then there is a problem whereby despite my attempts to strip the irrelevant information, certain fields are missing figures and other fields end up containing multiple entries. Below is the code up to the stage of the form where it breaks, I'll also attach the Data.txt file that is being read which needs to be in the same folder as the script if you wish to run it. To change employment types change the text in Data.txt after the : for the relevant line with the corresponding text from section $EmpTypeOne and $EmpTypeTwo e.g. Employed, SEP, SEST, Director <20% S/H - remember to save the Data.txt file after making any changes so they are written to the file before being read by the script. #include <IE.au3> #include <Date.au3> #include <File.au3> #include <Array.au3> $aArray = 0 If Not _FileReadToArray(@ScriptDir & "\Data.txt", $aArray) Then $SystemTime = _Date_Time_GetLocalTime() $CurrentTime = _Date_Time_SystemTimeToDateTimeStr($SystemTime) $Error = FileOpen(@ScriptDir & "\Error.txt", $FO_APPEND) FileWriteLine($Error, $CurrentTime & " - Couldn't open Data.txt file : Error " & @error) Exit EndIf $BuyOrRemo = _ArrayToString($aArray, ":", 1, 1) If StringInStr($BuyOrRemo, "Purchase") Then $BuyOrRemo = 1 ; Purchase ElseIf StringInStr($BuyOrRemo, "Remortgage") Then $BuyOrRemo = 2 ; Remortgage EndIf ConsoleWrite($BuyOrRemo & @CRLF) $MtgAmtRaw = _ArrayToString($aArray, ":", 2, 2) $MtgAmtStart = StringInStr($MtgAmtRaw, ":") $MtgAmt = StringMid($MtgAmtRaw, ($MtgAmtStart + 1), 8) ConsoleWrite($MtgAmt & @CRLF) $MtgTermYrsRaw = _ArrayToString($aArray, ":", 3, 3) $MtgTermStart = StringInStr($MtgTermYrsRaw, ":") $MtgTermYrs = StringMid($MtgTermYrsRaw, ($MtgTermStart + 1), 2) ConsoleWrite($MtgTermYrs & @CRLF) $MtgTermMthsRaw = _ArrayToString($aArray, ":", 4, 4) $MtgTermMthsStart = StringInStr($MtgTermMthsRaw, ":") $MtgTermMths = StringMid($MtgTermMthsRaw, ($MtgTermMthsStart + 1), 2) ConsoleWrite($MtgTermMths & @CRLF) $NumOfApplicants = _ArrayToString($aArray, ":", 5, 5) If StringInStr($NumOfApplicants, "1") Then $NumOfApplicants = 3 ; One ElseIf StringInStr($NumOfApplicants, "2") Then $NumOfApplicants = 4 ; Two EndIf ConsoleWrite($NumOfApplicants & @CRLF) $OwnershipType = _ArrayToString($aArray, ":", 6, 6) If StringInStr($OwnershipType, "Standard") Then $OwnershipType = 4 ; Standard ElseIf StringInStr($OwnershipType, "Equity Share") Then $OwnershipType = 5 ; Equity Share ElseIf StringInStr($OwnershipType, "Right To Buy") Then $OwnershipType = 6 ; Right to buy ElseIf StringInStr($OwnershipType, "Shared Ownership") Then $OwnershipType = 7 ; Shared Ownership EndIf ConsoleWrite($OwnershipType & @CRLF) $FoundProperty = _ArrayToString($aArray, ":", 7, 7) If StringInStr($FoundProperty, "Yes") Then $FoundProperty = 5 ; Applicant(s) have found a property ElseIf StringInStr($FoundProperty, "No") Then $FoundProperty = 6 ; Applicant(s) have not found a property EndIf ConsoleWrite($FoundProperty & @CRLF) $Tenure = _ArrayToString($aArray, ":", 8, 8) If StringInStr($Tenure, "Freehold") Then $Tenure = 9 ; Freehold ElseIf StringInStr($Tenure, "Leasehold") Then $Tenure = 10 ; Leasehold EndIf ConsoleWrite($Tenure & @CRLF) $PropType = _ArrayToString($aArray, ":", 9, 9) If StringInStr($PropType, "Detached House") Then $PropType = 14 ; Detached House ElseIf StringInStr($PropType, "Detached Bungalow") Then $PropType = 15 ; Detached Bungalow ElseIf StringInStr($PropType, "Semi-Detached Bungalow") Then $PropType = 16 ; Semi-Detached Bungalow ElseIf StringInStr($PropType, "Terraced Bungalow") Then $PropType = 17 ; Terraced Bungalow ElseIf StringInStr($PropType, "Semi-Detached House") Then $PropType = 18 ; Semi-Detached House ElseIf StringInStr($PropType, "Terraced House") Then $PropType = 19 ; Terraced House ElseIf StringInStr($PropType, "Purpose-built Flat/Maisonette") Then $PropType = 20 ; Purpose-built Flat/Maisonette ElseIf StringInStr($PropType, "Converted Flat/Maisonette") Then $PropType = 21 ; Converted Flat/Maisonette EndIf ConsoleWrite($PropType & @CRLF) $PPRaw = _ArrayToString($aArray, ":", 10, 10) $PPStart = StringInStr($PPRaw, ":") $PP = StringMid($PPRaw, ($PPStart + 1), 8) ConsoleWrite($PP & @CRLF) $DOB1Raw = _ArrayToString($aArray, ":", 11, 11) $DOB1Start = StringInStr($DOB1Raw, ":") $DOB1 = StringMid($DOB1Raw, ($DOB1Start + 1), 8) ConsoleWrite($DOB1 & @CRLF) $DOB2Raw = _ArrayToString($aArray, ":", 12, 12) $DOB2Start = StringInStr($DOB2Raw, ":") $DOB2 = StringMid($DOB2Raw, ($DOB2Start + 1), 8) ConsoleWrite($DOB2 & @CRLF) $Gender1 = _ArrayToString($aArray, ":", 13, 13) If StringInStr($Gender1, "M") Then $Gender1 = 1 ; 1 = Male ElseIf StringInStr($Gender1, "F") Then $Gender1 = 2 ; 2 = Female EndIf ConsoleWrite($Gender1 & @CRLF) $Gender2 = _ArrayToString($aArray, ":", 14, 14) If StringInStr($Gender2, "M") Then $Gender2 = 4 ; 4 = Male ElseIf StringInStr($Gender2, "F") Then $Gender2 = 5 ; 5 = Female EndIf ConsoleWrite($Gender2 & @CRLF) $Dependents1 = _ArrayToString($aArray, ":", 15, 15) If StringInStr($Dependents1, "Yes") Then $Dependents1 = 2 ; Has dependents ElseIf StringInStr($Dependents1, "No") Then $Dependents1 = 3 ; No dependents EndIf ConsoleWrite($Dependents1 & @CRLF) $Dependents2 = _ArrayToString($aArray, ":", 16, 16) If StringInStr($Dependents2, "Yes") Then $Dependents2 = 4 ; Has dependents ElseIf StringInStr($Dependents2, "No") Then $Dependents2 = 5 ; No dependents EndIf ConsoleWrite($Dependents2 & @CRLF) $Deps11Result = _ArrayToString($aArray, ":", 17, 17) $Deps1Start = StringInStr($Deps11Result, ":") $Deps10To5 = StringMid($Deps11Result, ($Deps1Start + 1), 2) ConsoleWrite($Deps10To5 & @CRLF) $Deps12Result = _ArrayToString($aArray, ":", 18, 18) $Deps1Start = StringInStr($Deps12Result, ":") $Deps16To11 = StringMid($Deps12Result, ($Deps1Start + 1), 2) ConsoleWrite($Deps16To11 & @CRLF) $Deps13Result = _ArrayToString($aArray, ":", 19, 19) $Deps1Start = StringInStr($Deps13Result, ":") $Deps112To17 = StringMid($Deps13Result, ($Deps1Start + 1), 2) ConsoleWrite($Deps112To17 & @CRLF) $Deps14Result = _ArrayToString($aArray, ":", 20, 20) $Deps1Start = StringInStr($Deps14Result, ":") $Deps118Plus = StringMid($Deps14Result, ($Deps1Start + 1), 2) ConsoleWrite($Deps118Plus & @CRLF) $Deps21Result = _ArrayToString($aArray, ":", 21, 21) $Deps2Start = StringInStr($Deps21Result, ":") $Deps20To5 = StringMid($Deps21Result, ($Deps2Start + 1), 2) ConsoleWrite($Deps20To5 & @CRLF) $Deps22Result = _ArrayToString($aArray, ":", 22, 22) $Deps2Start = StringInStr($Deps22Result, ":") $Deps26To11 = StringMid($Deps22Result, ($Deps2Start + 1), 2) ConsoleWrite($Deps26To11 & @CRLF) $Deps23Result = _ArrayToString($aArray, ":", 23, 23) $Deps2Start = StringInStr($Deps23Result, ":") $Deps212To17 = StringMid($Deps23Result, ($Deps2Start + 1), 2) ConsoleWrite($Deps212To17 & @CRLF) $Deps24Result = _ArrayToString($aArray, ":", 24, 24) $Deps2Start = StringInStr($Deps24Result, ":") $Deps218Plus = StringMid($Deps24Result, ($Deps2Start + 1), 2) ConsoleWrite($Deps218Plus & @CRLF) $Retired1 = _ArrayToString($aArray, ":", 25, 25) If StringInStr($Retired1, "Yes") Then $Retired1 = 14 ; 14 = Retired ElseIf StringInStr($Retired1, "No") Then $Retired1 = 15 ; 15 = Not retired EndIf ConsoleWrite($Retired1 & @CRLF) $Retired2 = _ArrayToString($aArray, ":", 26, 26) If StringInStr($Retired2, "Yes") Then $Retired2 = 16 ; 16 = Retired ElseIf StringInStr($Retired2, "No") Then $Retired2 = 17 ; 17 = Not retired EndIf ConsoleWrite($Retired2 & @CRLF) $RetAge1Raw = _ArrayToString($aArray, ":", 27, 27) $RetAge1Start = StringInStr($RetAge1Raw, ":") $RetAge1 = StringMid($RetAge1Raw, ($RetAge1Start + 1), 2) ConsoleWrite($RetAge1 & @CRLF) $RetAge2Raw = _ArrayToString($aArray, ":", 28, 28) $RetAge2Start = StringInStr($RetAge2Raw, ":") $RetAge2 = StringMid($RetAge2Raw, ($RetAge2Start + 1), 2) ConsoleWrite($RetAge2 & @CRLF) $EmpTypeOne = _ArrayToString($aArray, ":", 29, 29) if StringInStr($EmpTypeOne, "Unemployed") Then $EmpTypeOne = 9 ; Unemployed ElseIf StringInStr($EmpTypeOne, "SEP") Then $EmpTypeOne = 2 ; Self-employed (parter) ElseIf StringInStr($EmpTypeOne, "SEST") Then $EmpTypeOne = 3 ; Self-employed (sole trader) ElseIf StringInStr($EmpTypeOne, "Director <20% S/H") Then $EmpTypeOne = 4 ; Director with less than a 20% share-holding ElseIf StringInStr($EmpTypeOne, "Director =>20% S/H") Then $EmpTypeOne = 5 ; Director with equal to or more than 20% share-holding ElseIf StringInStr($EmpTypeOne, "Retired") Then $EmpTypeOne = 6 ; Retired ElseIf StringInStr($EmpTypeOne, "Homemaker") Then $EmpTypeOne = 7 ; Homemaker ElseIf StringInStr($EmpTypeOne, "Student") Then $EmpTypeOne = 8 ; Student ElseIf StringInStr($EmpTypeOne, "Employed") Then $EmpTypeOne = 1 ; Employed EndIf ConsoleWrite($EmpTypeOne & @CRLF) $EmpTypeTwo = _ArrayToString($aArray, ":", 30, 30) if StringInStr($EmpTypeTwo, "Unemployed") Then $EmpTypeTwo = 19 ; Unemployed ElseIf StringInStr($EmpTypeTwo, "SEP") Then $EmpTypeTwo = 12 ; Self-employed (parter) ElseIf StringInStr($EmpTypeTwo, "SEST") Then $EmpTypeTwo = 13 ; Self-employed (sole trader) ElseIf StringInStr($EmpTypeTwo, "Director <20% S/H") Then $EmpTypeTwo = 14 ; Director with less than a 20% share-holding ElseIf StringInStr($EmpTypeTwo, "Director =>20% S/H") Then $EmpTypeTwo = 15 ; Director with equal to or more than 20% share-holding ElseIf StringInStr($EmpTypeTwo, "Retired") Then $EmpTypeTwo = 16 ; Retired ElseIf StringInStr($EmpTypeTwo, "Homemaker") Then $EmpTypeTwo = 17 ; Homemaker ElseIf StringInStr($EmpTypeTwo, "Student") Then $EmpTypeTwo = 18 ; Student ElseIf StringInStr($EmpTypeTwo, "Employed") Then $EmpTypeTwo = 11 ; Employed EndIf ConsoleWrite($EmpTypeTwo & @CRLF) $EmpTenureOne = _ArrayToString($aArray, ":", 31, 31) if StringInStr($EmpTenureOne, "Permanent") Then $EmpTenureOne = 21 ; Permanent ElseIf StringInStr($EmpTenureOne, "Fixed Term Contract") Then $EmpTenureOne = 22 ; Fixed Term Contract ElseIf StringInStr($EmpTenureOne, "Sub-contractor (fixed term)") Then $EmpTenureOne = 23 ; Sub-contractor (fixed term) ElseIf StringInStr($EmpTenureOne, "Sub-contractor (open ended)") Then $EmpTenureOne = 24 ; Sub-contractor (open ended) ElseIf StringInStr($EmpTenureOne, "Temporary") Then $EmpTenureOne = 25 ; Temporary EndIf ConsoleWrite($EmpTenureOne & @CRLF) $EmpTenureTwo = _ArrayToString($aArray, ":", 32, 32) if StringInStr($EmpTenureTwo, "Permanent") Then $EmpTenureTwo = 27 ; Permanent ElseIf StringInStr($EmpTenureTwo, "Fixed Term Contract") Then $EmpTenureTwo = 28 ; Fixed Term Contract ElseIf StringInStr($EmpTenureTwo, "Sub-contractor (fixed term)") Then $EmpTenureTwo = 29 ; Sub-contractor (fixed term) ElseIf StringInStr($EmpTenureTwo, "Sub-contractor (open ended)") Then $EmpTenureTwo = 30 ; Sub-contractor (open ended) ElseIf StringInStr($EmpTenureTwo, "Temporary") Then $EmpTenureTwo = 31 ; Temporary EndIf ConsoleWrite($EmpTenureTwo & @CRLF) $TreatedAsEmployedOne = _ArrayToString($aArray, ":", 33, 33) If StringInStr($TreatedAsEmployedOne, "Yes") Then $TreatedAsEmployedOne = 0 ; Yes ElseIf StringInStr($TreatedAsEmployedOne, "No") Then $TreatedAsEmployedOne = 1 ; No EndIf ConsoleWrite($TreatedAsEmployedOne & @CRLF) $TreatedAsEmployedTwo = _ArrayToString($aArray, ":", 34, 34) If StringInStr($TreatedAsEmployedTwo, "Yes") Then $TreatedAsEmployedTwo = 2 ; Yes ElseIf StringInStr($TreatedAsEmployedTwo, "No") Then $TreatedAsEmployedTwo = 3 ; No EndIf ConsoleWrite($TreatedAsEmployedTwo & @CRLF) $YrsInJobOneRaw = _ArrayToString($aArray, ":", 35, 35) $YrsInJobOneStart = StringInStr($YrsInJobOneRaw, ":") $YrsInJobOne = StringMid($YrsInJobOneRaw, ($YrsInJobOneStart + 1), 2) ConsoleWrite($YrsInJobOne & @CRLF) $MthsInJobOneRaw = _ArrayToString($aArray, ":", 36, 36) $MthsInJobOneStart = StringInStr($MthsInJobOneRaw, ":") $MthsInJobOne = StringMid($MthsInJobOneRaw, ($MthsInJobOneStart + 1), 2) ConsoleWrite($MthsInJobOne & @CRLF) $YrsInJobTwoRaw = _ArrayToString($aArray, ":", 37, 37) $YrsInJobTwoStart = StringInStr($YrsInJobTwoRaw, ":") $YrsInJobTwo = StringMid($YrsInJobTwoRaw, ($YrsInJobTwoStart + 1), 2) ConsoleWrite($YrsInJobTwo & @CRLF) $MthsInJobTwoRaw = _ArrayToString($aArray, ":", 38, 38) $MthsInJobTwoStart = StringInStr($MthsInJobTwoRaw, ":") $MthsInJobTwo = StringMid($MthsInJobTwoRaw, ($MthsInJobTwoStart + 1), 2) ConsoleWrite($MthsInJobTwo & @CRLF) $YrsRemOnContractOneRaw = _ArrayToString($aArray, ":", 39, 39) $YrsRemOnContractOneStart = StringInStr($YrsRemOnContractOneRaw, ":") $YrsRemOnContractOne = StringMid($YrsRemOnContractOneRaw, ($YrsRemOnContractOneStart + 1), 2) ConsoleWrite($YrsRemOnContractOne & @CRLF) $MthsRemOnContractOneRaw = _ArrayToString($aArray, ":", 40, 40) $MthsRemOnContractOneStart = StringInStr($MthsRemOnContractOneRaw, ":") $MthsRemOnContractOne = StringMid($MthsRemOnContractOneRaw, ($MthsRemOnContractOneStart + 1), 2) ConsoleWrite($MthsRemOnContractOne & @CRLF) $YrsRemOnContractTwoRaw = _ArrayToString($aArray, ":", 41, 41) $YrsRemOnContractTwoStart = StringInStr($YrsRemOnContractTwoRaw, ":") $YrsRemOnContractTwo = StringMid($YrsRemOnContractTwoRaw, ($YrsRemOnContractTwoStart + 1), 2) ConsoleWrite($YrsRemOnContractTwo & @CRLF) $MthsRemOnContractTwoRaw = _ArrayToString($aArray, ":", 42, 42) $MthsRemOnContractTwoStart = StringInStr($MthsRemOnContractTwoRaw, ":") $MthsRemOnContractTwo = StringMid($MthsRemOnContractTwoRaw, ($MthsRemOnContractTwoStart + 1), 2) ConsoleWrite($MthsRemOnContractTwo & @CRLF) $SalaryOneRaw = _ArrayToString($aArray, ":", 43, 43) $SalaryOneStart = StringInStr($SalaryOneRaw, ":") $SalaryOne = StringMid($SalaryOneRaw, ($SalaryOneStart + 1), 8) ConsoleWrite($SalaryOne & @CRLF) $SalaryTwoRaw = _ArrayToString($aArray, ":", 44, 44) $SalaryTwoStart = StringInStr($SalaryTwoRaw, ":") $SalaryTwo = StringMid($SalaryTwoRaw, ($SalaryTwoStart + 1), 8) ConsoleWrite($SalaryTwo & @CRLF) $BonusOneRaw = _ArrayToString($aArray, ":", 45, 45) $BonusOneStart = StringInStr($BonusOneRaw, ":") $BonusOne = StringMid($BonusOneRaw, ($BonusOneStart + 1), 8) ConsoleWrite($BonusOne & @CRLF) $BonusTwoRaw = _ArrayToString($aArray, ":", 46, 46) $BonusTwoStart = StringInStr($BonusTwoRaw, ":") $BonusTwo = StringMid($BonusTwoRaw, ($BonusTwoStart + 1), 8) ConsoleWrite($BonusTwo & @CRLF) $OvertimeOneRaw = _ArrayToString($aArray, ":", 47, 47) $OvertimeOneStart = StringInStr($OvertimeOneRaw, ":") $OvertimeOne = StringMid($OvertimeOneRaw, ($OvertimeOneStart + 1), 8) ConsoleWrite($OvertimeOne & @CRLF) $OvertimeTwoRaw = _ArrayToString($aArray, ":", 48, 48) $OvertimeTwoStart = StringInStr($OvertimeTwoRaw, ":") $OvertimeTwo = StringMid($OvertimeTwoRaw, ($OvertimeTwoStart + 1), 8) ConsoleWrite($OvertimeTwo & @CRLF) $CommissionOneRaw = _ArrayToString($aArray, ":", 49, 49) $CommissionOneStart = StringInStr($CommissionOneRaw, ":") $CommissionOne = StringMid($CommissionOneRaw, ($CommissionOneStart + 1), 8) ConsoleWrite($CommissionOne & @CRLF) $CommissionTwoRaw = _ArrayToString($aArray, ":", 50, 50) $CommissionTwoStart = StringInStr($CommissionTwoRaw, ":") $CommissionTwo = StringMid($CommissionTwoRaw, ($CommissionTwoStart + 1), 8) ConsoleWrite($CommissionTwo & @CRLF) $NetPreTaxProfitLatestYrOneRaw = _ArrayToString($aArray, ":", 51, 51) $NetPreTaxProfitLatestYrOneStart = StringInStr($NetPreTaxProfitLatestYrOneRaw, ":") $NetPreTaxProfitLatestYrOne = StringMid($NetPreTaxProfitLatestYrOneRaw, ($NetPreTaxProfitLatestYrOneStart + 1), 8) ConsoleWrite($NetPreTaxProfitLatestYrOne & @CRLF) $NetPreTaxProfitLatestYrTwoRaw = _ArrayToString($aArray, ":", 52, 52) $NetPreTaxProfitLatestYrTwoStart = StringInStr($NetPreTaxProfitLatestYrTwoRaw, ":") $NetPreTaxProfitLatestYrTwo = StringMid($NetPreTaxProfitLatestYrTwoRaw, ($NetPreTaxProfitLatestYrTwoStart + 1), 8) ConsoleWrite($NetPreTaxProfitLatestYrTwo & @CRLF) $NetPreTaxProfitPrevYrOneRaw = _ArrayToString($aArray, ":", 53, 53) $NetPreTaxProfitPrevYrOneStart = StringInStr($NetPreTaxProfitPrevYrOneRaw, ":") $NetPreTaxProfitPrevYrOne = StringMid($NetPreTaxProfitPrevYrOneRaw, ($NetPreTaxProfitPrevYrOneStart + 1), 8) ConsoleWrite($NetPreTaxProfitPrevYrOne & @CRLF) $NetPreTaxProfitPrevYrTwoRaw = _ArrayToString($aArray, ":", 54, 54) $NetPreTaxProfitPrevYrTwoStart = StringInStr($NetPreTaxProfitPrevYrTwoRaw, ":") $NetPreTaxProfitPrevYrTwo = StringMid($NetPreTaxProfitPrevYrTwoRaw, ($NetPreTaxProfitPrevYrTwoStart + 1), 8) ConsoleWrite($NetPreTaxProfitPrevYrTwo & @CRLF) $ShareOfNetPreTaxProfitLatestYrOneRaw = _ArrayToString($aArray, ":", 55, 55) $ShareOfNetPreTaxProfitLatestYrOneStart = StringInStr($ShareOfNetPreTaxProfitLatestYrOneRaw, ":") $ShareOfNetPreTaxProfitLatestYrOne = StringMid($ShareOfNetPreTaxProfitLatestYrOneRaw, ($ShareOfNetPreTaxProfitLatestYrOneStart + 1), 8) ConsoleWrite($ShareOfNetPreTaxProfitLatestYrOne & @CRLF) $ShareOfNetPreTaxProfitPrevYrOneRaw = _ArrayToString($aArray, ":", 56, 56) $ShareOfNetPreTaxProfitPrevYrOneStart = StringInStr($ShareOfNetPreTaxProfitPrevYrOneRaw, ":") $ShareOfNetPreTaxProfitPrevYrOne = StringMid($ShareOfNetPreTaxProfitPrevYrOneRaw, ($ShareOfNetPreTaxProfitPrevYrOneStart + 1), 8) ConsoleWrite($ShareOfNetPreTaxProfitPrevYrOne & @CRLF) $ShareOfNetPreTaxProfitLatestYrTwoRaw = _ArrayToString($aArray, ":", 57, 57) $ShareOfNetPreTaxProfitLatestYrTwoStart = StringInStr($ShareOfNetPreTaxProfitLatestYrTwoRaw, ":") $ShareOfNetPreTaxProfitLatestYrTwo = StringMid($ShareOfNetPreTaxProfitLatestYrTwoRaw, ($ShareOfNetPreTaxProfitLatestYrTwoStart + 1), 8) ConsoleWrite($ShareOfNetPreTaxProfitLatestYrTwo & @CRLF) $ShareOfNetPreTaxProfitPrevYrTwoRaw = _ArrayToString($aArray, ":", 58, 58) $ShareOfNetPreTaxProfitPrevYrTwoStart = StringInStr($ShareOfNetPreTaxProfitPrevYrTwoRaw, ":") $ShareOfNetPreTaxProfitPrevYrTwo = StringMid($ShareOfNetPreTaxProfitPrevYrTwoRaw, ($ShareOfNetPreTaxProfitPrevYrTwoStart + 1), 8) ConsoleWrite($ShareOfNetPreTaxProfitPrevYrTwo & @CRLF) $SalaryPlusDividendsLatestYrOneRaw = _ArrayToString($aArray, ":", 59, 59) $SalaryPlusDividendsLatestYrOneStart = StringInStr($SalaryPlusDividendsLatestYrOneRaw, ":") $SalaryPlusDividendsLatestYrOne = StringMid($SalaryPlusDividendsLatestYrOneRaw, ($SalaryPlusDividendsLatestYrOneStart + 1), 8) ConsoleWrite($SalaryPlusDividendsLatestYrOne & @CRLF) $SalaryPlusDividendsPrevYrOneRaw = _ArrayToString($aArray, ":", 60, 60) $SalaryPlusDividendsPrevYrOneStart = StringInStr($SalaryPlusDividendsPrevYrOneRaw, ":") $SalaryPlusDividendsPrevYrOne = StringMid($SalaryPlusDividendsPrevYrOneRaw, ($SalaryPlusDividendsPrevYrOneStart + 1), 8) ConsoleWrite($SalaryPlusDividendsPrevYrOne & @CRLF) $SalaryPlusDividendsLatestYrTwoRaw = _ArrayToString($aArray, ":", 61, 61) $SalaryPlusDividendsLatestYrTwoStart = StringInStr($SalaryPlusDividendsLatestYrTwoRaw, ":") $SalaryPlusDividendsLatestYrTwo = StringMid($SalaryPlusDividendsLatestYrTwoRaw, ($SalaryPlusDividendsLatestYrTwoStart + 1), 8) ConsoleWrite($SalaryPlusDividendsLatestYrTwo & @CRLF) $SalaryPlusDividendsPrevYrTwoRaw = _ArrayToString($aArray, ":", 62, 62) $SalaryPlusDividendsPrevYrTwoStart = StringInStr($SalaryPlusDividendsPrevYrTwoRaw, ":") $SalaryPlusDividendsPrevYrTwo = StringMid($SalaryPlusDividendsPrevYrTwoRaw, ($SalaryPlusDividendsPrevYrTwoStart + 1), 8) ConsoleWrite($SalaryPlusDividendsPrevYrTwo & @CRLF) $SecondJobOne = _ArrayToString($aArray, ":", 63, 63) If StringInStr($SecondJobOne, "Yes") Then $SecondJobOne = 32 ; Yes ElseIf StringInStr($SecondJobOne, "No") Then $SecondJobOne = 33 ; No EndIf ConsoleWrite($SecondJobOne & @CRLF) $SecondJobTwo = _ArrayToString($aArray, ":", 64, 64) If StringInStr($SecondJobTwo, "Yes") Then $SecondJobTwo = 34 ; Yes ElseIf StringInStr($SecondJobTwo, "No") Then $SecondJobTwo = 35 ; No EndIf ConsoleWrite($SecondJobTwo & @CRLF) If $EmpTypeOne = 5 Then ;MsgBox(1, "Information", "Applicant 1 is a Director =>20%") $SalaryOne = "" ; $SalaryTwo = "" $BonusOne = "" ; $BonusTwo = "" $OvertimeOne = "" ; $OvertimeTwo = "" $CommissionOne = "" ; $CommissionTwo = "" $NetPreTaxProfitLatestYrOne = "" ; $NetPreTaxProfitLatestYrTwo = "" $NetPreTaxProfitPrevYrOne = "" ; $NetPreTaxProfitPrevYrTwo = "" $ShareOfNetPreTaxProfitLatestYrOne = "" $ShareOfNetPreTaxProfitPrevYrOne = "" ; $ShareOfNetPreTaxProfitLatestYrTwo = "" ; $ShareOfNetPreTaxProfitPrevYrTwo = "" ;DoTheBusiness() EndIf If $EmpTypeTwo = 15 Then ;MsgBox(1, "Information", "Applicant 2 is a Director =>20%") ; $SalaryOne = "" $SalaryTwo = "" ; $BonusOne = "" $BonusTwo = "" ; $OvertimeOne = "" $OvertimeTwo = "" ; $CommissionOne = "" $CommissionTwo = "" ; $NetPreTaxProfitLatestYrOne = "" $NetPreTaxProfitLatestYrTwo = "" ; $NetPreTaxProfitPrevYrOne = "" $NetPreTaxProfitPrevYrTwo = "" ; $ShareOfNetPreTaxProfitLatestYrOne = "" ; $ShareOfNetPreTaxProfitPrevYrOne = "" $ShareOfNetPreTaxProfitLatestYrTwo = "" $ShareOfNetPreTaxProfitPrevYrTwo = "" ; DoTheBusiness() EndIf If $EmpTypeTwo = 13 Then ;MsgBox(1, "Information", "Applicant 2 is a Self-employed (sole trader)") ; $SalaryOne = "" $SalaryTwo = "" ; $BonusOne = "" $BonusTwo = "" ; $OvertimeOne = "" $OvertimeTwo = "" ; $CommissionOne = "" $CommissionTwo = "" ; $ShareOfNetPreTaxProfitLatestYrOne = "" ; $ShareOfNetPreTaxProfitPrevYrOne = "" $ShareOfNetPreTaxProfitLatestYrTwo = "" $ShareOfNetPreTaxProfitPrevYrTwo = "" ; $SalaryPlusDividendsLatestYrOne = "" ; $SalaryPlusDividendsPrevYrOne = "" $SalaryPlusDividendsLatestYrTwo = "" $SalaryPlusDividendsPrevYrTwo = "" ; DoTheBusiness() EndIf If $EmpTypeOne = 3 Then ;MsgBox(1, "Information", "Applicant 1 is a Self-employed (sole-trader)") $SalaryOne = "" ; $SalaryTwo = "" $BonusOne = "" ; $BonusTwo = "" $OvertimeOne = "" ; $OvertimeTwo = "" $CommissionOne = "" ; $CommissionTwo = "" $ShareOfNetPreTaxProfitLatestYrOne = "" $ShareOfNetPreTaxProfitPrevYrOne = "" ; $ShareOfNetPreTaxProfitLatestYrTwo = "" ; $ShareOfNetPreTaxProfitPrevYrTwo = "" $SalaryPlusDividendsLatestYrOne = "" $SalaryPlusDividendsPrevYrOne = "" ; $SalaryPlusDividendsLatestYrTwo = "" ; $SalaryPlusDividendsPrevYrTwo = "" ;DoTheBusiness() EndIf If $EmpTypeOne = 2 Then ;MsgBox(1, "Information", "Applicant 2 is a Self-employed (partner)") $SalaryOne = "" ; $SalaryTwo = "" $BonusOne = "" ; $BonusTwo = "" $OvertimeOne = "" ; $OvertimeTwo = "" $CommissionOne = "" ; $CommissionTwo = "" $NetPreTaxProfitLatestYrOne = "" ; $NetPreTaxProfitLatestYrTwo = "" $NetPreTaxProfitPrevYrOne = "" ; $NetPreTaxProfitPrevYrTwo = "" $SalaryPlusDividendsLatestYrOne = "" $SalaryPlusDividendsPrevYrOne = "" ; $SalaryPlusDividendsLatestYrTwo = "" ; $SalaryPlusDividendsPrevYrTwo = "" ;DoTheBusiness() EndIf If $EmpTypeTwo = 12 Then ;MsgBox(1, "Information", "Applicant 2 is a Self-employed (partner)") ; $SalaryOne = "" $SalaryTwo = "" ; $BonusOne = "" $BonusTwo = "" ; $OvertimeOne = "" $OvertimeTwo = "" ; $CommissionOne = "" $CommissionTwo = "" ; $NetPreTaxProfitLatestYrOne = "" $NetPreTaxProfitLatestYrTwo = "" ; $NetPreTaxProfitPrevYrOne = "" $NetPreTaxProfitPrevYrTwo = "" ; $SalaryPlusDividendsLatestYrOne = "" ; $SalaryPlusDividendsPrevYrOne = "" $SalaryPlusDividendsLatestYrTwo = "" $SalaryPlusDividendsPrevYrTwo = "" ; DoTheBusiness() EndIf If $EmpTypeOne = 1 Then ;MsgBox(1, "Information", "Applicant 1 is Employed") $NetPreTaxProfitLatestYrOne = "" $NetPreTaxProfitLatestYrTwo = "" $NetPreTaxProfitPrevYrOne = "" $NetPreTaxProfitPrevYrTwo = "" $ShareOfNetPreTaxProfitLatestYrOne = "" $ShareOfNetPreTaxProfitLatestYrTwo = "" $ShareOfNetPreTaxProfitPrevYrOne = "" $ShareOfNetPreTaxProfitPrevYrTwo = "" $SalaryPlusDividendsLatestYrOne = "" $SalaryPlusDividendsLatestYrTwo = "" $SalaryPlusDividendsPrevYrOne = "" $SalaryPlusDividendsPrevYrTwo = "" ; DoTheBusiness() ElseIf $EmpTypeOne = 4 Then ;MsgBox(1, "Information", "Applicant 1 is a Director <=20% share-holding") $NetPreTaxProfitLatestYrOne = "" $NetPreTaxProfitLatestYrTwo = "" $NetPreTaxProfitPrevYrOne = "" $NetPreTaxProfitPrevYrTwo = "" $ShareOfNetPreTaxProfitLatestYrOne = "" $ShareOfNetPreTaxProfitLatestYrTwo = "" $ShareOfNetPreTaxProfitPrevYrOne = "" $ShareOfNetPreTaxProfitPrevYrTwo = "" $SalaryPlusDividendsLatestYrOne = "" $SalaryPlusDividendsLatestYrTwo = "" $SalaryPlusDividendsPrevYrOne = "" $SalaryPlusDividendsPrevYrTwo = "" ; DoTheBusiness() EndIf If $EmpTypeTwo = 11 Then ;MsgBox(1, "Information", "Applicant 2 is Employed") $NetPreTaxProfitLatestYrOne = "" $NetPreTaxProfitLatestYrTwo = "" $NetPreTaxProfitPrevYrOne = "" $NetPreTaxProfitPrevYrTwo = "" $ShareOfNetPreTaxProfitLatestYrOne = "" $ShareOfNetPreTaxProfitLatestYrTwo = "" $ShareOfNetPreTaxProfitPrevYrOne = "" $ShareOfNetPreTaxProfitPrevYrTwo = "" $SalaryPlusDividendsLatestYrOne = "" $SalaryPlusDividendsLatestYrTwo = "" $SalaryPlusDividendsPrevYrOne = "" $SalaryPlusDividendsPrevYrTwo = "" ; DoTheBusiness() ElseIf $EmpTypeTwo = 14 Then ;MsgBox(1, "Information", "Applicant 2 is a Director <=20% share-holding") $NetPreTaxProfitLatestYrOne = "" $NetPreTaxProfitLatestYrTwo = "" $NetPreTaxProfitPrevYrOne = "" $NetPreTaxProfitPrevYrTwo = "" $ShareOfNetPreTaxProfitLatestYrOne = "" $ShareOfNetPreTaxProfitLatestYrTwo = "" $ShareOfNetPreTaxProfitPrevYrOne = "" $ShareOfNetPreTaxProfitPrevYrTwo = "" $SalaryPlusDividendsLatestYrOne = "" $SalaryPlusDividendsLatestYrTwo = "" $SalaryPlusDividendsPrevYrOne = "" $SalaryPlusDividendsPrevYrTwo = "" ; DoTheBusiness() EndIf If $EmpTypeOne = 9 Then ;MsgBox(1, "Information", "Applicant 1 is Unemployed") $SalaryOne = "" ; $SalaryTwo = "" $BonusOne = "" ; $BonusTwo = "" $OvertimeOne = "" ; $OvertimeTwo = "" $CommissionOne = "" ; $CommissionTwo = "" $NetPreTaxProfitLatestYrOne = "" ; $NetPreTaxProfitLatestYrTwo = "" $NetPreTaxProfitPrevYrOne = "" ; $NetPreTaxProfitPrevYrTwo = "" $ShareOfNetPreTaxProfitLatestYrOne = "" $ShareOfNetPreTaxProfitPrevYrOne = "" ; $ShareOfNetPreTaxProfitLatestYrTwo = "" ; $ShareOfNetPreTaxProfitPrevYrTwo = "" $SalaryPlusDividendsLatestYrOne = "" $SalaryPlusDividendsPrevYrOne = "" ; $SalaryPlusDividendsLatestYrTwo = "" ; $SalaryPlusDividendsPrevYrTwo = "" $SecondJobOne = 33 ; $SecondJobTwo = 35 $SecondJobTypeOne = "" ; $SecondJobTypeTwo = "" $SecondJobTenureOne = "" ; $SecondJobTenureTwo = "" $TreatedAsEmployedOne = "" ; $TreatedAsEmployedTwo = "" $YrsIn2ndJobOne = "" $MthsIn2ndJobOne = "" ; $YrsIn2ndJobTwo = "" ; $MthsIn2ndJobTwo = "" $YrsRemOn2ndJobContractOne = "" $MthsRemOn2ndJobContractOne = "" ; $YrsRemOn2ndJobContractTwo = "" ; $MthsRemOn2ndJobContractTwo = "" $SecondSalaryOne = "" ; $SecondSalaryTwo = "" $SecondBonusOne = "" ; $SecondBonusTwo = "" $SecondOvertimeOne = "" ; $SecondOvertimeTwo = "" $SecondCommissionOne = "" ; $SecondCommissionTwo = "" $SecondNetPreTaxProfitLatestYrOne = "" ; $SecondNetPreTaxProfitLatestYrTwo = "" $SecondNetPreTaxProfitPrevYrOne = "" ; $SecondNetPreTaxProfitPrevYrTwo = "" ;DoTheBusiness() EndIf If $EmpTypeTwo = 19 Then ;MsgBox(1, "Information", "Applicant 2 is Unemployed") ; $SalaryOne = "" $SalaryTwo = "" ; $BonusOne = "" $BonusTwo = "" ; $OvertimeOne = "" $OvertimeTwo = "" ; $CommissionOne = "" $CommissionTwo = "" ; $NetPreTaxProfitLatestYrOne = "" $NetPreTaxProfitLatestYrTwo = "" ; $NetPreTaxProfitPrevYrOne = "" $NetPreTaxProfitPrevYrTwo = "" ; $ShareOfNetPreTaxProfitLatestYrOne = "" ; $ShareOfNetPreTaxProfitPrevYrOne = "" $ShareOfNetPreTaxProfitLatestYrTwo = "" $ShareOfNetPreTaxProfitPrevYrTwo = "" ; $SalaryPlusDividendsLatestYrOne = "" ; $SalaryPlusDividendsPrevYrOne = "" $SalaryPlusDividendsLatestYrTwo = "" $SalaryPlusDividendsPrevYrTwo = "" ; $SecondJobOne = 33 $SecondJobTwo = 35 ; $SecondJobTypeOne = "" $SecondJobTypeTwo = "" ; $SecondJobTenureOne = "" $SecondJobTenureTwo = "" ; $TreatedAsEmployedOne = "" $TreatedAsEmployedTwo = "" ; $YrsIn2ndJobOne = "" ; $MthsIn2ndJobOne = "" $YrsIn2ndJobTwo = "" $MthsIn2ndJobTwo = "" ; $YrsRemOn2ndJobContractOne = "" ; $MthsRemOn2ndJobContractOne = "" $YrsRemOn2ndJobContractTwo = "" $MthsRemOn2ndJobContractTwo = "" ; $SecondSalaryOne = "" $SecondSalaryTwo = "" ; $SecondBonusOne = "" $SecondBonusTwo = "" ; $SecondOvertimeOne = "" $SecondOvertimeTwo = "" ; $SecondCommissionOne = "" $SecondCommissionTwo = "" ; $SecondNetPreTaxProfitLatestYrOne = "" $SecondNetPreTaxProfitLatestYrTwo = "" ; $SecondNetPreTaxProfitPrevYrOne = "" $SecondNetPreTaxProfitPrevYrTwo = "" ;DoTheBusiness() EndIf If $EmpTypeOne = 8 Then ;MsgBox(1, "Information", "Applicant 1 is a Student") $SalaryOne = "" ; $SalaryTwo = "" $BonusOne = "" ; $BonusTwo = "" $OvertimeOne = "" ; $OvertimeTwo = "" $CommissionOne = "" ; $CommissionTwo = "" $NetPreTaxProfitLatestYrOne = "" ; $NetPreTaxProfitLatestYrTwo = "" $NetPreTaxProfitPrevYrOne = "" ; $NetPreTaxProfitPrevYrTwo = "" $ShareOfNetPreTaxProfitLatestYrOne = "" $ShareOfNetPreTaxProfitPrevYrOne = "" ; $ShareOfNetPreTaxProfitLatestYrTwo = "" ; $ShareOfNetPreTaxProfitPrevYrTwo = "" $SalaryPlusDividendsLatestYrOne = "" $SalaryPlusDividendsPrevYrOne = "" ; $SalaryPlusDividendsLatestYrTwo = "" ; $SalaryPlusDividendsPrevYrTwo = "" $SecondJobOne = 33 ; $SecondJobTwo = 35 $SecondJobTypeOne = "" ; $SecondJobTypeTwo = "" $SecondJobTenureOne = "" ; $SecondJobTenureTwo = "" $TreatedAsEmployedOne = "" ; $TreatedAsEmployedTwo = "" $YrsIn2ndJobOne = "" $MthsIn2ndJobOne = "" ; $YrsIn2ndJobTwo = "" ; $MthsIn2ndJobTwo = "" $YrsRemOn2ndJobContractOne = "" $MthsRemOn2ndJobContractOne = "" ; $YrsRemOn2ndJobContractTwo = "" ; $MthsRemOn2ndJobContractTwo = "" $SecondSalaryOne = "" ; $SecondSalaryTwo = "" $SecondBonusOne = "" ; $SecondBonusTwo = "" $SecondOvertimeOne = "" ; $SecondOvertimeTwo = "" $SecondCommissionOne = "" ; $SecondCommissionTwo = "" $SecondNetPreTaxProfitLatestYrOne = "" ; $SecondNetPreTaxProfitLatestYrTwo = "" $SecondNetPreTaxProfitPrevYrOne = "" ; $SecondNetPreTaxProfitPrevYrTwo = "" ;DoTheBusiness() EndIf If $EmpTypeTwo = 18 Then ;MsgBox(1, "Information", "Applicant 2 is a Student") ; $SalaryOne = "" $SalaryTwo = "" ; $BonusOne = "" $BonusTwo = "" ; $OvertimeOne = "" $OvertimeTwo = "" ; $CommissionOne = "" $CommissionTwo = "" ; $NetPreTaxProfitLatestYrOne = "" $NetPreTaxProfitLatestYrTwo = "" ; $NetPreTaxProfitPrevYrOne = "" $NetPreTaxProfitPrevYrTwo = "" ; $ShareOfNetPreTaxProfitLatestYrOne = "" ; $ShareOfNetPreTaxProfitPrevYrOne = "" $ShareOfNetPreTaxProfitLatestYrTwo = "" $ShareOfNetPreTaxProfitPrevYrTwo = "" ; $SalaryPlusDividendsLatestYrOne = "" ; $SalaryPlusDividendsPrevYrOne = "" $SalaryPlusDividendsLatestYrTwo = "" $SalaryPlusDividendsPrevYrTwo = "" ; $SecondJobOne = 33 $SecondJobTwo = 35 ; $SecondJobTypeOne = "" $SecondJobTypeTwo = "" ; $SecondJobTenureOne = "" $SecondJobTenureTwo = "" ; $TreatedAsEmployedOne = "" $TreatedAsEmployedTwo = "" ; $YrsIn2ndJobOne = "" ; $MthsIn2ndJobOne = "" $YrsIn2ndJobTwo = "" $MthsIn2ndJobTwo = "" ; $YrsRemOn2ndJobContractOne = "" ; $MthsRemOn2ndJobContractOne = "" $YrsRemOn2ndJobContractTwo = "" $MthsRemOn2ndJobContractTwo = "" ; $SecondSalaryOne = "" $SecondSalaryTwo = "" ; $SecondBonusOne = "" $SecondBonusTwo = "" ; $SecondOvertimeOne = "" $SecondOvertimeTwo = "" ; $SecondCommissionOne = "" $SecondCommissionTwo = "" ; $SecondNetPreTaxProfitLatestYrOne = "" $SecondNetPreTaxProfitLatestYrTwo = "" ; $SecondNetPreTaxProfitPrevYrOne = "" $SecondNetPreTaxProfitPrevYrTwo = "" ; DoTheBusiness() EndIf If $EmpTypeOne = 7 Then ;MsgBox(1, "Information", "Applicant 1 is a Homemaker") $SalaryOne = "" ; $SalaryTwo = "" $BonusOne = "" ; $BonusTwo = "" $OvertimeOne = "" ; $OvertimeTwo = "" $CommissionOne = "" ; $CommissionTwo = "" $NetPreTaxProfitLatestYrOne = "" ; $NetPreTaxProfitLatestYrTwo = "" $NetPreTaxProfitPrevYrOne = "" ; $NetPreTaxProfitPrevYrTwo = "" $ShareOfNetPreTaxProfitLatestYrOne = "" $ShareOfNetPreTaxProfitPrevYrOne = "" ; $ShareOfNetPreTaxProfitLatestYrTwo = "" ; $ShareOfNetPreTaxProfitPrevYrTwo = "" $SalaryPlusDividendsLatestYrOne = "" $SalaryPlusDividendsPrevYrOne = "" ; $SalaryPlusDividendsLatestYrTwo = "" ; $SalaryPlusDividendsPrevYrTwo = "" $SecondJobOne = 33 ; $SecondJobTwo = 35 $SecondJobTypeOne = "" ; $SecondJobTypeTwo = "" $SecondJobTenureOne = "" ; $SecondJobTenureTwo = "" $TreatedAsEmployedOne = "" ; $TreatedAsEmployedTwo = "" $YrsIn2ndJobOne = "" $MthsIn2ndJobOne = "" ; $YrsIn2ndJobTwo = "" ; $MthsIn2ndJobTwo = "" $YrsRemOn2ndJobContractOne = "" $MthsRemOn2ndJobContractOne = "" ; $YrsRemOn2ndJobContractTwo = "" ; $MthsRemOn2ndJobContractTwo = "" $SecondSalaryOne = "" ; $SecondSalaryTwo = "" $SecondBonusOne = "" ; $SecondBonusTwo = "" $SecondOvertimeOne = "" ; $SecondOvertimeTwo = "" $SecondCommissionOne = "" ; $SecondCommissionTwo = "" $SecondNetPreTaxProfitLatestYrOne = "" ; $SecondNetPreTaxProfitLatestYrTwo = "" $SecondNetPreTaxProfitPrevYrOne = "" ; $SecondNetPreTaxProfitPrevYrTwo = "" ;DoTheBusiness() EndIf If $EmpTypeTwo = 17 Then ;MsgBox(1, "Information", "Applicant 2 is a Homemaker") ; $SalaryOne = "" $SalaryTwo = "" ; $BonusOne = "" $BonusTwo = "" ; $OvertimeOne = "" $OvertimeTwo = "" ; $CommissionOne = "" $CommissionTwo = "" ; $NetPreTaxProfitLatestYrOne = "" $NetPreTaxProfitLatestYrTwo = "" ; $NetPreTaxProfitPrevYrOne = "" $NetPreTaxProfitPrevYrTwo = "" ; $ShareOfNetPreTaxProfitLatestYrOne = "" ; $ShareOfNetPreTaxProfitPrevYrOne = "" $ShareOfNetPreTaxProfitLatestYrTwo = "" $ShareOfNetPreTaxProfitPrevYrTwo = "" ; $SalaryPlusDividendsLatestYrOne = "" ; $SalaryPlusDividendsPrevYrOne = "" $SalaryPlusDividendsLatestYrTwo = "" $SalaryPlusDividendsPrevYrTwo = "" ; $SecondJobOne = 33 $SecondJobTwo = 35 ; $SecondJobTypeOne = "" $SecondJobTypeTwo = "" ; $SecondJobTenureOne = "" $SecondJobTenureTwo = "" ; $TreatedAsEmployedOne = "" $TreatedAsEmployedTwo = "" ; $YrsIn2ndJobOne = "" ; $MthsIn2ndJobOne = "" $YrsIn2ndJobTwo = "" $MthsIn2ndJobTwo = "" ; $YrsRemOn2ndJobContractOne = "" ; $MthsRemOn2ndJobContractOne = "" $YrsRemOn2ndJobContractTwo = "" $MthsRemOn2ndJobContractTwo = "" ; $SecondSalaryOne = "" $SecondSalaryTwo = "" ; $SecondBonusOne = "" $SecondBonusTwo = "" ; $SecondOvertimeOne = "" $SecondOvertimeTwo = "" ; $SecondCommissionOne = "" $SecondCommissionTwo = "" ; $SecondNetPreTaxProfitLatestYrOne = "" $SecondNetPreTaxProfitLatestYrTwo = "" ; $SecondNetPreTaxProfitPrevYrOne = "" $SecondNetPreTaxProfitPrevYrTwo = "" ;DoTheBusiness() EndIf If $EmpTypeOne = 6 Then ;MsgBox(1, "Information", "Applicant 1 is Retired") $SalaryOne = "" ; $SalaryTwo = "" $BonusOne = "" ; $BonusTwo = "" $OvertimeOne = "" ; $OvertimeTwo = "" $CommissionOne = "" ; $CommissionTwo = "" $NetPreTaxProfitLatestYrOne = "" ; $NetPreTaxProfitLatestYrTwo = "" $NetPreTaxProfitPrevYrOne = "" ; $NetPreTaxProfitPrevYrTwo = "" $ShareOfNetPreTaxProfitLatestYrOne = "" $ShareOfNetPreTaxProfitPrevYrOne = "" ; $ShareOfNetPreTaxProfitLatestYrTwo = "" ; $ShareOfNetPreTaxProfitPrevYrTwo = "" $SalaryPlusDividendsLatestYrOne = "" $SalaryPlusDividendsPrevYrOne = "" ; $SalaryPlusDividendsLatestYrTwo = "" ; $SalaryPlusDividendsPrevYrTwo = "" $SecondJobOne = 33 ; $SecondJobTwo = 35 $SecondJobTypeOne = "" ; $SecondJobTypeTwo = "" $SecondJobTenureOne = "" ; $SecondJobTenureTwo = "" $TreatedAsEmployedOne = "" ; $TreatedAsEmployedTwo = "" $YrsIn2ndJobOne = "" $MthsIn2ndJobOne = "" ; $YrsIn2ndJobTwo = "" ; $MthsIn2ndJobTwo = "" $YrsRemOn2ndJobContractOne = "" $MthsRemOn2ndJobContractOne = "" ; $YrsRemOn2ndJobContractTwo = "" ; $MthsRemOn2ndJobContractTwo = "" $SecondSalaryOne = "" ; $SecondSalaryTwo = "" $SecondBonusOne = "" ; $SecondBonusTwo = "" $SecondOvertimeOne = "" ; $SecondOvertimeTwo = "" $SecondCommissionOne = "" ; $SecondCommissionTwo = "" $SecondNetPreTaxProfitLatestYrOne = "" ; $SecondNetPreTaxProfitLatestYrTwo = "" $SecondNetPreTaxProfitPrevYrOne = "" ; $SecondNetPreTaxProfitPrevYrTwo = "" ;DoTheBusiness() EndIf If $EmpTypeTwo = 16 Then ;MsgBox(1, "Information", "Applicant 2 is Retired") ; $SalaryOne = "" $SalaryTwo = "" ; $BonusOne = "" $BonusTwo = "" ; $OvertimeOne = "" $OvertimeTwo = "" ; $CommissionOne = "" $CommissionTwo = "" ; $NetPreTaxProfitLatestYrOne = "" $NetPreTaxProfitLatestYrTwo = "" ; $NetPreTaxProfitPrevYrOne = "" $NetPreTaxProfitPrevYrTwo = "" ; $ShareOfNetPreTaxProfitLatestYrOne = "" ; $ShareOfNetPreTaxProfitPrevYrOne = "" $ShareOfNetPreTaxProfitLatestYrTwo = "" $ShareOfNetPreTaxProfitPrevYrTwo = "" ; $SalaryPlusDividendsLatestYrOne = "" ; $SalaryPlusDividendsPrevYrOne = "" $SalaryPlusDividendsLatestYrTwo = "" $SalaryPlusDividendsPrevYrTwo = "" ; $SecondJobOne = 33 $SecondJobTwo = 35 ; $SecondJobTypeOne = "" $SecondJobTypeTwo = "" ; $SecondJobTenureOne = "" $SecondJobTenureTwo = "" ; $TreatedAsEmployedOne = "" $TreatedAsEmployedTwo = "" ; $YrsIn2ndJobOne = "" ; $MthsIn2ndJobOne = "" $YrsIn2ndJobTwo = "" $MthsIn2ndJobTwo = "" ; $YrsRemOn2ndJobContractOne = "" ; $MthsRemOn2ndJobContractOne = "" $YrsRemOn2ndJobContractTwo = "" $MthsRemOn2ndJobContractTwo = "" ; $SecondSalaryOne = "" $SecondSalaryTwo = "" $SecondBonusOne = "" ; $SecondBonusTwo = "" $SecondOvertimeOne = "" ; $SecondOvertimeTwo = "" $SecondCommissionOne = "" ; $SecondCommissionTwo = "" $SecondNetPreTaxProfitLatestYrOne = "" ; $SecondNetPreTaxProfitLatestYrTwo = "" $SecondNetPreTaxProfitPrevYrOne = "" ; $SecondNetPreTaxProfitPrevYrTwo = "" ;DoTheBusiness() EndIf #comments-start MsgBox(3, "SalaryOne", $SalaryOne) MsgBox(3, "SalaryTwo", $SalaryTwo) MsgBox(3, "BonusOne", $BonusOne) MsgBox(3, "BonusTwo", $BonusTwo) MsgBox(3, "OvertimeOne", $OvertimeOne) MsgBox(3, "OvertimeTwo", $OvertimeTwo) MsgBox(3, "CommissionOne", $CommissionOne) MsgBox(3, "CommissionTwo", $CommissionTwo) MsgBox(3, "NetPreTaxProfitLatestYrOne", $NetPreTaxProfitLatestYrOne) MsgBox(3, "NetPreTaxProfitLatestYrTwo", $NetPreTaxProfitLatestYrTwo) MsgBox(3, "NetPreTaxProfitPrevYrOne", $NetPreTaxProfitPrevYrOne) MsgBox(3, "NetPreTaxProfitPrevYrTwo", $NetPreTaxProfitPrevYrTwo) MsgBox(3, "ShareOfNetPreTaxProfitLatestYrOne", $ShareOfNetPreTaxProfitLatestYrOne) MsgBox(3, "ShareOfNetPreTaxProfitPrevYrOne", $ShareOfNetPreTaxProfitPrevYrOne) MsgBox(3, "ShareOfNetPreTaxProfitLatestYrTwo", $ShareOfNetPreTaxProfitLatestYrTwo) MsgBox(3, "ShareOfNetPreTaxProfitPrevYrTwo", $ShareOfNetPreTaxProfitPrevYrTwo) MsgBox(3, "SalaryPlusDividendsLatestYrOne", $SalaryPlusDividendsLatestYrOne) MsgBox(3, "SalaryPlusDividendsPrevYrOne", $SalaryPlusDividendsPrevYrOne) MsgBox(3, "SalaryPlusDividendsLatestYrTwo", $SalaryPlusDividendsLatestYrTwo) MsgBox(3, "SalaryPlusDividendsPrevYrTwo", $SalaryPlusDividendsPrevYrTwo) #comments-end ;Func DoTheBusiness() $oIE = _IECreate("http://www.nationwide-intermediary.co.uk/calculators/aff_calc") If Not IsObj($oIE) Then Exit ConsoleWrite("Error in $oIE" & @CRLF) $oIE = _IEAttach("Affordability Calculator | Nationwide for Intermediaries (NFI)") _IELoadWait($oIE) $oClassReturn = $oIE.document.getElementsByClassName("pageContainer page0") If Not IsObj($oClassReturn) Then Exit ConsoleWrite("Error in $oClassReturn" & @CRLF) $oTagReturn = $oClassReturn.Item(0).getElementsByTagName("li") If Not IsObj($oTagReturn) Then Exit ConsoleWrite("Error in $oTagReturn" & @CRLF) For $loop = 1 to 2 $oTagReturn.Item($BuyOrRemo).click() ; Item(1) = "Buy a new property" / Item(2) = "Remortgage" | Running the command twice is require to close the drop-down Next $oMtgAmt = _IEGetObjByName($oIE, "bespAppCharsMiscLoanAmountRequested") _IEAction($oMtgAmt, "focus") Send("{DEL}") ;_IEFormElementSetValue($oMtgAmt, $MtgAmt) Send($MtgAmt) $oMtgTermYrs = _IEGetObjByName($oIE, "bespAppCharsMiscTermRequestedYY") ;_IEFormElementSetValue($oMtgTermYrs, "25") _IEAction($oMtgTermYrs, "focus") Send($MtgTermYrs) $oMtgTermMths = _IEGetObjByName($oIE, "bespAppCharsMiscTermRequestedMM") ;_IEFormElementSetValue($oMtgTermMths, "00") _IEAction($oMtgTermMths, "focus") Send($MtgTermMths) $oTagReturn = $oClassReturn.Item(0).getElementsByTagName("input") If Not IsObj($oTagReturn) Then Exit ConsoleWrite("Error in $oTagReturn" & @CRLF) $oTagReturn.Item($NumOfApplicants).click() ; Item(3) = One Applicant / Item(4) = Two Applicants $oTagReturn = $oClassReturn.Item(0).getElementsByTagName("li") If Not IsObj($oTagReturn) Then Exit ConsoleWrite("Error in $oTagReturn" & @CRLF) For $loop = 1 to 2 $oTagReturn.Item($OwnershipType).click() ; Item(4) = Standard / Item(5) = Equity Share / Item(6) = Right to Buy / Item(7) = Shared Ownership | Running the command twice is require to close the drop-down Next $oTagReturn = $oClassReturn.Item(0).getElementsByTagName("input") If Not IsObj($oTagReturn) Then Exit ConsoleWrite("Error in $oTagReturn" & @CRLF) $oTagReturn.Item($FoundProperty).click() ; Item(5) = Have they found a new home yet 'Yes' / Item(6) = Have they found a new home yet 'No' $oTagReturn = $oClassReturn.Item(0).getElementsByTagName("li") If Not IsObj($oTagReturn) Then Exit ConsoleWrite("Error in $oTagReturn" & @CRLF) For $loop = 1 to 2 $oTagReturn.Item($Tenure).click() ; Item(9) = Freehold / Item(10) = Leasehold / Item(11) = Commonhold / Item(12) = Ownership Scotland | Running the command twice is require to close the drop-down Next For $loop = 1 to 2 $oTagReturn.Item($PropType).click() ; Item(14) = Detached House / Item(15) = Detached Bungalow / Item(16) = Semi-Detached Bungalow / Item(17) = Terraced Bungalow / Item(18) = Semi-Detached House / Item(19) = Terraced House / Item(20) = Purpose built flat/maisonette / Item(21) = Converted flat/maisonette | Running the command twice is require to close the drop-down Next $oPP = _IEGetObjByName($oIE, "bespAppCharsMiscExpectedPurchasePriceMSO") _IEAction($oPP, "focus") Send("{DEL}") ;_IEFormElementSetValue($oPP, "200000") Send($PP) $oDOBAppOne = _IEGetObjByName($oIE, "bespMainAppDateOfBirth") ;_IEFormElementSetValue($oDOBAppOne, "01011990") _IEAction($oDOBAppOne, "focus") Send($DOB1) $oDOBAppTwo = _IEGetObjByName($oIE, "bespJointAppDateOfBirth") ;_IEFormElementSetValue($oDOBAppTwo, "01011990") _IEAction($oDOBAppTwo, "focus") Send($DOB2) $oClassReturn = $oIE.document.getElementsByClassName("pageContainer page1") If Not IsObj($oClassReturn) Then Exit ConsoleWrite("Error in $oClassReturn" & @CRLF) $oTagReturn = $oClassReturn.Item(0).getElementsByTagName("li") If Not IsObj($oTagReturn) Then Exit ConsoleWrite("Error in $oTagReturn" & @CRLF) For $loop = 1 to 2 $oTagReturn.Item($Gender1).click() ; Item(1) = Male / Item(2) = Female | Applicant one Next For $loop = 1 to 2 $oTagReturn.Item($Gender2).click() ; Item(4) = Male / Item(5) = Female | Applicant two Next $oTagReturn = $oClassReturn.Item(0).getElementsByTagName("input") If Not IsObj($oTagReturn) Then Exit ConsoleWrite("Error in $oTagReturn" & @CRLF) $oTagReturn.Item($Dependents1).click() ; Item(2) = Has dependents / Item(3) = No dependents | Applicant one $oTagReturn.Item($Dependents2).click() ; Item(4) = Has dependents / Item(5) = No dependents | Applicant one $oDependentsZeroToFiveAppOne = _IEGetObjByName($oIE, "bespMainAppMmrMDependantsAgeRange1") _IEAction($oDependentsZeroToFiveAppOne, "focus") Send("{DEL}") ;_IEFormElementSetValue($oDependentsZeroToFiveAppOne, "1") Send($Deps10To5) $oDependentsSixToElevenAppOne = _IEGetObjByName($oIE, "bespMainAppMmrMDependantsAgeRange2") _IEAction($oDependentsSixToElevenAppOne, "focus") Send("{DEL}") ;_IEFormElementSetValue($oDependentsSixToElevenAppOne, "2") Send($Deps16To11) $oDependentsTwelveToSeventeenAppOne = _IEGetObjByName($oIE, "bespMainAppMmrMDependantsAgeRange3") _IEAction($oDependentsTwelveToSeventeenAppOne, "focus") Send("{DEL}") ;_IEFormElementSetValue($oDependentsTwelveToSeventeenAppOne, "3") Send($Deps112To17) $oDependentsEighteenPlusAppOne = _IEGetObjByName($oIE, "bespMainAppMmrMDependantsAgeRange4") _IEAction($oDependentsEighteenPlusAppOne, "focus") Send("{DEL}") ;_IEFormElementSetValue($oDependentsEighteenPlusAppOne, "4") Send($Deps118Plus) $oDependentsZeroToFiveAppTwo = _IEGetObjByName($oIE, "bespJointAppMmrJDependantsAgeRange1") _IEAction($oDependentsZeroToFiveAppTwo, "focus") Send("{DEL}") ;_IEFormElementSetValue($oDependentsZeroToFiveAppTwo, "1") Send($Deps20To5) $oDependentsSixToElevenAppTwo = _IEGetObjByName($oIE, "bespJointAppMmrJDependantsAgeRange2") _IEAction($oDependentsSixToElevenAppTwo, "focus") Send("{DEL}") ;_IEFormElementSetValue($oDependentsSixToElevenAppTwo, "2") Send($Deps26To11) $oDependentsTwelveToSeventeenAppTwo = _IEGetObjByName($oIE, "bespJointAppMmrJDependantsAgeRange3") _IEAction($oDependentsTwelveToSeventeenAppTwo, "focus") Send("{DEL}") ;_IEFormElementSetValue($oDependentsTwelveToSeventeenAppTwo, "3") Send($Deps212To17) $oDependentsEighteenPlusAppTwo = _IEGetObjByName($oIE, "bespJointAppMmrJDependantsAgeRange4") _IEAction($oDependentsEighteenPlusAppTwo, "focus") Send("{DEL}") ;_IEFormElementSetValue($oDependentsEighteenPlusAppTwo, "4") Send($Deps218Plus) $oTagReturn.Item($Retired1).click() ; Item(14) = Is retired / Item(15) = Not retired | Applicant one $oTagReturn.Item($Retired2).click() ; Item(16) = Is retired / Item(17) = Not retired | Applicant two $oRetAgeAppOne = _IEGetObjByName($oIE, "bespMainAppMExpectedRetirementAge") ;_IEFormElementSetValue($oRetAgeAppOne, "65") _IEAction($oRetAgeAppOne, "focus") Send($RetAge1) $oRetAgeAppTwo = _IEGetObjByName($oIE, "bespJointAppJExpectedRetirementAge") ;_IEFormElementSetValue($oRetAgeAppTwo, "65") _IEAction($oRetAgeAppTwo, "focus") Send($RetAge2) $oTagReturn = $oIE.document.getElementsByTagName("button") If Not IsObj($oTagReturn) Then Exit ConsoleWrite("Error in $oTagReturn" & @CRLF) $oTagReturn.Item(1).Click() $oClassReturn = $oIE.document.getElementsByClassName("pageContainer page3") If Not IsObj($oClassReturn) Then Exit ConsoleWrite("Error in $oClassReturn" & @CRLF) $oTagReturn = $oClassReturn.Item(0).getElementsByTagName("li") If Not IsObj($oTagReturn) Then Exit ConsoleWrite("Error in $oTagReturn" & @CRLF) For $loop = 1 to 2 $oTagReturn.Item($EmpTypeOne).click() ; Item(1) = Employed / Item(2) = Self-employed (partner) / Item(3) = Self-employed (sole-trader) / Item(4) = Director <=20% / Item(5) = Director =>20% / Item(6) = Retired / Item(7) = Homemaker / Item(8) = Student / Item(9) = Unemployed | Applicant one Next For $loop = 1 to 2 $oTagReturn.Item($EmpTypeTwo).click() ; Item(11) = Employed / Item(12) = Self-employed (partner) / Item(13) = Self-employed (sole-trader) / Item(14) = Director <=20% / Item(15) = Director =>20% / Item(16) = Retired / Item(17) = Homemaker / Item(18) = Student / Item(19) = Unemployed | Applicant two Next For $loop = 1 to 2 $oTagReturn.Item($EmpTenureOne).click() ; Item(21) = Permanent / Item(22) = Fixed term contract / Item(23) = Sub-contractor fixed term / Item(24) = Sub-contractor open ended / Item(25) = Temporary | Applicant one Next For $loop = 1 to 2 $oTagReturn.Item($EmpTenureTwo).click() ; Item(27) = Permanent / Item(28) = Fixed term contract / Item(29) = Sub-contractor fixed term / Item(30) = Sub-contractor open ended / Item(31) = Temporary | Applicant two Next $oTagReturn = $oClassReturn.Item(0).getElementsByTagName("input") If Not IsObj($oTagReturn) Then Exit ConsoleWrite("Error in $oTagReturn" & @CRLF) $oTagReturn.Item($TreatedAsEmployedOne).click() ; Item(0) = Are they treated as employed for tax purposes 'Yes' / Item(1) = 'No' | Applicant one $oTagReturn.Item($TreatedAsEmployedTwo).click() ; Item(2) = Are they treated as employed for tax purposes 'Yes' / Item(3) = 'No' | Applicant two $oTimeInJobAppOneYY = _IEGetObjByName($oIE, "bespMainAppMTimeWithCurrentEmployerYY") ;_IEFormElementSetValue($oTimeInJobAppOneYY, "YY") _IEAction($oTimeInJobAppOneYY, "focus") Send($YrsInJobOne) $oTimeInJobAppOneMM = _IEGetObjByName($oIE, "bespMainAppMTimeWithCurrentEmployerMM") ;_IEFormElementSetValue($oTimeInJobAppOneMM, "MM") _IEAction($oTimeInJobAppOneMM, "focus") Send($MthsInJobOne) $oTimeInJobAppTwoYY = _IEGetObjByName($oIE, "bespJointAppJTimeWithCurrentEmployerYY") ;_IEFormElementSetValue($oTimeInJobAppTwoYY, "YY") _IEAction($oTimeInJobAppTwoYY, "focus") Send($YrsInJobTwo) $oTimeInJobAppTwoMM = _IEGetObjByName($oIE, "bespJointAppJTimeWithCurrentEmployerMM") ;_IEFormElementSetValue($oTimeInJobAppTwoMM, "MM") _IEAction($oTimeInJobAppTwoMM, "focus") Send($MthsInJobTwo) $oRemainingTermOnContractAppOneYY = _IEGetObjByName($oIE, "bespMainAppMRemainingTermOnContractYY") ;_IEFormElementSetValue($oRemainingTermOnContractAppOneYY, "YY") _IEAction($oRemainingTermOnContractAppOneYY, "focus") Send($YrsRemOnContractOne) $oRemainingTermOnContractAppOneMM = _IEGetObjByName($oIE, "bespMainAppMRemainingTermOnContractMM") ;_IEFormElementSetValue($oRemainingTermOnContractAppOneMM, "MM") _IEAction($oRemainingTermOnContractAppOneMM, "focus") Send($MthsRemOnContractOne) $oRemainingTermOnContractAppTwoYY = _IEGetObjByName($oIE, "bespJointAppJRemainingTermOnContractYY") ;_IEFormElementSetValue($oRemainingTermOnContractAppTwoYY, "YY") _IEAction($oRemainingTermOnContractAppTwoYY, "focus") Send($YrsRemOnContractTwo) $oRemainingTermOnContractAppTwoMM = _IEGetObjByName($oIE, "bespJointAppJRemainingTermOnContractMM") ;_IEFormElementSetValue($oRemainingTermOnContractAppTwoMM, "MM") _IEAction($oRemainingTermOnContractAppTwoMM, "focus") Send($MthsRemOnContractTwo) $oAnnualSalaryAppOne = _IEGetObjByName($oIE, "bespMainAppMGrossAnnualIncome") ;_IEFormElementSetValue($oAnnualSalaryAppOne, "100000") _IEAction($oAnnualSalaryAppOne, "focus") Send("{DEL}") Send($SalaryOne) $oAnnualBonusAppOne = _IEGetObjByName($oIE, "bespMainAppMmrMainIncomeMBonus") ;_IEFormElementSetValue($oAnnualBonusAppOne, "100000") _IEAction($oAnnualBonusAppOne, "focus") Send("{DEL}") Send($SalaryTwo) $oAnnualOvertimeAppOne = _IEGetObjByName($oIE, "bespMainAppMmrMainIncomeMOvertime") ;_IEFormElementSetValue($oAnnualOvertimeAppOne, "100000") _IEAction($oAnnualOvertimeAppOne, "focus") Send("{DEL}") Send($BonusOne) $oAnnualCommissionAppOne = _IEGetObjByName($oIE, "bespMainAppMmrMainIncomeMCommission") ;_IEFormElementSetValue($oAnnualCommissionAppOne, "100000") _IEAction($oAnnualCommissionAppOne, "focus") Send("{DEL}") Send($BonusTwo) $oAnnualSalaryAppTwo = _IEGetObjByName($oIE, "bespJointAppJGrossAnnualIncome") ;_IEFormElementSetValue($oAnnualSalaryAppTwo, "100000") _IEAction($oAnnualSalaryAppTwo, "focus") Send("{DEL}") Send($OvertimeOne) $oAnnualBonusAppTwo = _IEGetObjByName($oIE, "bespJointAppMmrMainIncomeJBonus") ;_IEFormElementSetValue($oAnnualBonusAppTwo, "100000") _IEAction($oAnnualBonusAppTwo, "focus") Send("{DEL}") Send($OvertimeTwo) $oAnnualOvertimeAppTwo = _IEGetObjByName($oIE, "bespJointAppMmrMainIncomeJOvertime") ;_IEFormElementSetValue($oAnnualOvertimeAppTwo, "100000") _IEAction($oAnnualOvertimeAppTwo, "focus") Send("{DEL}") Send($CommissionOne) $oAnnualCommissionAppTwo = _IEGetObjByName($oIE, "bespJointAppMmrMainIncomeJCommission") ;_IEFormElementSetValue($oAnnualCommissionAppTwo, "100000") _IEAction($oAnnualCommissionAppTwo, "focus") Send("{DEL}") Send($CommissionTwo) $oAnnualNetProfitBeforeTaxLatestYearAppOne = _IEGetObjByName($oIE, "bespMainAppMNetProfitBeforeTax") ;_IEFormElementSetValue($oAnnualNetProfitBeforeTaxLatestYearAppOne, "100000") _IEAction($oAnnualNetProfitBeforeTaxLatestYearAppOne, "focus") Send("{DEL}") Send($NetPreTaxProfitLatestYrOne) $oAnnualNetProfitBeforeTaxPreviousYearAppOne = _IEGetObjByName($oIE, "bespMainAppMmrMainIncomeMPreviousPeriodNetProfitBeforeTax") ;_IEFormElementSetValue($oAnnualNetProfitBeforeTaxPreviousYearAppOne, "100000") _IEAction($oAnnualNetProfitBeforeTaxPreviousYearAppOne, "focus") Send("{DEL}") Send($NetPreTaxProfitLatestYrTwo) $oAnnualNetProfitBeforeTaxLatestYearAppOne = _IEGetObjByName($oIE, "bespJointAppJNetProfitBeforeTax") ;_IEFormElementSetValue($oAnnualNetProfitBeforeTaxLatestYearAppOne, "100000") _IEAction($oAnnualNetProfitBeforeTaxLatestYearAppOne, "focus") Send("{DEL}") Send($NetPreTaxProfitPrevYrOne) $oAnnualNetProfitBeforeTaxPreviousYearAppTwo = _IEGetObjByName($oIE, "bespJointAppMmrMainIncomeJPreviousPeriodNetProfitBeforeTax") ;_IEFormElementSetValue($oAnnualNetProfitBeforeTaxPreviousYearAppTwo, "100000") _IEAction($oAnnualNetProfitBeforeTaxPreviousYearAppTwo, "focus") Send("{DEL}") Send($NetPreTaxProfitPrevYrTwo) $oShareOfAnnualNetProfitBeforeTaxLatestYearAppOne = _IEGetObjByName($oIE, "bespMainAppMShareOfNetProfitBeforeTax") ;_IEFormElementSetValue($oShareOfAnnualNetProfitBeforeTaxLatestYearAppOne, "100000") _IEAction($oShareOfAnnualNetProfitBeforeTaxLatestYearAppOne, "focus") Send("{DEL}") Send($ShareOfNetPreTaxProfitLatestYrOne) $oShareOfAnnualNetProfitBeforeTaxPreviousYearAppOne = _IEGetObjByName($oIE, "bespMainAppMmrMainIncomeMPreviousPeriodShareofNetProfitBeforeTax") ;_IEFormElementSetValue($oShareOfAnnualNetProfitBeforeTaxPreviousYearAppOne, "100000") _IEAction($oShareOfAnnualNetProfitBeforeTaxPreviousYearAppOne, "focus") Send("{DEL}") Send($ShareOfNetPreTaxProfitPrevYrOne) $oShareOfAnnualNetProfitBeforeTaxLatestYearAppTwo = _IEGetObjByName($oIE, "bespJointAppJShareOfNetProfitBeforeTax") ;_IEFormElementSetValue($oShareOfAnnualNetProfitBeforeTaxLatestYearAppTwo, "100000") _IEAction($oShareOfAnnualNetProfitBeforeTaxLatestYearAppTwo, "focus") Send("{DEL}") Send($ShareOfNetPreTaxProfitLatestYrTwo) $oShareOfAnnualNetProfitBeforeTaxPreviousYearAppTwo = _IEGetObjByName($oIE, "bespJointAppMmrMainIncomeJPreviousPeriodShareofNetProfitBeforeTax") ;_IEFormElementSetValue($oShareOfAnnualNetProfitBeforeTaxPreviousYearAppTwo, "100000") _IEAction($oShareOfAnnualNetProfitBeforeTaxPreviousYearAppTwo, "focus") Send("{DEL}") Send($ShareOfNetPreTaxProfitPrevYrTwo) $oSalaryPlusDividendsLatestYearAppOne = _IEGetObjByName($oIE, "bespMainAppMSalaryandDividends") ;_IEFormElementSetValue($oSalaryPlusDividendsLatestYearAppOne, "100000") _IEAction($oSalaryPlusDividendsLatestYearAppOne, "focus") Send("{DEL}") Send($SalaryPlusDividendsLatestYrOne) $oSalaryPlusDividendsPrevYearAppOne = _IEGetObjByName($oIE, "bespMainAppMmrMainIncomeMPreviousPeriodSalaryAndDividends") ;_IEFormElementSetValue($oSalaryPlusDividendsPrevYearAppOne, "100000") _IEAction($oSalaryPlusDividendsPrevYearAppOne, "focus") Send("{DEL}") Send($SalaryPlusDividendsPrevYrOne) $oSalaryPlusDividendsLatestYearAppTwo = _IEGetObjByName($oIE, "bespJointAppJSalaryandDividends") ;_IEFormElementSetValue($oSalaryPlusDividendsLatestYearAppTwo, "100000") _IEAction($oSalaryPlusDividendsLatestYearAppTwo, "focus") Send("{DEL}") Send($SalaryPlusDividendsPrevYrTwo) $oSalaryPlusDividendsPrevYearAppTwo = _IEGetObjByName($oIE, "bespJointAppMmrMainIncomeJPreviousPeriodSalaryAndDividends") ;_IEFormElementSetValue($oSalaryPlusDividendsPrevYearAppTwo, "100000") _IEAction($oSalaryPlusDividendsPrevYearAppTwo, "focus") Send("{DEL}") Send($SalaryPlusDividendsPrevYrTwo) $oTagReturn = $oClassReturn.Item(0).getElementsByTagName("input") If Not IsObj($oTagReturn) Then Exit ConsoleWrite("Error in $oTagReturn" & @CRLF) $oTagReturn.Item($SecondJobOne).click() ; Item(32) = Does applicant one have a second job 'Yes' / Item(33) = 'No' | Applicant one $oTagReturn.Item($SecondJobTwo).click() ; Item(34) = Does applicant one have a second job 'Yes' / Item(35) = 'No' | Applicant two Exit There is also a screenshot attached of the results after running the script with EmpTypeOne set to Employed and EmpTypeTwo set to SEP (which is Self-employed (partner)) Data.txt
  21. I can't seem to figure out how to select Category and Sub-Category with autoit from a Dropdown in IE. I am building this for a private site so I will be unable to give you a link to it, however I have found a form online that is almost exactly the same as the one I am using... Here is the link to it: https://www.ksl.com/index.php?nid=1126 I need to somehow select a Category and Sub-Category... the site I will be using it on has quite an extensive list for Categories and Sub-Categories so I will need to be able to make sure it is working periodically and posting to the correct categories... "Am building an auto blogger type of software for private use Pls let me know if this is against forum rules!" In advanced Thank You for all of your help! "P.S. This is part of the code I have figured out so far... (You will have to login to see the form I am talking about...) ;Set category! $cat = _IEGetObjById($ie, "cat") ;Set subcategory! $subcat = _IEGetObjByID($ie, "subcat") ;Time to submit the form! $oButtons = _IETagnameGetCollection($ie, "input") For $oButton in $oButtons If String($oButton.value) = "Submit" Then _IEAction($oButton, "click") MsgBox("Success", "Button Clicked", "Next Step!") ExitLoop Else MsgBox("Failed", "The Button " & $oButton & "Does Not Have The Value", "Try Again!") EndIf Next
  22. Hey, so I'm a bit new to autoit, but I'm running into a problem with getting html objects off of IE as soon as I have a second tab open. For example: Say I open a new IE window to Youtube.com, get the search bar object from the html, and plug something in. Then I send "ctrl+T" to the window, making a new tab which opens google.com, and want to get the search bar and put in "dogs". As soon as the code tries to execute, it cannot find the google search bar. I have tried using multiple IE windows, and the same code works fine, but for our purposes we need them to all be in one window with multiple tabs. Does anyone have a potential solution or answer? Is Autoit going to get Tab support in the future? I feel like this is kind of something that should be native.
  23. How can you scroll to the end of a text area in IE without using focus/ControlSend? I have tried several solutions (see code below) but I can't seem to get them to work. Test HTML (test.html) <!DOCTYPE html> <html> <body> <textarea id="textarea-test" rows="4" cols="50"> </textarea> </body> </html> AutoIt Test Code: #RequireAdmin #include <IE.au3> $oIE = _IECreate(@ScriptDir & "\test.html") Local $hWnd = _IEPropertyGet($oIE, "hwnd") Local $oTextarea = _IEGetObjById($oIE, "textarea-test") Local $sText = "" For $i = 1 To 30 $sText &= $i & "&#13;&#10;" _IEPropertySet($oTextarea, "innerhtml", $sText) ;NOT WORKING ;$oTextarea.document.parentwindow.scroll(0, 99999) ;_IEAction($oTextarea, "scrollintoview") ;NOT WORKING ;$iDocHeight = $oTextarea.document.body.scrollHeight() ;$oTextarea.document.parentwindow.scrollTo(0, $iDocHeight) ;NOT WORKING ;$oTextarea.document.parentwindow.scrollTo(0, 99999) ;NOT WORKING ;$oTextarea.scrollintoview() ;WORKING _IEAction($oTextarea, "focus") ControlSend($hWnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "^{end}") Sleep(100) Next
  24. I'm trying to automate some controls in a webpage in IE 11: the tipical scenario is a multi-tab session in IE (not embedded). I'm using both IE functions bundled with AutoIT and IEEx library (here) I just can't figure out how I can get current active tab... Can you help me? Thanks
  25. I was just going to make a GUI for the creation of a Youtube Channel, but I can't figure out how to select an Item from the Dropdownlist on this page: https://www.youtube.com/create_channel?action_create_new_channel_redirect=1 I think you have to be logged in with a Google Account, this is the important part (I think it is) from the Code: <span id="PlusPageCategoryHolder" > <select id="PlusPageCategory" name="PlusPageCategory"> <option value="" >Kategorie auswählen</option> <option value="BRAND" >Produkt oder Marke</option> <option value="COMPANY" >Unternehmen, Einrichtung oder Organisation</option> <option value="ENTERTAINMENT" >Kunst, Sport oder Unterhaltung</option> <option value="OTHER" >Sonstiges</option> </select> </span>EDIT: I just noticed if I select ENTERTAINMENT Option (= "Kunst, Sport ...") the HiddenPlusPageCategory seems to look like that: <input value="ENTERTAINMENT" id="HiddenPlusPageCategory" name="PlusPageCategory" type="hidden">But I can't change it like this: $oIE = _IECreate("https://www.youtube.com/create_channel?action_create_new_channel_redirect=1", 0, 1, 1, 0) $oDropDown = _IEGetObjById($oIE, "HiddenPlusPageCategory") _IEFormElementSetValue($oDropDown, "ENTERTAINMENT")
×