Leaderboard
Popular Content
Showing content with the highest reputation on 04/30/2018 in all areas
-
As the WebDriver UDF - Help & Support thread has grown too big, I started a new one. The prior thread can be found here.1 point
-
1 point
-
would like to have only specific users to use the script
Cyborg5000 reacted to Jos for a topic
I am wondering why you think this should work at all? You are creating an boolean result to which $User will be set. One way is to do it like this: Global $user = '|user1|user2|user3|user4|' If StringInStr($user, "|" & $userid & "|") Then ; EndIf also for the records: these kind of tests will always fail: as Not $user will be evaluated as first step! Jos1 point -
Autoit error APPCRASH
Earthshine reacted to water for a topic
Your script does not do any error checking after working with an Excel object. So if the statement fails the next will be executed and might crash the script. Either use the Excel UDF and check @error after each call to an _Excel_* function (as is done ine ach example script provided with the Excel UDF) or add your own COM error handler (check the help file for ObjEvent for an example).1 point -
Autoit error APPCRASH
Earthshine reacted to Ans1021 for a topic
Exactly I throw the same error for that reason I did it that way of the sent code, because the #inlcude <excel.au3> threw the same error. The OFFICE version is 2016 telefonos.txt1 point -
Autoit error APPCRASH
Ans1021 reacted to Earthshine for a topic
ok, thanks. using the Code Tags <> it should look like this, so others can easily read and copy. Now we can look at it. #include <File.au3> GLOBAL $g_bPaused = FALSE MAIN_ALTAMIRA_MN() Func MAIN_ALTAMIRA_MN() HOTKEYSET("{PAUSE}", "HOTKEYPRESSED") HOTKEYSET("{ESC}", "HOTKEYPRESSED") $MSGBOX_ALT = MSGBOX($MB_YESNO, "MENSAJE", "?Deseas Ejecutar Script - Altamira?") SELECT ;************************* CASE $MSGBOX_ALT = 6 ;YES ;************************* $VENT_ALT = WINACTIVATE("https://pagina web", "") $VAL_ALT = WINGETTITLE($VENT_ALT) WINSETSTATE("https://pagina web", "", @SW_MAXIMIZE) IF($VAL_ALT == "https://pagina web") THEN ;INICIO IF_1 $cont1_alt = 0 ;Inicializa contador para registro que no ingresa Local $iCountLines $iCountLines = _FileCountLines("D:\ROBOT\Telefonos.txt") ; Recuperar el n?mero de l?neas en el script actual MsgBox($MB_SYSTEMMODAL, "", "Existen " & $iCountLines & " l?neas en este archivo.") ;muestra la cantidad encontrada $file = FileOpen("D:\ROBOT\Telefonos.txt", 0) ;abre el archivo de texto Local $oExcel = ObjCreate("Excel.Application") ;~ $oExcel.visible = 1 $oExcel.workbooks.add LOCAL $FECHAX_ALT = @YEAR & @MON & @MDAY & "_" & @HOUR & @MIN & @SEC Local $i = 0 local $a = 1 While $i <= $iCountLines $Result = FileReadLine($file) ; lee el archivo indicado If @error = -1 Then ExitLoop WINACTIVATE("https://pagina web", "") $cont1_alt = $cont1_alt + 1 TOOLTIP("Registro: ( " & $cont1_alt & " de " & $iCountLines & " )", 20, 100, "Status Robot OnLine", 1, 1) MOUSECLICK("left", 260, 133, 2) ;Caja de texto Consulta Numero SEND("{DEL}") SEND($Result) SEND("{TAB}") SEND("{ENTER}") SEND("{TAB}") SEND($Result) SEND("{TAB}") SEND("{ENTER}") SEND("{TAB}") SEND($Result) SEND("{TAB}") SEND("{ENTER}") ;Copiar contenido de busqueda Consulta Numero MOUSECLICKDRAG($MOUSE_CLICK_LEFT, 277, 159, 667, 279) SEND("^c") $cont_cons_num = StringReplace(CLIPGET(),@CRLF, "") ;Copiar contenido de busqueda Saldo en supercargas MOUSECLICKDRAG($MOUSE_CLICK_LEFT, 277, 360, 667, 485) SEND("^c") $cont_saldo_supercargas = StringReplace(CLIPGET(),@CRLF, "") ;Copiar contenido de busqueda Saldo en bolsas MOUSECLICKDRAG($MOUSE_CLICK_LEFT, 277, 561, 667, 690) SEND("^c") $cont_saldo_bolsas = StringReplace(CLIPGET(),@CRLF, "") MOUSECLICK("left", 670, 370, 3) ;Caja de texto Consulta Numero LOCAL $FECHA_ACTUAL = @MDAY & "-" & @MON & "-" & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC $oExcel.activesheet.cells($a+1, 1).value = $Result $oExcel.activesheet.cells($a+1, 2).value = $FECHA_ACTUAL $oExcel.activesheet.cells($a+1, 3).value = @IPAddress1 $oExcel.activesheet.cells($a+1, 4).value = $cont_cons_num $oExcel.activesheet.cells($a+1, 5).value = $cont_saldo_supercargas $oExcel.activesheet.cells($a+1, 6).value = $cont_saldo_bolsas $a = $a + 1 $i = $i + 1 WEnd Local $filename = "D:\ROBOT\Resultados\Resultado_" & $FECHAX_ALT & ".xls" $oExcel.Application.DisplayAlerts = 0 $oExcel.Application.ScreenUpdating = 0 $oExcel.ActiveWorkBook.SaveAs($filename, 1, Default, Default, Default, Default, 2, 1) $oExcel.Quit ELSE ;MEDIO IF_1 MSGBOX(16, "Alerta", "Abrir Aplication", 0) ENDIF ;FIN IF_1 ;************************ CASE $MSGBOX_ALT = 7 ;NO ;************************ ENDSELECT EndFunc FUNC HOTKEYPRESSED() SWITCH @HOTKEYPRESSED CASE "{PAUSE}" $g_bPaused = NOT $g_bPaused WHILE $g_bPaused SLEEP(100) TOOLTIP('EXCLAMACION "PAUSA"', 0, 0) WEND TOOLTIP("") CASE "{ESC}" MSGBOX($MB_ICONINFORMATION, "INFO", "SCRIPT TERMINADO.") EXIT ENDSWITCH ENDFUNC ================================1 point -
Nope, the GuiGetMsg() has an build in 10 ms delay and making that more will cause all kinds of issues with capturing the messages from the gui! So removing the sleep() will not cause a close loop without a pause. Jos1 point
-
Need understanding the various cryptic DLL and API functions
Earthshine reacted to jchd for a topic
I wonder how you can compare perl scripts and customized behavior Windows GUI, using AutoIt or whatever else. You seem to be upset by Windows' GUI complexity when trying to achieve non-standard behavior and that isn't surprising: no GUI-ed OS is simple in this regard. You're drowning yourself in cosmetic details. Rather focus on having the real job done first using a bare-bone interface (even console I/O will do) and when the core job is working fine, only then add a GUI harness, simple at first then make it prettier/sophisticated as you feel need.1 point -
array in array
Earthshine reacted to RTFC for a topic
If so, I would suggest you do not use arrays at all (and certainly not nested arrays!), but matrices instead.1 point -
There should never be a sleep() statement in a close message loop. Jos1 point
-
Base64 converter (files and strings) can be modified easily.
HoangQuandlk reacted to Melba23 for a topic
HoangQuandlk, See my reply to your other post. M231 point -
Please help me decode the base image of captcha
HoangQuandlk reacted to Melba23 for a topic
HoangQuandlk, Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing CAPTCHAs - and then you will understand why you will get no help and this thread will now be locked. I have removed the details from your other post - please do not post about this again. But see you soon with a legitimate question I hope. M231 point -
Autoit error APPCRASH
Ans1021 reacted to Earthshine for a topic
So you want us to help you but you dont post your code?1 point -
@flaritycat - Although policies no longer work in Windows 10, just for future reference remember to use HKLM for accessing 32-bit keys and HKLM64 for 64-bit keys for example: Local $sHKLM = @OSArch = 'x64' ? 'HKLM64' : 'HKLM' RegWrite($sHKLM & "\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "NoAutoUpdate", "REG_DWORD", "0") RegWrite($sHKLM & "\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "AUOptions", "REG_DWORD", "2") RegWrite($sHKLM & "\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "ScheduledInstallDay", "REG_DWORD", "0") RegWrite($sHKLM & "\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "ScheduledInstallTime", "REG_DWORD", "3")1 point
-
Please help me decode the base image of captcha
HoangQuandlk reacted to xCROv for a topic
Why are you wanting to bypass a captcha?0 points