Jump to content

Search the Community

Showing results for tags 'internet explorer'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


  • 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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Member Title




  1. Hi everybody Currently I need to tick a checkbox that runs on IE. But I can't click on it. Although the correct object has been specified. Here is my code: #include <IE.au3> $oIE = _IEAttach("WEB") $oLinks = _IETagNameGetCollection($oIE, 'span') For $oLink In $oLinks $a = String($oLink.classname) == 'x-column-header-text' $b = StringLeft(String($oLink.id), 10) == 'gridcolumn' If $a And $b Then _IEAction($oLink, "click") ConsoleWrite("Founded" & @CRLF) ExitLoop Else ConsoleWrite("Not Found" & @CRLF) EndIf Next After inspecting the element it shows only 1 line of code: <div class="x-column-header x-column-header-checkbox x-column-header-align-left x-box-item x-column-header-default x-unselectable x-column-header-first x-grid-hd-checker-on" id="gridcolumn-1588" style="margin: 0px; left: 0px; top: 0px; width: 24px; right: auto; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px;"> <div class="x-column-header-inner" id="gridcolumn-1588-titleEl"> <span class="x-column-header-text" id="gridcolumn-1588-textEl"></span> </div> </div> Here is an image of the checkbox: I used more ways to check: - _IEGetObjById => IEAction($oLink, "click") not working - _IETableGetCollection => _IETableWriteToArray gives an error - _IEImageClick All are not working. Hope to get a response from everyone. Thank you very much.
  2. What is the way to use proxy with authentication in automating IE? I managed to change proxy and port in registry, but I can't find a way to use login and password for proxy. Can anyone point to a working way?
  3. 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
  4. I've tried for a few days to simply open a url in IE and click an IE object that I can't "TAB" to and don't want to use a mouse-click if at all possible. I've read up on things like using IEAction and IETagNameGetCollection to find the object but not smart enough to figure out how that works with my url or how to tell if my url is "basic" or a "form", "frameset", "iframe", etc. The other problem is I've tried using the "Run" and "ShellExecute" commands to open the browser, which works, but it opens it in a way that doesn't include my currently logged in user account. For example, if I just click IE or Chrome for that matter and open my default homepage of google, the page that opens knows I'm logged in. When I use "Send" "ShellExecute" or "_IE_Create" they always open pages generically which would require a login. So questions are, if I have a URL I'm trying to open, that's passes the currently logged on users credentials when opening the page (no clue where that happens) 1. Are there any code examples someone is willing to share that opens my IE maximized, with logged in credentials, and 2. Once that works, can someone suggest a technique a non-developer can find which IE Objects I need to send a "click" to so it opens the correct menu, pop-up, url, etc., associated with that object. I've copied what doesn't work and sure I'm way off but it's not for a lack of effort. I'll keep trying and post updates but not looking good 🙂 #include <IE.au3> Call ("selection") Func selection () Global $oIE = _IECreate ("https://internal-webpage.aspx") Local $selectid = _IEGetObjByName ($oIE, "signageNo") Local $button = _IEGetObjByName ($oIE, "GO") _IEFormElementOptionSelect ($selectid, "3") _IEAction ($button,"click") EndFunc #include <IE.au3> Call ("selection") Func selection () Global $oIE = _IECreate ("https://internal-webpage.aspx") Local $selectid = _IEGetObjByName ($oIE, "signageNo") Local $button = _IEGetObjByName ($oIE, "GO") _IEFormElementOptionSelect ($selectid, "3") _IEAction ($button,"click") EndFunc 1.
  5. My AutoIt script works fine, for the most part, however, if it goes idle for roughly 30 minutes, it will won't be able to send data to a 3rd party application window titled, "Case #". The problem lies within the function "SendFusion", it's able to see the handle for the "WinActivate" and "WinWaitActivate" (I've also tried putting in 10 seconds in the WinWaitActivate as well, doesn't work). However, if we have been idle, it will always fail to send data afterward. On what I've tried so far: "Send" function with the data and a {ENTER} i.e. Send($CaseTxt & "{ENTER}"), this won't even hit the enter key ControlSetText, tried passing the handle from WinActivate, using the title "Case #" that was copied directly from the Autoit Window Info, hard coding the title, Using CLASS:WindowsForms10... always returns a 0 ControlCommand (same as above) always returns a 0 ControlGetFocus always returns a 0 ControlFocus, always returns a 0 Creating a new and simple Au3 script that just sends data to "Case #", also fails NOTE: If I close the Au3 script and just scan the data directly into the "Case #" or even type it, it works fine with no issues. I'm confused as to why it would not work after a long idle period? Below are the essential parts of the script, I can provide the entire thing if needed. Any suggestions would be greatly appreciated! #include <AutoItConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <Process.au3> #include <Misc.au3> #include <IE.au3> ;--------------------------------------------------------------- ; Only one instance can run ;--------------------------------------------------------------- If _Singleton("gross.exe", 1) = 0 Then MsgBox($MB_SYSTEMMODAL, "Warning", "Gross.exe is already running. Please exit the existing version first (check the icons in the lower right corner of your screen) before running it again.") Exit EndIf ;--------------------------------------------------------------- ; AutoIt Options ;--------------------------------------------------------------- Opt("GUIOnEventMode", 1) ; Change to OnEvent mode Opt("WinWaitDelay", 0) ; Alters how long a script should briefly pause after a successful window-related operation. Time in milliseconds to pause (default=250). Opt("WinTextMatchMode", 1) ; Alters the method that is used to match window text during search operations. 2 = Quick mode Opt("SendKeyDelay", 0) ; Alters the length of the brief pause in between sent keystrokes. A value of 0 removes the delay completely. Time in milliseconds to pause (default=5). if ($fusionWindowTitle="NONE" or $fusionCaseNumWinTitle="NONE" or $appWindowTitle="NONE" or $winActivateTimeout="NONE" or $winCloseTimeout="NONE" or $winWaitTimeout="NONE" or $pdfViewerWidth="NONE" or $pdfViewerHeight="NONE" or $pdfViewerLeft="NONE" or $pdfViewerWindowName="NONE" or $pdfViewerExeName="NONE" or $pdfUrl="NONE" or $pdfDownloadCommand="NONE") Then Msgbox(0,"ERROR", "gross.ini is missing or does not contain all settings. Please contact Help Desk with this information") Exit -1 EndIf ;--------------------------------------------------------------- ; application settings/constants ;--------------------------------------------------------------- Global Const $[VARIABLE] = IniRead("gross.ini", "default", "[TitleOfVariable]", "NONE") Global Const $[VARIABLE] = IniRead("gross.ini", "default", "[TitleOfVariable]", "NONE") Global Const $[VARIABLE] = IniRead("gross.ini", "default", "[TitleOfVariable]", "NONE") Global Const $[VARIABLE] = IniRead("gross.ini", "default", "[TitleOfVariable]", "NONE") ;--------------------------------------------------------------- ; create the main window ;--------------------------------------------------------------- Local $mainWindow = GUICreate($appWindowTitle, 380, 190) ; create the main GUI window GUISetOnEvent($GUI_EVENT_CLOSE, "handleCloseClick") ; when the click the windows close button call handleCloseClick() WinSetOnTop($appWindowTitle, '', 1) ; Sets main GUI always on top ;--------------------------------------------------------------- ; create the controls on the main window ;--------------------------------------------------------------- Local $okButton = GUICtrlCreateButton("OK", 160, 160, 54,24) ; create OK button GUICtrlSetOnEvent($okButton, "validateInput") ; when they click ok, call handleInputProcessRequest() GUICtrlCreateLabel("Scan Input", 10, 10) ; create a label Global $inputScan = GUICtrlCreateInput("", 10,134,358) ; create the input scan box GUICtrlSetOnEvent($inputScan, "validateInput") ; when they press enter in the scan input box, call handleInputProcessRequest() GUICtrlSetState($inputScan,$GUI_FOCUS) ; automatically sets focus on the input field GUISetState(@SW_SHOW) ; main GUI loop that runs at all times ;--------------------------------------------------------------- While 1 ;---------------------------------------------------------- ; If sumatraPDF active, resets focus back to GUI ;---------------------------------------------------------- If WinActive($pdfViewerWindowName) Then consoleWrite('While Loop sumatraPDF was active' & @CRLF) setMainWindow() ;---------------------------------------------------------- ; After data sent to ProTracker, check for mismatch ; save button to trigger the event handler when clicked ;---------------------------------------------------------- ElseIf WinActive($proTrackerWindowTitle) Then $ie = _IEAttach("ProTracker") $mismatchButton = _IEGetObjByName($ie, $proTrackerMisMatchButtonId) $oEvent = ObjEvent($mismatchButton, "mismatchButton_") If @error Then setMainWindow() ;--------------------------------------------------------------------- ; If Fusion is prompting for the case #, focus back to main GUI input ; If second GUI 'Unknown' detect do nothing ;--------------------------------------------------------------------- ElseIf WinExists($fusionWindowTitle) and WinExists($fusionCaseNumWinTitle) and Not WinActive($mainWindow) and Not WinExists('Unknown Input') Then setMainWindow() EndIF ;--------------------------------------------------------------------- ; Checks if $processFlag = Done, if so, shows PDF viewer and clears ; processFlag for next iteration ;--------------------------------------------------------------------- IF WinExists($pdfViewerWindowName) and $processFlag == 'Done' Then WinSetState ($pdfViewerWindowName, '', @SW_SHOW) $processFlag = '' setMainWindow() EndIF Sleep(100) ; Sleep to reduce CPU usage WEnd Func handleInputProcessRequest($input) $processFlag = True Local $hTimer = TimerInit() consoleWrite('> handleInputProcessRequest: ' & @CRLF) Local $idInput = identifyInput($input) ; Select a proccess to run based on id input Select Case $idInput = "container" ; regex that captures only the case number $caseTxt = StringUpper(StringRegExpReplace($strippedInputData, '\??(\w*\d*-\d*|\d*).*$','$1')) If WinExists($fusionWindowTitle) and WinExists($fusionCaseNumWinTitle) Then sendProTracker(StringUpper($strippedInputData)) sendFusion($caseTxt) ; gets pdf for sumatraPDF in seperate script, since that function is the slowest Run("viewPDF.exe " & $caseTxt) ;getSumatraPDF($caseTxt) $lastCaseNum = $caseTxt Else ; Checks to make sure the previous "Container" case num is the same ; to the current Container case num, before sending to ProTracker If($lastCaseNum <> $caseTxt) Then ; If not the same case number send alert sound SoundPlay("error.wav") Else sendProTracker($strippedInputData) EndIf EndIf Case $idInput = "user" sendProTracker($strippedInputData) Case $idInput = "cassette" sendProTracker(StringUpper($strippedInputData)) Case $idInput = "unknown" selectUnknown() EndSelect Local $fDiff = TimerDiff($hTimer) $processFlag = 'Done' consoleWrite('> handleInputProcessRequest Completed Total time: ' & $fDiff & ' ' &@CRLF&@CRLF&@CRLF) EndFunc Func sendFusion($caseTxt)     Local $hTimer = TimerInit()     consoleWrite('+ sendFusion initiated: ' & $caseTxt & @CRLF)     If $caseTxt = "" Then         MsgBox(0, "Error", "Not a valid case number")     Else         ;$fusionCaseNumWinTitle = "Case #"         $retVal1 = WinActivate($fusionCaseNumWinTitle, "")         consoleWrite("ReturnValue WinActivate " & $retVal1 & @CRLF)         $retVal2 = WinWaitActive($fusionCaseNumWinTitle,"",$winActivateTimeout)         consoleWrite("ReturnValue WinWaitActive: " & $retVal2 & @CRLF)         $retVal3 = ControlSetText($fusionCaseNumWinTitle, "", "", $caseTxt)         ;$retVal3 = ControlCommand($fusionCaseNumWinTitle, "", "", "EditPaste", $caseTxt)         consoleWrite("ReturnValue ControlSetText: " & $retVal3 & @CRLF)         ;Send($caseTxt & "{ENTER}")         WinWaitClose($fusionCaseNumWinTitle, "", $winCloseTimeout)         consoleWrite('+ sendFusion WinWaitClose: ' & @CRLF)     EndIf     Local $fDiff = TimerDiff($hTimer)     ConsoleWrite('+ sendFusion Completed Total time:' & $fDiff & ' ' & @CRLF) EndFunc Console logs from the SciTLE Window (x86) Info matches the correct handle for the WinActivate and WinWaitActivate Window Control (x86) Info, I've tried the CLASS, the ID, also I just noticed that the "handle" in "Control" and "Window" appear to be different as well. So far the only work-around is to close down the 3rd party application and the AutoIt script, re-open them and it works all completely fine. But this is a pain for the end-user since it's all touch screen and it slows down their workflow, which they can be extremely sensitive about.
  6. 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 .
  7. 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.
  8. 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
  9. 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?
  10. 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.
  11. 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
  12. 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.
  13. 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
  14. 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.
  15. 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
  16. 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
  17. 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
  18. 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.?
  19. 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.
  20. 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.....
  21. 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..
  22. 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?
  23. 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
  24. 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.
  25. 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.
  • Create New...