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 FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 54 results

  1. Hi, At work we have some proprietary website, users have to login to. I have "made" an autoit executable to start IE, go the website, login, so the user do not have input their credentials every time. By NDA I am not allowed disclosed the URL of the website nor the login credentials So I made a fake website and an autoitscript to illustrate my question. #include <ie.au3> $oIE = _IECreate ("about:blank", 0, 1, 1, 1) $HWND = _IEPropertyGet($oIE, "hwnd") WinActivate ($HWND,"") WinSetState($HWND, "", @SW_MAXIMIZE) _IENavigate ($oIE, "http://demo.rkilinc.nl",1) The above start my demo website. The actual website has some links in the footer that I do not want most people click on. I contacted the developers of the website and they are thinking of making an option to configure what links to show in the footer, but they said it's not a high priority for them. I discovered, that by click F12 and deleting the <footer> element the footer is delete from the live page view (until the page is reloaded off course) I want to automate the removal of the footer, without using things like send(). I tried getting the footer with _IEGetObjById and deleting it with _IEAction, but that didn't work. Does any one has an idea how I could delete the footer directly from view with an autoit script? TIA, Jem.
  2. Hello, I am working on an autoIT script for CyberArk which is running Internet Explorer and connecting the user to a web application. For an unknown reason (I cannot explain why), IE has some trouble to start, only after a long disconnecting period (morning or after lunch). If he tries again, no problem, IE starts. I open a case with CyberArk but I am also searching a workaround, I thought to kill the process directly, or set a timeout with _IELoadWait but the process is not really created.. May do you have any ideas for helping me ? Thanks in advance
  3. Wrote a script that grabs all of the IP addresses from Netflix's IP log, checks the IPs and returns suspicious activity. Everything works as it should but only when _IECreate is set to visible. When visible is set to false, it fails to login for some reason. Any ideas what might cause it and/or how to circumvent that?
  4. Hello again, I am in phase two of my help bot. I cannot figure out how to properly code Autoit to click on a webpage button using the I.E UDF. I want to click on the button that I have attached as an image. This button does not have a name but it has an ID. Here is the HTML code for this button that I found using chromes developer inspector. HTML Code: <img role="button" tabindex="-1" id="toolactions_INSERT-tbb_image" src="nav_icon_insertkey.gif" alt="New Work Order CTRL+ALT+I" draggable="false"> Here is the code that I have so far: ;******************************************************************************* ; Opens IE and fill out a New Workorder ;******************************************************************************* ; Start IE at the ** Tracking Application in ****** $oIE = _IECreate("https:I_am_Bound_by_my_company_to_not_reveal_this_webpage") ; Wait for a browser page load to complete _IELoadWait($oIE) Sleep(6000) ; Store the field names where the important data will be sent Local $nWorkOrderB = _IEGetObjById($oIE, "toolactions_INSERT-tbb_image") _IEAction($nWorkOrderB, "click") I want my program to click on the button that looks like a piece of paper with a blue # (For those wondering, I am allowed to send images just not the URL.) As always any help would be appreciated.
  5. 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
  6. 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.
  7. 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
  8. 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.
  9. 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
  10. 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
  11. 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
  12. 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.?
  13. 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.
  14. 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.....
  15. 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..
  16. Ever since I upgraded to Windows 10, scripts using Inetget and InetRead no longer seem to recognize Internet Explorer cookies. This makes them useless for websites that require you to be logged in to. Has there been some sort of change to IE cookies because of the upgrade and new Edge browser? Is there a way around this?
  17. 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
  18. 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
  19. 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.
  20. This is just a revision of >IEJS.au3 Library, with more functions and a better naming attribute to what the library actually is. You'll find standard AutoIt object functions as well as internally executed Javascript ones (functions with: _IEEx_JS* are javascript functions). To read more on how this came about or previous versions, please see the IEJS.au3 page. When reporting issues, please provide: Issue you've encountered. Replication code (If I can't run your code, I won't debug it more than likely). AutoIt version IE version IE update version SciTe Version if you ran it from SciTe Functions: ; _IEEx_CallObjEval() ; _IEEx_CallObjExecScript() - Fixed ; _IEEx_CheckAppVersionAlways() ; _IEEx_ClassNameGetArray() - New ; _IEEx_ClickObjByPoint() ; _IEEx_CreateWithParams() - Fixed ; _IEEx_EmbeddedGetVersion() ; _IEEx_EmbeddedSetVersion() ; _IEEx_GetAppMajorVersion() ; _IEEx_GetObjByClassName() - New ; _IEEx_GetObjByString() - New ; _IEEx_GetObjEval() ; _IEEx_GetObjParentWindow() ; _IEEx_GetObjPos() ; _IEEx_GetObjType() ; _IEEx_GetScroll() ; _IEEx_GetScrollPoint() ; _IEEx_GetWindowSize() ; _IEEx_ObjCheckBoxRadioSelect() - New ; _IEEx_ObjDispatchEvent() - New ; _IEEx_MouseEventExec() ; _IEEx_JSClassNameGetArray() ; _IEEx_JSClassNameGetCollection() ; _IEEx_JSClickObj() ; _IEEx_JSClickObjById() ; _IEEx_JSClickObjByName() ; _IEEx_JSClickObjByPoint() ; _IEEx_JSDragEventObj() ; _IEEx_JSEnable() ; _IEEx_JSGetObjByClassName() ; _IEEx_JSGetObjPos() ; _IEEx_JSIsEnabled() ; _IEEx_JSMouseEventObj() ; _IEEx_JSMouseEventObjById() ; _IEEx_JSMouseEventObjByName() ; _IEEx_JSObjQuerySelector() ; _IEEx_JSObjQuerySelectorAll() ; _IEEx_JSTypeOf() ; _IEEx_TabAttach() ; _IEEx_TabCount() ; _IEEx_TabCreate() ; _IEEx_TabGetInstance() ; _IEEx_VersionInfo() ; _IEEx_WhileIsObj() - New ; _IEEx_WhileNotIsObj() - New ; _IEEx_WinGetBrowserObjArray() Changes: 2014-12-30 B0.0.6 Added: _IEEx_EmbeddedGetVersion()Get the embedded version used from something like _IECreateEmbedded 2014-12-30 B0.0.6 Added: _IEEx_EmbeddedSetVersion()Set the embedded version used from something like _IECreateEmbedded (see example) 2014-12-30 B0.0.6 Added: _IEEx_TabAttach()Similar to _IEAttach(), but browser specific and different string cases 2014-12-30 B0.0.6 Added: _IEEx_TabCount()Get a count of the tabs open in a specific browser session 2014-12-30 B0.0.6 Added: _IEEx_TabGetInstance()Get the tab instance number from the specific browser session 2014-12-30 B0.0.6 Added: _IEEx_WinGetBrowserObjArray()Get all the browser objects (tabs) from a specific browser window handle/title 2015-01-13 B0.0.7 Changed: _IEJS format to _IEEx - Script breaking 2015-01-20 B0.0.7 Fixed _IEEx_CreateWithParams()Issue with tryattach, wait, and focus. Added return object/pid feature 2015-01-22 B0.0.7 Fixed: _IEEx_CallObjExecScript()Recursion issue when IE version is 11 or higher and no exeScript 2015-01-26 B0.0.7 Added: _IEEx_ClassNameGetArray()Retrieve an array of objects based on class 2015-01-26 B0.0.7 Added: _IEEx_GetObjByClassName()Retrieve an object based on class 2015-01-26 B0.0.7 Added: _IEEx_GetObjByString()Retrieve an object by its innerText or value 2015-01-26 B0.0.7 Added: _IEEx_ObjCheckBoxRadioSelect()(Un)Check/(De)Select radio or checkbox, has dispatchevent option as well as fireevent 2015-01-26 B0.0.7 Added: _IEEx_ObjDispatchEvent()similar to fireEvent 2015-01-26 B0.0.7 Added: _IEEx_WhileIsObj()waits until an object is no longer an object (could come in handy for waiting on page loads rather than hoping you have the right about of Sleep(n) allocated) 2015-01-26 B0.0.7 Added: _IEEx_WhileNotIsObj()waits until a variable is an object (could come in handy for waiting on page loads rather than hoping you have the right about of Sleep(n) allocated) 2015-01-26 B0.0.8 Fixed: _IEEx_GetAppMajorVersion()Was being passed regular objects but only checking for browser Thank you mLipok for reporting and testing for me 2015-01-26: IEEx.B007.zip 2015-01-26: IEEx.B008.zip .
  21. 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.
  22. How do I click the 'Calculate' image at the bottom of this page? https://www.platform.co.uk/webapp/WEBAPP.EXE?WSYD_EVENT=PW10kkfF
  23. 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
  24. 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?
  25. Is there a way to read just the text within a <div> container with a specific id using _IEBodyReadText ? <div id="results"> Results </div>
×
×
  • Create New...