Jump to content

JuanFelipe

Active Members
  • Posts

    78
  • Joined

  • Last visited

Everything posted by JuanFelipe

  1. More or less, I still need something but I know I will solve it, I ask for your help.
  2. ok, all ok... Thanks
  3. It is the same result.
  4. I don't understand you, ¿what you need to do exactly?
  5. Thanks! I will see.
  6. Yes, is embedded browser
  7. Yes, I tried all that, I can't share the URL since it's my company's intranet, so it won't work. I have a webbroser open in the GUI and I click it manually and it does nothing, but if I open everything from any browser it works normal, that's why I thought about executing the javascript function alone, I really don't know which way to go.
  8. Local $sAnswer = InputBox("Question", "Where were you born?", "Planet Earth", "", _ - 1, -1, 0, 0, 5) The last parameter is the timeout.
  9. I did it like this: $botonconsulta = _IEGetObjByName($oIE,"Buscar") ;~ $hWnd = _IEPropertyGet($oIE, "hwnd") _IEAction($botonconsulta, "focus") ControlSend("SUPER CELAC", "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}") _IELoadWait($oIE) and it puts the focus on the button, it does enter and I can click but the page does not respond, it is as if it did not execute the function.
  10. In an input of the page I write a value automatically. I tried the code you shared with me and it throws this error: "D:\windows\install\Include\IE.au3" (2168) : ==> The requested action with this object has failed.: Return SetError($_IESTATUS_Success, 0, HWnd($oObject.HWnd())) Return SetError($_IESTATUS_Success, 0, HWnd($oObject^ ERROR >Exit code: 1 Time: 46.2
  11. Hello guys! I have a problem with a script, in the past I made a program and it worked perfect, I recently used it again and it already stands still in one step, the problem is a Javascript event that changed but now I cannot execute it. <td colspan="2" align="center"><input type="button" id="Buscar" name="Buscar" value="Buscar" onclick="javascript:enviarForma(document.obtenercasosPersonaPorDocumento,'0');" class="boton"></td> Previously I used this code and it worked, but now it does nothing $botonconsulta = _IEGetObjByName($oIE,"Buscar") _IEAction($botonconsulta, 'click') _IELoadWait($oIE) Now I have tried the following codes but none works. ;==================== 1 _IEHeadInsertEventScript($oIE, "document", "onclick", "javascript:enviarForma(document.obtenercasosPersonaPorDocumento,'0');") ControlClick("SUPER CELAC", "", "[CLASS:Internet Explorer_Server; INSTANCE:1]") _IELoadWait($oIE) ;==================== 2 $forma = $oIE.document.obtenercasosPersonaPorDocumento $oIE.Navigate("JavaScript:enviarForma("&$forma&",""0"");") _IELoadWait($oIE) ;==================== 3 $boton = _IEGetObjById($oIE, "Buscar") $boton.document.parentwindow.execScript("enviarForma(document.obtenercasosPersonaPorDocumento,'0');", "javascript") I hope you can guide me, because I think the error is in the parameters that the javascript function receives but I don't know how to send it, here I leave the first part of the JavaScript function. function enviarForma(frm,tipoForma){ var bExisteDatoConsulta = false; var bError=true; var mensajeError=""; switch (tipoForma) { //--Forma documento case "0": if (validar_campo_no_vacio_no_print(frm.numeroDocumento)) { if (!isNum(frm.numeroDocumento.value)) { bError = false; mensajeError += "El número de documento debe ser un valor numérico\n"; } bExisteDatoConsulta = true; } else { mensajeError += "Debe digitar un número de documento\n"; } break; Thanks!
  12. When you uncomment _IELoadWait you put XXXX in the user space?. My problem is that so you have uncomment the line after the $oIE.navigate($psi does nothing, it stays waiting for the page to load harmlessly.
  13. For you to speak to me like this, I suppose you think you are a superior person. The problem is that after the $ oIE.navigate ($ psi) it doesn't execute anything else.
  14. No, can you explain me how to use? please. 🤓
  15. I don't get any error, the page loads when the GUI starts, but after the page loads it doesn't execute anything, it's like the page never finished loading.
  16. Hello gyus, I try to make a code to login in a web page in my job, buy i can’t understand why my form is blocked, this is my code: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <StringConstants.au3> #include <WindowsConstants.au3> #include <WinAPIFiles.au3> #include <FileConstants.au3> #include <File.au3> #include <Array.au3> #include <IE.au3> #include <Excel.au3> #include <GuiEdit.au3> #include <GuiStatusBar.au3> #include <DateTimeConstants.au3> #include <Date.au3> #Region ### START Koda GUI section ### Form=C:\noentry\koda_1.7.3.0\Forms\spoa.kxf $Form1 = GUICreate("Eva y Vehículos", 1200, 1000, 10, 10) $prueba = GUICtrlCreateButton("Prueba",10,990,50,20) ;VARIABLES ========================================================================================== $psi = "https://psi.policia.gov.co/PSI/Login.aspx?ReturnUrl=%2fPSI#no-back-button" $chequeVehiculos = "https://psi.policia.gov.co/PSI/frm_lista_chk.aspx" $evaluacionEva = "https://psi.policia.gov.co/PSI/eva_frmver.aspx" $oIE = ObjCreate("Shell.Explorer.2") $GUIActiveX = GUICtrlCreateObj ($oIE, 10, 10, 1180, 980) ;GUICtrlSetState(-1, $GUI_DISABLE) GUISetState(@SW_SHOW) $oIE.navigate($psi) ;_IELoadWait($oIE) _InicioSesion() #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $prueba _InicioSesion() EndSwitch WEnd Func _InicioSesion() Local $username = _IEGetObjByName($oIE, "txtUsuario") Local $pass = _IEGetObjByName($oIE, "txtClave") Local $logina = _IEGetObjByName($oIE, "btnIngresar") $username.value="example" $pass.value="examplepass" _IEAction($logina, 'click') _IELoadWait($oIE) MsgBox(16,"","") EndFunc
  17. No, because a code is running down, then you need to use a cycle to repeat the action you need to use, what you can do is use the For, change the sleep and the limit of the For to do what you want, exactly what do you need?
  18. According to what I understand, use a For For $i = 0 To 15 Step 1 MouseClick("left",721,550,1,15) ; Multiple clicks for x amount of time Sleep(1000) ; wait Next Modify the sleep to match the number of repetitions you want.
  19. Hi guys, I want to create a program in which you can share files on a network, have a control program as a host, and the other slaves, so that you can delete shared files from the host and delete them from the slaves. Could you advise me how to do it? Or if there is any script that can guide me, I thank you very much, thank you.
  20. THANK YOU, it works perfectly.
  21. I have a list of five songs on a route, I randomly sound a different one every time I open the program, do you have the song on the same script path? Here I leave the example of my function. Func _escogercancion() Local $random = Number(Random(1,5,1)) Local $ruta = @CRLF&@ScriptDir&"\Plug-in\"&$random&".mp3" SoundPlay($ruta) ConsoleWrite($ruta) EndFunc
  22. Hello friends, I come back to you for your help, I have a table which I need to add the repeated data, but only if they coincide in two columns, example: If position [X] [0] and position [X] [1] have more matches in the array, they are added to position [X] [3]. I have tried to do it in the following way, it makes the first positions, but the others do not, I know what the error is, that's why I need your help, I can't think of anything else, thanks. Func _Limpiar($bArray) Local $aFinal[1][3] $aFinal[0][0] = $bArray[0][0] $aFinal[0][1] = $bArray[0][1] $aFinal[0][2] = $bArray[0][2] _ArrayDelete($bArray,0) ;_ArrayDisplay($bArray) ;_ArrayDisplay($aFinal) While UBound($bArray,$UBOUND_ROWS) > 0 Local $Index[0] For $i = 0 To UBound($bArray, $UBOUND_ROWS)-1 If ($aFinal[UBound($aFinal, $UBOUND_ROWS)-1][0] == $bArray[$i][0]) Then _ArrayAdd($Index,$i) EndIf Next ;_ArrayDisplay($Index) ;_ArrayDisplay($bArray) If UBound($Index, $UBOUND_ROWS)>0 Then $num = UBound($aFinal, $UBOUND_ROWS)-1 For $i=0 To UBound($Index, $UBOUND_ROWS)-1 If ($aFinal[$num][0] == $bArray[$Index[$i]][0]) And ($aFinal[$num][1] == $bArray[$Index[$i]][1]) Then $aFinal[$num][2] += $bArray[$Index[$i]][2] Else Local $sFill = $bArray[$Index[$i]][0]&"|"&$bArray[$Index[$i]][1]&"|"&$bArray[$Index[$i]][2] _ArrayAdd($aFinal, $sFill) EndIf Next For $i=0 To UBound($Index, $UBOUND_ROWS)-1 _ArrayDelete($bArray, 0) Next Else Local $sFill = $bArray[0][0]&"|"&$bArray[0][1]&"|"&$bArray[0][2] _ArrayAdd($aFinal, $sFill) _ArrayDelete($bArray, 0) EndIf ;_ArrayDisplay($bArray,"salida") ;_ArrayDisplay($aFinal,"prueba") WEnd Return $aFinal EndFunc Table example.
×
×
  • Create New...