Jump to content

ademon

Members
  • Posts

    16
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ademon's Achievements

Seeker

Seeker (1/7)

1

Reputation

  1. I have solved it! To edit, compile, etc I am using the "X:\Descargas\AutoIt\autoit-v3\install\SciTe\SciTE.exe" and NOT the X:\Descargas\AutoIt\SciTE4AutoIt3_Portable\SciTE.exe
  2. I have edited the file but it does not work. I can not use the installer in this machine because I have no admin rights ... Well thank you for your attention
  3. Thanks for answer me. I do not understand, do you mean the directory tree where I have placed the editor?
  4. Hi. I can open the editor with out problems but I can not compile because it is placed on another partition diferent from C. Can you provide an update of this bug?
  5. Yes, it works. Thank you very much
  6. Sounds good! Let see if I can use it...
  7. Gracias Danyfirex, I think I understand what you mean but I do not know how to code it I have tried to do this: Local $aVar[3] _ArrayAdd ($aVar,_WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@type='submit'][@value='Search']")) _ArrayAdd ($aVar,_WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@type='submit'][@value='Search']")) _ArrayAdd ($aVar,_WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@type='submit'][@value='Search']")) MsgBox($MB_SYSTEMMODAL, "FINaaa", $aVar[2] ) _WD_ElementAction($sSession, $aVar[2], 'click') but with out result.
  8. Here and here: wd_core.au3 wd_helper.au3
  9. Tell me if thats is right now. Thx
  10. Hi. I can not automate the click at a button, because there are three of them exactly in the source page. Imagine you have this html source code: <div class="submit"><span class="button btnDefault"><span><input type="submit" value="Search" /></span></span></div> How could I select just one element, and do click as an action on it? $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@type='submit'][@value='Search']") _WD_ElementAction($sSession, $sElement, 'click') That just do not work. Any ideas?
  11. Thanks. Done.
  12. ; los comentarios empiezan por signo ";" no son fin de sentencia como en Java ; autor Aníbal Álvarez Álvarez ; fecha creación: 21-09-18 #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <wd_core.au3> #include <wd_helper.au3> #include <MsgBoxConstants.au3> #include <GuiStatusBar.au3> #include <GuiEdit.au3> #include <WindowsConstants.au3> #include <FileConstants.au3> #include <WinAPIFiles.au3> Local $sDesiredCapabilities = '{"desiredCapabilities":{"javascriptEnabled":true,"nativeEvents":true,"acceptInsecureCerts":false}}' Local Const $sMessage = "Selecciona un fichero TXT." ; MsgBox($MB_SYSTEMMODAL,"",@ScriptDir & @CRLF &_WinAPI_GetCurrentDirectory()) Global $sFile ; Create GUI Global $hGUI = GUICreate("(Pega aquí tu) Listado de páginas web", 1000, 800) Global $idEdit = _GUICtrlEdit_Create($hGUI,"https://www.biomedcentral.com", 2, 2, 1000, 700) _GUICtrlEdit_AppendText($idEdit,@CRLF & 'https://www.reference.com') _GUICtrlEdit_AppendText($idEdit,@CRLF & 'http://www.oup.com') _GUICtrlEdit_AppendText($idEdit,@CRLF & 'https://www.ssa.gov') _GUICtrlEdit_AppendText($idEdit,@CRLF & 'https://www.libsyn.com') _GUICtrlEdit_AppendText($idEdit,@CRLF & 'https://www.windowsphone.com') _GUICtrlEdit_AppendText($idEdit,@CRLF & 'https://www.ny.gov') _GUICtrlEdit_AppendText($idEdit,@CRLF & 'https://www.bigcommerce.com') _GUICtrlEdit_AppendText($idEdit,@CRLF & 'https://www.oreilly.com') _GUICtrlEdit_AppendText($idEdit,@CRLF & 'http://www.domeneshop.no') _GUICtrlEdit_AppendText($idEdit,@CRLF & 'http://www.artisteer.com') _GUICtrlEdit_AppendText($idEdit,@CRLF & 'https://www.arxiv.org') $hStatusBar = _GUICtrlStatusBar_Create($hGUI, -1) _GUICtrlStatusBar_SetIcon($hStatusBar, 0, 97, "shell32.dll") _GUICtrlStatusBar_SetText($hStatusBar, @TAB & "Lines: " & _GUICtrlEdit_GetLineCount($idEdit)) Global $idButton = GUICtrlCreateButton("Abrir links", 10, 720, 250) GUICtrlSetState(-1, $GUI_FOCUS) ; the focus is on this button Global $idButton2 = GUICtrlCreateButton("Cargar links desde archivo", 300, 720, 250) GUISetState(@SW_SHOW) Do $idMsg = GUIGetMsg() If $idMsg = $idButton Then SetupGecko() Firefox() EndIf If $idMsg = $idButton2 Then FileLoad() EndIf Until $idMsg = $GUI_EVENT_CLOSE Func FileLoad() ; Create a constant variable in Local scope of the message to display in FileOpenDialog. Local Const $sMessage = "Selecciona un fichero TXT que contenga links web." Local $sFileOpenDialog = FileOpenDialog($sMessage, _WinAPI_GetCurrentDirectory() & "\", "Archivo de texto (*.txt)", $FD_FILEMUSTEXIST) If @error Then MsgBox($MB_SYSTEMMODAL, "", "No se ha selecionado ningún fichero.") FileChangeDir(@ScriptDir) Else FileChangeDir(@ScriptDir) $sFileOpenDialog = StringReplace($sFileOpenDialog, "|", @CRLF) _GUICtrlEdit_SetText($idEdit, FileRead($sFileOpenDialog)) _GUICtrlStatusBar_SetText($hStatusBar, @TAB & "Lines: " & _GUICtrlEdit_GetLineCount($idEdit)) EndIf EndFunc ;==>FileLoad Func Firefox() $sFFPid = _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, _GUICtrlEdit_GetLine($idEdit, 0)) Local $total = _GUICtrlEdit_GetLineCount($idEdit) For $x = 1 To $total-1 Step +1 _WD_NewTab($sSession,'true') _WD_Navigate($sSession, _GUICtrlEdit_GetLine($idEdit, $x)) Next EndFunc ;==>Firefox Func SetupGecko() _WD_Option('Driver', _WinAPI_GetCurrentDirectory() & '\geckodriver.exe') _WD_Option('DriverParams', '--log trace') _WD_Option('Port', 4444) EndFunc ;==>SetupGecko Hi. As a description of this code, the code do a simple GUI with an edit text box and two buttons. You can paste your web links into the text box and press left button to open the number of your links pasted on Firefox each one of them in a sigle tab, so I called the script "webloader". The second button opens a txt file with web links and load them at the text box. webloader.au3
  13. Thank you
  14. Is there any drag-and-drop OLE function in AutoIt? Could I drag a text file to an edit GUI and open the file automatically?
  15. Ok, I am using WebDriver UDF. Thank you
×
×
  • Create New...