Jump to content

Search the Community

Showing results for tags 'ieform'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Categories

  • 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

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 3 results

  1. Hello. I have IETable, Get by this code $oTable = _IETableGetCollection ($oIE, 1) $aTableData = _IETableWriteToArray ($oTable) Local Const $iArrayNumberOfCols = UBound($aTableData, $UBOUND_COLUMNS) Local Const $iArrayNumberOfRows = UBound($aTableData, $UBOUND_ROWS) Local $aArraySubstringsRow[$iArrayNumberOfCols] ;~ Local $aExtract = _ArrayExtract ($aTableData, 1, 1, 1, -1) ;~ MsgBox(0, "", $iArrayNumberOfCols) ;~ _ArrayDisplay($aExtract) Local Const $iArrayRowIndex = 1 Local $sSubstring For $i = 0 To $iArrayNumberOfCols - 1     $sSubstring = StringLeft($aTableData[$iArrayRowIndex][$i], 2)     $aArraySubstringsRow[$i] = $sSubstring Next _ArrayDisplay($aArraySubstringsRow, "This is a row") and i want to use cell (52, 82, 18, 9,...10) one by one for selecting dropdown box in internet explorer. So, How to show/get/extract cell one by one (in msgbox)?
  2. Hi, Google changed the style of translation page therefore _IEFormElementSetValue stopped working to set values in the google translator page automatically, I tried my best to fix it but it's not happening. It was working perfect a month ago almost before launching of new google translation interface. Any help would be highly appreciated... I'm using a kind of function that help to set values in the form to google translator page and let it translate and then retrieve it back to save in a text file. Here is my code: #RequireAdmin #include <IE.au3> #include <String.au3> #include <Array.au3> #include <Excel.au3> #include <File.au3> ;*****************************Splitting Source Code Ended***************************** Local $oExcel = _Excel_Open() Local $oWorkbook1 = _Excel_BookOpen($oExcel, @ScriptDir & "\example.xlsx", False) ;*****************************Saving Software Links Started*************************** ;*****************************Splitting Source Code Started***************************** ;***************************************** Saving Title + .rar link + Description text file No. 1***************************** ProcessClose ( "iexplore.exe") $file = fileopen(@ScriptDir & "\source.txt", 10) $splitting = _Excel_RangeRead ($oWorkbook1, Default, "A1") $IE = _IECreate($splitting, 0, 0) $source = _IEDocReadHTML($IE) FileWrite($file, $source) $target_source5 = _StringBetween($source, '</h1>', '<i>Скачать</i>') If Not @error Then FileWrite (@ScriptDir & "\kat01.txt", $target_source5[0]) Sleep (50) ; removing of HTML codes to convert data into simple text $File1 = @ScriptDir & "\kat01.txt" $txt = FileRead($File1) $txt = StringReplace($txt, "<br>", @crlf) $txt = StringRegExpReplace($txt, '(?s)<a.*?</a>|<.*?>', "") $txt = StringStripWS ( $txt, $STR_STRIPSPACES) $txt = StringReplace($txt, "<br><", "") $txt = StringReplace($txt, "--", "") $txt = StringReplace($txt, "---", "") $txt = StringReplace($txt, "&nbsp;", " ") $txt = StringReplace($txt, "_", "") $txt = StringReplace($txt, " ", "") FileWrite (@scriptdir & '\kat_saved.txt', $txt) Local $sFilePath = @ScriptDir & "\kat_saved.txt" ProcessClose ( "iexplore.exe") Example1() EndIf ;********************Example1 Function Written Started***************************** Func Example1() $Text = FileRead ($sFilePath) Local $aArray = StringSplit($Text, @CR) For $i = 1 To $aArray[0] Local $tag="* *" Local $oIE=_IECreate("https://translate.google.com/#ru/en", 1, 1) $HWND = _IEPropertyGet($oIE, "hwnd") WinSetState($HWND, "", @SW_MAXIMIZE) Sleep (500) Local $oForm=_IEFormGetCollection($oIE,0) Local $oQuery=_IEGetObjByName($oForm,"text") _IEFormElementSetValue($oQuery, $tag & @CR & $aArray[$i] & @CR & $tag) MouseMove ( 930, 275, 10) MouseClick ( "Main", 930, 275, 5, 10) Sleep(1000) MouseMove ( 930, 200, 10) MouseClick ( "Main", 930, 200, 5, 10) Sleep (10000) _IELoadWait($oIE) Local $oText=_IEGetObjById($oIE,"gt-res-data") $lines=StringSplit(_IEPropertyGet($oText,"innerText"),@CRLF,1) _IEQuit($oIE) ProcessClose ( "iexplore.exe") Sleep (1000) _ArrayDelete($lines,_ArraySearch($lines,$tag,1,0,0,1,0) & "-" & $lines[0]) _ArrayDelete($lines,"1-" & _ArraySearch($lines,$tag,1,0,0,1,1)) $lines[0]=UBound($lines)-1 $FilePath = @ScriptDir & "\Translated.txt" $arraytostring = _ArrayToString ($lines) $txt = StringReplace($arraytostring, "1|", "") $txt = StringReplace($txt, "|", "") FileWrite ($FilePath, $txt & @CRLF) Next EndFunc ;MsgBox ('', 'Done Bro', 'Done Bro')
  3. I'm trying to make an auto-login script for betfair.com. In the code below I've read and printed out the id of each form element - this helped me find the username and password fields. #include<IE.au3> $oIE = _IECreate("http://www.betfair.com/exchange") $oForms = _IEFormGetCollection($oIE) $formcount = 0; For $oForm In $oForms $formcount = $formcount+1 $newID = $oForm.id ConsoleWrite(@CRLF & 'formcount = ' & $formcount & @CRLF) ConsoleWrite('New ID = ' & $newID & @CRLF) If $formcount = 2 Then ; login form is the 2nd form on the webpage Local $oQuery = _IEFormElementGetCollection($oForm, -1) $elementcount = 0 For $oQuery2 In $oQuery ; read through the ogin form ; print details of each element of form $elementcount = $elementcount + 1 ConsoleWrite('$elementcount = ' & $elementcount & @CRLF) $a = _IEFormElementGetValue( $oQuery2 ) ConsoleWrite('$a = ' & $a & @CRLF) If $elementcount = 4 Then ; username field _IEFormElementSetValue( $oQuery2 ,"MYUSER") EndIf If $elementcount = 6 Then ; password field _IEFormElementSetValue( $oQuery2 ,"MYPASS") EndIf Next EndIf Next However, after the script has run, if I click on the "password" field in the webpage, the string "MYPASS" disappears. Does this mean I didn't set the form element value correctly? The html code for the form is a bit complex, perhaps someone can see something in it that I don't understand well enough to spot.
×
×
  • Create New...