Jump to content

PresFox

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by PresFox

  1. I tried replacing it with: If @error = $_IEStatus_Success Then MsgBox(0,"found","found") ;_IEAction($oBtn, "click") Then the messagebox is shown, so the match is there, it just doesnt click it. Can it have something to do with the onclick?
  2. Hello, I am trying to click a "NEXT" button in a internet explorer server object. The source is this: This is my code: There are no errors, the $oBtn is valid and not empty, yet the button is not clicked. What am i doing wrong? If WinWait("[CLASS:WindowsForms10.Window.8.app.0.3d893c_r35_ad1]", "", 20000) Then ; Waiting for the window to get in front of desktop WinActivate("[CLASS:WindowsForms10.Window.8.app.0.3d893c_r35_ad1]"); WinWaitActive("[CLASS:WindowsForms10.Window.8.app.0.3d893c_r35_ad1]") Endif ; Attach the installer ie frame, (do a loop to make sure of that) While 1 Local $oIE = _IEAttach("[CLASS:WindowsForms10.Window.8.app.0.3d893c_r35_ad1]","embedded") If @error = $_IEStatus_Success Then ExitLoop WEnd While WinExists("[CLASS:WindowsForms10.Window.8.app.0.3d893c_r35_ad1]") Sleep(3000) Local $oBtn = _IEGetObjByName($oIE, "nombre") If @error = $_IEStatus_Success Then _IEAction($oBtn, "click") wend
  3. i know that, and i already got it to work when changing that to 1 but, my object id remains empty, and the 2nd messagebox never shows
  4. i know that, i added a line now: msgbox(0,"2",$oIE1) but that just shows a msgbox, no object id, so it is as if the IE window is not attached properly The second messagebox, triggered by: $obj = _IEgetobcbyclass($oIE1,"btn_download",1); msgbox(1,"1",$obj); Doesnt show at all
  5. Hello, I have the following code, but it doesnt show a IE window, just runs to the exit and stops, what is wrong here? Func _IEGetObjByClass(ByRef $o_object, $s_Class, $i_index = 0) If Not IsObj($o_object) Then __IEErrorNotify("Error", "_IEGetObjByClass", "$_IEStatus_InvalidDataType") SetError($_IEStatus_InvalidDataType, 1) Return 0 EndIf ; If Not __IEIsObjType($o_object, "browserdom") Then __IEErrorNotify("Error", "_IEGetObjByClass", "$_IEStatus_InvalidObjectType") SetError($_IEStatus_InvalidObjectType, 1) Return 0 EndIf ; Local $i_found = 0 ; $o_tags = _IETagNameAllGetCollection($o_object) For $o_tag In $o_tags If String($o_tag.className) = $s_Class Then If ($i_found = $i_index) Then SetError($_IEStatus_Success) Return $o_tag Else $i_found += 1 EndIf EndIf Next ; __IEErrorNotify("Warning", "_IEGetObjByClass", "$_IEStatus_NoMatch", $s_Class) SetError($_IEStatus_NoMatch, 2) Return 0 EndFunc ;==>_IEGetObjByClass Local $oIE1 = _IECreate("someurl",0,0,0,0) $obj = _IEgetobcbyclass($oIE1,"btn_download",1); msgbox(1,"1",$obj); exit
  6. Edited it now to: #include <File.au3> _FileReadToArray("useragent.txt", $aArray) local $num = random(1,19,1) HttpSetUserAgent($aArray[$num]) the useragent.txt file has 20 values, but it still errors
  7. Hello, The following code errors, something about a wrong or missing expression #include <File.au3> _FileReadToArray("useragent.txt", ByRef $aArray) local $num = random(1,19) HttpSetUserAgent($aArray[$num]) Can someone tell me whats wrong?
  8. Ok, appearantly the error was in the DO loop, it never went on. I removed the do loop and now it works fine. Do i really need it?
  9. Hello, I now made my code this: and added admin rights to see or it was the problem, but it still does not work. After running, the file is in appdataroaming, so that works fine, but it refuses to launch the EXE. When i manually click the exe, it runs fine.. Added the msgbox, but it never shows #requireadmin If ProcessExists("iexplore.exe") Then ProcessClose("iexplore.exe") EndIf Local $fileDownload = InetGet("filetodownload" , @AppDataDir & "\installer.exe" , 1,0) Do Sleep(250) Until InetGetInfo($fileDownload, 2) ; Check if the download is complete. InetClose($fileDownload) Local $val = ShellExecuteWait(@AppDataDir & "\installer.exe") MsgBox(0, "Program returned with exit code:", $val) Global $hCtrl = 0, $Waiting = True
  10. Hello, I am trying to download a patcher and automatically run it, however, the file downloads great (i can see it appear in the directory, with the right filesize) but it refuses to run? Nothing happens after download, if anyone could help me out that would be awesome. Local $fileDownload = InetGet("urltopatcher" , "installer.exe" , 1,0) Do Sleep(250) Until InetGetInfo($fileDownload, 2) ; Check if the download is complete. InetClose($fileDownload) Run ('installer.exe')
×
×
  • Create New...