Jump to content

Search the Community

Showing results for tags 'IE'.

More search options

  • 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


  • Forum
  • AutoIt


  • Community Calendar

Found 202 results

  1. So I have two things I am trying to click. Policy which works. $oInputs3 = _IETagNameGetCollection($oIE, "div") For $oInput3 in $oInputs3 If StringStripWS($oInput3.innertext,1) = "Policy" Then $target = $oInput3 _IELoadWait($target,"",70000) ExitLoop EndIf Next _IEAction($target, "click") And Add Insurance which I havent been able to get to work. $oInputs2 = _IETagNameGetCollection($oIE, "div") For $oInput2 in $oInputs2 If StringStripWS($oInput2.innertext,1) = "Add Insurance" Then $target = $oInput2 _IELoadWait($target,"",70000) ExitLoop EndIf Next _IEAction($target, "click") Any Ideas on what I am doing wrong? I feel like it might be the spaces between > Add Insurance < but I am not sure.
  2. Hello, I'm trying to read a div element and wait until it hits 100%. The structure is like : <div class="progress-bar" style="width: 48.0219%; overflow: hidden; "></div> And want to wait until : <div class="progress-bar" style="width: 100%; overflow: hidden; "></div> because afther this there will be an redirection whish i don't know the URL from and want to catsh this URL. And want to push a button on this redidertion page. Is there a best pratice way how to do this or is there a better way to wait for the redirection? Maybe wait until button exist or something? Does anybody could give me some tips about this challange? thnx in advanced. #include <IE.au3> Global $IE_flvto = _IECreate("https://www.website.com/",0,1,1,1) Global $oForm = _IEFormGetObjByName ($IE_flvto, "convertForm") Global $oText = _IEFormElementGetObjByName ($oForm, "convertUrl") _IEFormElementSetValue ($oText, "some text") _IEFormSubmit($oForm) ;wait for redirection ;if redirection loaded push button
  3. Hi Guys, Could you please try out my script on win10 machine (simple site scrape)? One of my users complains it doesnt work on his win10, but it works fine on my win7. The error he gets is on the .FireEvent call. I think it is admin rights or IE / Edge issue, but don't have win10 to test it out. Thanks in advance. #include <IE.au3> #include <Array.au3> #include <Excel.au3> Global $oIE,$string Dim $destination[8] = ["Viña del Mar", "Rancagua", "Pucon", "Copiapo", "Temuco", "La serena", "Puerto Montt", "Valdivia"] Dim $FinalResult[1][3] $FinalResult[0][0] = "Destination" $FinalResult[0][1] = "Ida" $FinalResult[0][2] = "Vuelta" Attach("https://www.turbus.cl/") If IsObj($oIE) = 0 Then ConsoleWrite("IE error??"&@CRLF) $oIE = _IECreate() EndIf For $i=0 to UBound($destination)-1 Step 1 _IENavigate($oIE,"https://www.turbus.cl/") $site1 = _IEGetObjById($oIE,"j_id_id122:cmbCiudadOrigenV2") While @error Sleep(1000) $site1 = _IEGetObjById($oIE,"j_id_id122:cmbCiudadOrigenV2") WEnd $site2 = _IEGetObjById($oIE,"j_id_id122:cmbCiudadDestinoV2") $date1 = _IEGetObjById($oIE,"j_id_id122:calIdaV2InputDate") $date2 = _IEGetObjById($oIE,"j_id_id122:calVueltaV2InputDate") $buttun1 = _IEGetObjById($oIE,"j_id_id122:botonContinuarV2") $site1.Value = "Santiago" $site2.Value = $destination[$i] $date1.Value = @MDAY+1&"/"&@MON&"/"&@YEAR $date2.Value = @MDAY+4&"/"&@MON&"/"&@YEAR _IEAction($buttun1,"click") _IELoadWait($oIE) $array = GetResult(GetData()) If IsArray($array) = 0 OR UBound($array,1) < 1 Or UBound($array,2) < 2 Then MsgBox(0,UBound($array,1), UBound($array,2)) _ArrayDisplay($array,"$array") ContinueLoop EndIf _ArrayAdd($FinalResult,"Santiago-"&$destination[$i]&"|"&$array[0][0]&"|"&$array[0][1]) Next ;~ _ArrayDisplay($FinalResult) Local $oExcel = _Excel_Open() If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeWrite Example", "Error creating the Excel application object." & @CRLF & "@error = " & @error & ", @extended = " & @extended) Local $oWorkbook = _Excel_BookNew($oExcel) If @error Then MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeWrite Example", "Error creating the new workbook." & @CRLF & "@error = " & @error & ", @extended = " & @extended) _Excel_Close($oExcel) Exit EndIf _Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $FinalResult, "A1") If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeWrite Example 2", "Error writing to worksheet." & @CRLF & "@error = " & @error & ", @extended = " & @extended) Func GetData() Local $string1,$string2 $ida = _IEGetObjById($oIE,"tbIda_lbl") While @error Sleep(1000) $ida = _IEGetObjById($oIE,"tbIda_lbl") WEnd _IEAction($ida,"click") Sleep(2000) $result1 = _IEGetObjById($oIE,"pnlReglaIda:idPersonalizaPasaje:tb") While @error $ida.FireEvent("onmouseover") Sleep(1000) $ida.FireEvent("onclick") Sleep(1000) $result1 = _IEGetObjById($oIE,"pnlReglaIda:idPersonalizaPasaje:tb") WEnd $string1 = $string1 & $result1.innertext&@CRLF $vuelta = _IEGetObjById($oIE,"tbVuelta_lbl") _IEAction($vuelta,"click") Sleep(2000) $result2 = _IEGetObjById($oIE,"pnlReglaVuelta:idPersonalizaPasajeRegreso:tb") While @error $vuelta.FireEvent("onmouseover") Sleep(1000) $vuelta.FireEvent("onclick") Sleep(1000) $result2 = _IEGetObjById($oIE,"pnlReglaVuelta:idPersonalizaPasajeRegreso:tb") WEnd $string2 = $string2 & $result2.innertext&@CRLF Return $string1&"|"&$string2 EndFunc Func Attach($atachadres) Local $i = 1 While 1 $oIE = _IEAttach("", "instance", $i) If @error = $_IEStatus_NoMatch Then $oIE = 0 ExitLoop EndIf If StringLeft(_IEPropertyGet($oIE, "locationurl"),StringLen($atachadres)) = $atachadres Then ExitLoop $i += 1 WEnd EndFunc Func GetResult($String) Dim $Master[0][2] ,$Master2[1][2] $2strings = StringSplit($String,"|",2) $Strings = StringSplit($2strings[0],@CRLF,2) $Strings = _ArrayUnique($Strings) For $i=0 to UBound($Strings)-1 Step 1 $Data = StringSplit($Strings[$i],"$",2) $add = _ArrayToString($Data) _ArrayAdd($Master,$add) Next For $i=UBound($Master,1)-1 to 0 Step -1 If $Master[$i][1] = "" Then _ArrayDelete($Master,$i) Next _ArraySort($Master,0, 0, 0,1) $Master2[0][0] = $Master[0][0]&$Master[0][1] Dim $Master[0][2] $Strings = StringSplit($2strings[1],@CRLF,2) $Strings = _ArrayUnique($Strings) For $i=0 to UBound($Strings)-1 Step 1 $Data = StringSplit($Strings[$i],"$",2) $add = _ArrayToString($Data) _ArrayAdd($Master,$add) Next For $i=UBound($Master,1)-1 to 0 Step -1 If $Master[$i][1] = "" Then _ArrayDelete($Master,$i) Next _ArraySort($Master,0, 0, 0,1) $Master2[0][1] = $Master[0][0]&$Master[0][1] Return $Master2 EndFunc
  4. I have a goofy problem. I am hoping someone could shed some light. The example is not going around the text box. It is way off. I have seen some post blaming IE 11, however I have IE11 on my desktop and it works fine. Is there anything I can do that might fix this? ; Open a browser with the form example and get a reference to the form ; textarea element. Get the coordinates and dimensions of the text area, ; outline its shape with the mouse and come to rest in the center #include <IE.au3> Local $oIE = _IE_Example("form") Local $oForm = _IEFormGetObjByName($oIE, "ExampleForm") Local $oTextArea = _IEFormElementGetObjByName($oForm, "textareaExample") ; Get coordinates and dimensions of the textarea Local $iScreenX = _IEPropertyGet($oTextArea, "screenx") Local $iScreenY = _IEPropertyGet($oTextArea, "screeny") Local $iWidth = _IEPropertyGet($oTextArea, "width") Local $iHeight = _IEPropertyGet($oTextArea, "height") ; Outline the textarea with the mouse, come to rest in the center Local $iMousespeed = 50 MouseMove($iScreenX, $iScreenY, $iMousespeed) MouseMove($iScreenX + $iWidth, $iScreenY, $iMousespeed) MouseMove($iScreenX + $iWidth, $iScreenY + $iHeight, $iMousespeed) MouseMove($iScreenX, $iScreenY + $iHeight, $iMousespeed) MouseMove($iScreenX, $iScreenY, $iMousespeed) MouseMove($iScreenX + $iWidth / 2, $iScreenY + $iHeight / 2, $iMousespeed)
  5. Hello Guru's, I'm trying to write an autoit script to select from the dropdown list as you see in the attached picture. I read the help page for _IEFormElementOptionSelect, but I cannot grasp how to correlate that with the source code that I'm seeing. any suggestions?
  6. Hello, I try to get all the text from a news site around a subject. The first run I get all the text inside a attribute in an array. When i try to go back and reload another page it chrashes and think it because "$oIE.GoBack" I couldn't find anything in the help/forum around this subject. Do I need to reload the $oIE or something afther an X.GoBack? The error i got is : if $oTag2.GetAttribute("class") == "NewsDetail" Then if $oTag2^ ERROR I'm not shure why I got this error, maybe someone could explain? Also I'm open for some pointers in this test script because I'm pretty new in working whit the IE.UDF Maybe there is an simpler way to get the same results? test script: #include <IE.au3> #include <MsgBoxConstants.au3> #include <Array.au3> HotKeySet("{ESC}", "Terminate") Global $oIE = _IECreate("https://www.iex.nl/Zoeken/Nieuws.aspx?q=air%20france") ;get first subject Global $oLink1 = _IEGetObjById($oIE, "ctl00_ctl00_Content_LeftContent_NewsSearch_repNews_ctl00_linkNews") Sleep(500) _IEAction($oLink1, "click") Sleep(500) Global $oTags = _IETagNameGetCollection($oIE, "div") Global $aResults[1] For $oTag In $oTags if $oTag.GetAttribute("class") == "NewsDetail" Then _ArrayAdd($aResults, $oTag.innerTEXT) EndIf Next $aResults[0] = UBound($aResults) - 1 _ArrayDisplay($aResults, "Episodelist") ConsoleWrite($aResults[1] & @CRLF) $oIE.GoBack ;get second subject Global $oLink2 = _IEGetObjById($oIE, "ctl00_ctl00_Content_LeftContent_NewsSearch_repNews_ctl01_linkNews") Sleep(500) _IEAction($oLink2, "click") Sleep(500) Local $oTags2 = _IETagNameGetCollection($oIE, "div") Local $aResults2[1] For $oTag2 In $oTags2 if $oTag2.GetAttribute("class") == "NewsDetail" Then _ArrayAdd($aResults2, $oTag2.innerTEXT) EndIf Next $aResults2[0] = UBound($aResults2) - 1 ConsoleWrite($aResults2[1] & @CRLF) Func Terminate() _IEQuit($oIE) Exit EndFunc ;==>Terminate
  7. I am having a hard time understanding why this is not working. I was hoping some one could help explain it to me. $tags = $oIE.document.GetElementsByTagName("input") For $tag in $tags $class_value = $tag.GetAttribute("class") If string($class_value) = "fTs-p3298-l0 wplEditControl" Then $target = $tag ExitLoop EndIF Next MsgBox(0,"",$target) If $target = "fTs-p3298-l0 wplEditControl" THEN MsgBox(0,"","itworked") I have tried  MsgBox(0,"",$target.Attribute)  MsgBox(0,"",$target.Value)  MsgBox(0,"",$target.InnerText) I would expect to see this in the msgbox fTs-p3298-l0 wplEditControl
  8. I am trying to grab the id "in2xk_26" however it the characters before the underscore always change. (in the name too) Is there a way I can find a id or name by the last 3 charcters? Using something like "stringright?" So I would want to search for just "_26" in this case. This is assuming that there are no other _26 #include <Excel.au3> #include <IE.au3> #include <GUIConstantsEx.au3> Global $iMousespeed = 25,$target = "",$TagName = "",$Value = "",$Atrribute = "" $oIE = _IEAttach("MEDITECH") $TagName = "input" $Value = "in2xk_26" $Attribute = "id" $tags = $oIE.document.GetElementsByTagName($TagName) ;TagName ------ MAKE SURE TO NAME THESE For $tag in $tags $class_value = $tag.GetAttribute($Attribute) ;Attribute ------ MAKE SURE TO NAME THESE If string($class_value) = $Value Then ;Value ------ MAKE SURE TO NAME THESE $target = $tag $iScreenX = _IEPropertyGet($target, "screenx") $iScreenY = _IEPropertyGet($target, "screeny") $iWidth = _IEPropertyGet($target, "width") $iHeight = _IEPropertyGet($target, "height") $oMouseCords = MouseMove($iScreenX + $iWidth / 2, $iScreenY + $iHeight / 2, $iMousespeed) MouseClick($MOUSE_CLICK_LEFT) ExitLoop EndIf Next
  9. I was wondering how I read data inside of a iframe. I would like to be able to click something inside a iframe. However, I can't even find the tag. The id and name change all the time so I can't use those. The code highlighted in blue is what I am trying to click. (second picture) Here is what I have tried. $target = "" $tags = $oIE.document.GetElementsByTagName("div") For $tag in $tags $class_value = $tag.GetAttribute("class") If string($class_value) = "s_92 altstyle s_93 s_94" Then $target = $tag ConsoleWrite("Tag Found " & $target.outerText&@CRLF) ExitLoop EndIf Next
  10. WinActivate("MEDITECH - Internet Explorer") Sleep (500) $oIE = _IEAttach("MEDITECH") $oDiv1 = _IEGetObjById($oIE, "sysmenu-searchbarbutton") _IEAction($oDiv1, "click") I am just trying to click the little magnifying glass, next to the gear button with no luck. I was hoping someone might have an idea why this is not working?
  11. I am trying to type a name in patient summary search box. How should I go about doing this. I am clearly not doing it right. (Attached Picture of HTML code.) This is what I have tried. I assume this is not working because it is not a form? WinActivate("MEDITECH - Internet Explorer")       Sleep (500)    $oIE = _IEAttach("MEDITECH")    $oForm = _IEFormGetObjByName($oIE, "systemMenu")    $oText = _IEFormElementGetObjByName($oForm, "sysmenu-searchbarinput") _IEFormElementSetValue($oText, "Hey! This works!")
  12. Just want to report a warning I get when using IE udf and running from F5 in scite -> IE.au3 T3.0-2 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler) When I look at IE.au3 I see a comment that this function has been removed as there are no more fatal errors.
  13. I created a webpage using the IE udf. Great, but then I noticed I cannot do a ctrl-F to find something on the page. If I save the page then bring that page up I can find things of course. Its trivial really, but is there way to get the ctrl-F to work when the page is generated without resorting to having to save?
  14. For fun, I'm building an app that opens a webpage and refreshes it every 30 seconds. But once the script performs _IEAction($oIE, "refresh"), the GUI closes. Any help is appreciated. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <WinAPIFiles.au3> #include <Array.au3> #include <File.au3> #include <Excel.au3> #include <DateTimeConstants.au3> #include <MsgBoxConstants.au3> #include <WinAPIShellEx.au3> #include <MsgBoxConstants.au3> #include <Date.au3> #include <ComboConstants.au3> #include <guimenu.au3> #include <IE.au3> HotKeySet("{F4}", "_Exit") ;Open the file(s) in the selected folder $extension = ".txt" $app2openWith = @SystemDir & "\notepad.exe" Func Begin() Global $loopTrick = 0 #Region ### START Koda GUI section ### Form=c:\users\mchu\downloads\autoit\my code\form1.kxf Global $UI = GUICreate("Hit Em Up!", 256, 113, -1, -1) GUISetBkColor(0x000000) $menu = _GUICtrlMenu_GetSystemMenu($UI) _GUICtrlMenu_EnableMenuItem($menu, $SC_CLOSE, 1, False) Global $url = GUICtrlCreateInput("https://www.youtube.com/watch?v=dQw4w9WgXcQ", 81, 8, 160, 21) $Label1 = GUICtrlCreateLabel("Target:", 16, 8, 55, 17) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FF00) Global $StartBut = GUICtrlCreateButton("Start", 16, 40, 67, 25) GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0x008000) $Label2 = GUICtrlCreateLabel("(Press F4 to Exit)", 96, 40, 8000, 17) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FF00) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $UIfunc = GUIGetMsg() Select Case $UIfunc = $GUI_EVENT_CLOSE _Exit() Case $UIfunc = $StartBut If GUICtrlRead($url) = "" Then MsgBox(48, "Um...", "Give me a target you idiot.") Else GUICtrlSetState($url, $GUI_DISABLE) GUICtrlSetState($StartBut, $GUI_DISABLE) Start() EndIf EndSelect WEnd EndFunc ;==>Begin Func Start() If $loopTrick = 0 Then Global $oIE = _IECreate(GUICtrlRead($url)) _IELoadWait($oIE) Again() ElseIf $loopTrick = 1 Then Sleep(3000) _IEAction($oIE, "refresh") Sleep(3000) Start() EndIf EndFunc ;==>Start Func Again() $loopTrick = 1 Start() EndFunc ;==>Again Func _Exit() Exit EndFunc ;==>_Exit
  15. I have some problems with windows explorers. Here is my testing snippet: ;~ #RequireAdmin _Example() MsgBox(1, '', '@error = ' & @error & @CRLF & '@extended = ' & @extended) Func _Example() Local $oShell = ObjCreate("shell.application") If @error then Return SetError(1, @extended, 0) Local $oShellWindows = $oShell.windows If @error then Return SetError(2, @extended, 0) If $oShellWindows = Null Then Return SetError(3, 0, 0) Local $iCount = $oShellWindows.Count If @error then Return SetError(4, $iCount, 0) Return SetExtended($iCount,1) EndFunc ;==>_Example Normally this should return in extended number of opened InternetExplorer + WindowsExplorer. But in some cases I encounter a problem with this, as there happens situation when @extended returns 0 even if I had already opened IE. Here is one of them: I have some script which is working fine with IE on about 100 computers. In this specyfic case this script starts his work, and after few minutes he stoped works. All the time IE is still responsive, I can click on elements and go to specyfic places. Restoring the script did not help because _IEAttach () does not work. All you need to do is restart InternetExplorer. As a result of all my investigation I had done you can see this script snippet above. In my case My primary script was doing their job, but when he stops, IE was still responsive but this above snippet starts to return @error=0 and @extended = 0 when @extended should be at least =1 (this opened Internet Explorer instance) QUESTION: Has anyone already encountered such a problem? Does anyone know any solution or has an idea for further diagnostics? btw. I have one solution which would fix it - I mean Windows reinstall, but this is not good solution, as I always like to know the esense of the problem. EDIT: I know you can say show the script........ this is not possible you have no access to this site, and about 100 computers works well, so this i not related to my script. The more so that the problem is not related to my main scripts, and the problem is simply how IE behaves - which is illustrated by the above piece of code.
  16. i want to repeat this function _IELoadWait($oIE, "url 2") $checkb = _IEGetObjById($oIE,"checkb") _IEAction($checkb,"click") $img = _IEGetObjById($oIE,"img") _IEAction($img,"click") _IELoadWait($oIE, "url 1") $btnfy = _IEGetObjById($oIE,"btnvfy") _IEAction($btnfy,"click") until my targeted webpage not found.
  17. I'm trying to click a button on a web page. I have added a couple of MsgBox lines to allow me to watch what happens on the page. As you can see the first half of my script enters data into text boxes on the page. I have no problem there. I just cannot click on the region buttons. The "set focus" line causes an outline to appear around the EU button and the "click button" line causes the "Pick a Region" text to disappear. Here is the code I have so far. #include <IE.au3> Local $oIE = _IECreate("http://questchecker.com/") Local $iQuestID = "123456" Local $sCharacterName = "CharacterName" Local $colForms = _IEFormGetCollection($oIE) $iCount = 0 For $oForm In $colForms $oFormElements = _IEFormElementGetCollection($oForm) For $oFormElement In $oFormElements $iCount = $iCount + 1 Local $sTagName = StringLower($oFormElement.tagName) Local $sElementType = $oFormElement.type Local $sElementName = $oFormElement.name Switch $iCount Case 6 _IEFormElementSetValue($oFormElement, "MyRealm", 0) ; realm Case 7 _IEFormElementSetValue($oFormElement, $sCharacterName, 0) Case 8 _IEFormElementSetValue($oFormElement, $iQuestID, 0) EndSwitch Next Next Local $oButtons = _IEGetObjByName($oIE, "questForm") For $oButton In $oButtons If _IEFormElementGetValue($oButton) = "US" Then MsgBox(0, "", "Click Okay to set focus") _IEAction($oButton, "focus") MsgBox(0, "", "Click Okay to click button") _IEAction($oButton, "click") ExitLoop EndIf Next MsgBox(0, "", "Click Okay to quit") _IEQuit($oIE) Exit
  18. As the title says. I open IE11 and navigate to a page with the following HTML5 file upload container in Capture0.JPG I want to click Add Files but I haven't been able to. Here's the code that handles the Add Files button in Capture.JPG _IEGetObjectById and then using _IEAction to click it doesn't work. I can't give access to the actual page unfortunately because it's password protected. All suggestions welcome.
  19. I have one script that creates _IECreateEmbedded and another script that does _IEAttach. I do this because when autoit is doing something, the Embedded IE starts stalling (eg jquery progress animation) But there is a new problem. When IE is having its own process (like in the example above) any _IE command is slow (in the script that Attaches). Here is a comparison of when its in separate and when its in same process: Separate process _IETagNameGetCollection : 5000ms Separate process _IEAction: 850ms Same process _IETagNameGetCollection : 1ms Same proccess _IEAction: 135ms If I try to attach to an embedded IE that is done in c#, I get lightning fast results. As you can see, _IE functions work very slow when the embedded IE we are attaching to is made in Autoit. I did a test and if I empty the WHILE loop in IE process I get these results(but the cpu is at 30% as expected): Separate process _IETagNameGetCollection : 33ms Separate process _IEAction: 13ms It slows down if you put anything (like GUIGetMsg) in the WHILE loop. How do I fix this? Create IE: #include <GUIConstantsEx.au3> #include <IE.au3> #include <WindowsConstants.au3> Local $oIE = _IECreateEmbedded() GUICreate("My Embedded Web control Test", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, $WS_OVERLAPPEDWINDOW + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) GUICtrlCreateObj($oIE, 10, 40, 600, 360) GUISetState(@SW_SHOW) ;Show GUI _IENavigate($oIE, "http://www.autoitscript.com") $timer = TimerInit() $oLink = _IETagNameGetCollection($oIE, "a", 3) ;takes 1ms ConsoleWrite(TimerDiff($timer) & @CRLF) $timer = TimerInit() _IEAction($oLink, "click") ;takes 135ms ConsoleWrite(TimerDiff($timer) & @CRLF) While 1 Local $iMsg = GUIGetMsg() Select Case $iMsg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Attach to IE: #include <IE.au3> Local $oIE = _IEAttach("My Embedded Web control Test", "embedded") $timer = TimerInit() $oLink = _IETagNameGetCollection($oIE, "a", 3) ; 5000ms ConsoleWrite(TimerDiff($timer) & @CRLF) $timer = TimerInit() _IEAction($oLink, "click") ; 850ms ConsoleWrite(TimerDiff($timer) & @CRLF) attach.au3 create.au3
  20. Hi all, Anyone have any idea how to close all open tabs except a specific one I manually open. Assuming I don't know what is open in all the tabs except just the one I want to keep open. I didn't want to use sendkeys and I was trying to use the following code to list the title (or url) of the 3 open tabs and after I got that part working I would just close the other 2. This sample only displays the title of the first open tab #include <IE.au3> Const $ie_new_in_tab = 0x0800 $oIE = _IECreate("https://www.autoitscript.com") __IENavigate($oIE, "https://www.autoitscript.com/forum/", 1, $ie_new_in_tab) ;(obj,url,wait,param) __IENavigate($oIE, "https://www.google.com/", 1, $ie_new_in_tab) ;(obj,url,wait,param) Local $aIE[1] $aIE[0] = 0 Local $i = 1, $oIE While 1     $oIE = _IEAttach("", "instance", $i)     If @error = $_IEStatus_NoMatch Then ExitLoop     ConsoleWrite(_IEPropertyGet($oIE, "title") & @CRLF)     ReDim $aIE[$i + 1]     $aIE[$i] = $oIE ;each item holds object     $aIE[0] = $i ;first item holds count     $i += 1 WEnd MsgBox($MB_SYSTEMMODAL, "Browsers Found", "Number of browser instances in the array: " & $aIE[0]) ; This doesn't return the list of tabs in the console just the first tab Thanks for any and all help
  21. I'm trying to click on Java Dropbox using IE. However, I'm running into problems. There is a Dropbox "Please Select" with two options "Buy" and "Sell". I'm able to click on a drop box (please see code below) but i'm unable to select "Buy" or "Sell"". Local $sMyString = "Please Select" ;############ ENTER ############# Local $oLinks = _IELinkGetCollection($oIE) For $oLink In $oLinks Local $sLinkText = _IEPropertyGet($oLink, "innerText") If StringInStr($sLinkText, $sMyString) Then _IEAction($oLink, "click") ExitLoop EndIf Next Please help  
  22. Hello everyone, I'm working on a task where, a PDF file is opened (in IE browser) when I click a link in a website. I have to read the first page of the PDF to find particular strings. Can you please share some ideas?
  23. Hey, i would like to set a value into an INPUT field. Checked the _IEFormElementSetValue function but that does require _IEFormGetObjByName and this is where the problem comes in. The input field I want to write to is not a part of a form tag. It is part of a table. <input type="text" class="w2" id="nabidka_vozidel_formular_tach_od" name="nabidka_vozidel_formular_tach_od" onchange="GLOBAL.pocetInzerceNZ(&quot;nabidka_vozidel_formular&quot;,&quot;tach_od&quot;,&quot;&quot;);" autocomplete="off"> I tried this but that didn't work: $oDownloadSamples = _IEGetObjById($oIE, "nabidka_vozidel_formular_tach_od") _IEFormElementSetValue($oDownloadSamples, "123") If you want to try the site I'm working with is https://www.tipcars.cz/. There is a menu on the top left hand side and if you click the "vyhledat" button the input fields will show up. Thanks
  24. I am now able to populate the dropdown menus at https://www.tipcars.com/. The dropdowns are dynamic and do not have a Text value, only ids. Is there a way to get all the available options from a dropdown? $url = "https://www.tipcars.com/" $oIE = _IECreate($url) _IELoadWait($oIE) $oDownloadSamples = _IEGetObjById($oIE, "homepage_vyhl_frm_vozidlo") _IEFormElementOptionSelect($oDownloadSamples, "C") Above code, populates ID 'C' into the 'druh' dropdown, which results in selecting 'užitkové'. Is there a way so I can grab all of the options from the dropdown menu? I could easily grab all the IDs but I am afraid they will change in the future so I would much rather match the text titles and assign the option IDs grabbed from site. This is what the options are according to Chrome: <select class="w1"id="homepage_vyhl_frm_vozidlo"name="homepage_vyhl_frm_vozidlo"onchange="try{NABIDKA_VOZIDEL_FORMULAR.naplnSelectZnacka('homepage_vyhl_frm');GLOBAL.pocetInzerceHZ('homepage_vyhl_frm','vozidlo');}catch(ex){odeslatJsChybu('formHOMEPAGE onChange 1: ' + ex.message, 'formHomePage onChange 1', -1);}"> <option value="A" style="color: black;">osobní a terénní (56 334)</option> <option value="C" style="color: black;">užitkové (4 333)</option> <option value="D" style="color: black;">nákladní (3 742)</option> <option value="E" style="color: black;">autobusy (56)</option> <option value="F" style="color: black;">obytné (373)</option> <option value="G" style="color: black;">přívěsy (1 179)</option> <option value="J" style="color: black;">motorky (780)</option> <option value="S" style="color: black;">pracovní stroje (605)</option> <option value="L" style="color: black;">ostatní (235)</option></select> Also, this cannot be grabbed by _INetGetSource. Thanks
  25. Hi, I'm trying to find a text value inside of a html. This is what the line looks like normally: <p id="line1" class> <span class="bot">TEXT HERE</span> </p> The text then changes to a non breaking space: <p id="line1" class> <span class="bot">&nbsp;</span> </p> And then it changes back to normal text but it's different every time. Can I code this so that it grabs the text every time it changes and has a variable that represents it? I currently have this inside of my loop: $span = .document.getElementsByTagName("span") For $text In $span If $text.value = "&nbsp;" Then Sleep(50) MsgBox(0,0,0) ;messagebox to test if it can be found, but I don't know how to grab the text EndIf Next The problem is that there are many other lines in the html that have the same span but are called "line3", "line5", etc and the one I need is from "line1". I will appreciate if anyone can help with this!