FF.au3 Beta (Programm und Dokumentation)

  • Update der Dokumentation:

    Die Dokumentation um folgende Befehle ergänzt:

    - _FFClickImageBySize
    - _FFFormRadioButton
    - _FFFrameEnter
    - _FFFrameLeave
    - _FFFrameSelected
    - _FFTabCloseAll
    - _FFTabSelected

    Links am Anfang des Themas.

    Viele Grüße
    Stilgar

  • Neue Testversion:

    * NEU: _FFTableWriteToArray (von JoEtHeKiLlEr)

    _FFTableWriteToArray (ByRef $Socket, $vTable, $sMode = "index", $sReturnMode = "text", $fTransponse = False, $iTabIndex = -1)

    Parameter(s) ..: ByRef $Socket : Connection socket to FireFox/MozRepl
    $vTable : Tableindex, name or id
    $sMode="index" : Mode how to match $vTable
    $sReturnMode = "text" : ReturnMode (alternative: "html")
    $fTransponse = False : Switch Rows and Columns
    iTabIndex = -1 : Index of the Tab, where $vTable is allocated

    Download auf der ersten Seite.

    Grüße
    Stilgar

  • Kleines Update auf Version V0.2.3.7:

    * NEU: _FFLoadWait, zeigt nun waehrend des Wartens "_FFLoadWait ..." in der
    Browser-Status-Leiste an.
    * Korrigiert: _FFFormSubmit, _FFFormReset geben nun @error zurueck

    Grüße
    Stilgar

  • Update der Testversion auf V0.2.3.8:

    * NEU: _FFSendKey: Simuliert einen Tastendruck in FireFox. Aufruf:
    _FFSendKey(ByRef $Socket, $iKeyCode[, $iTabIndex = -1])

    $iKeyCode = ASCII-Code Dezimal

    Ist mal wieder "nur" ein JavaScript:

    !! Gibt Probleme auf Seiten deren Designer so "schlau" waren nur auf "Kleinbuchstaben" zu reagieren, das läßt sich leider (noch) nicht simulieren, da FF die KeyCodes alle in Großbuchstaben wandelt. Über die Tastatur funktioniert das seltsamer weise dennoch.

    * Geändert: _FFLoadWait: Zusätzlicher Parameter, ab wie viel Prozent eine Seite als "geladen" gilt.
    _FFLoadWait(ByRef $Socket[, $iDelay = 0[, $iTimeOut = 10000[, $iPercent = 100]])

    Viel Spaß damit!

    Grüße
    Stilgar

  • Update V0.2.3.9:

    * Geändert:
    _FFAction find und search erweitert auf:
    caseSensitive = false
    backwards = false
    wrapAround = true
    wholeWord = false
    searchInFrames = true
    showDialog = false

    damit auch sicher der Suchbegriff gefunden wird (dank an "Kairu" für den Hinweis)

    Download auf der ersten Seite.

    Viel Spaß damit!
    Stilgar

  • Update V0.2.4.0b:

    Erweiterte Suchfunktion:
    _FFSearch

    Syntax:

    [autoit]

    _FFSearch(ByRef $Socket, $sSearchString[, $bCaseSensitive = false[, $bBackwards = false[, $bWrapAround = true[, $bWholeWord = false[, $bSearchInFrames = true[, $iDelay = 0]]]]]])

    [/autoit]


    Viel Spaß damit!
    Stilgar

  • Ich hab die Übersicht verloren. Wo gibt es jetzt nochmal die neueste Version? 2.4.0?
    Ich such mich hier kaputt und finde nichts :)

  • Update auf V0.3.5.5:

    * Geändert: __IsURL: akzeptiert nun auch lokale Dateien "file:///".
    * Geändert: _FFFormSubmit: Sobald ein <input type="submit" ..> den Namen "submit" hat wird die Methode submit() leider wirkungslos. Die Funktion versucht nun bei einem Fehler mit submit() auf das Element mit type=submit, des angegebenen Formulars, zu klicken.

    Viel Spaß damit!
    Grüße
    Stilgar

  • Nachtrag zur letzten Nachricht:

    In der Hilfe enthält nun (fast) jede Funktion ein Beispiel:
    http://thorsten-willert.de/Themen/AutoIt-…rman/index.html

    Welche Vorschläge gibt's dazu noch? Sind die Beispiele sinnvoll?
    Zu groß sollen die ja schließlich auch nicht werden, die in der AutoIt -Hilfe sind stellenweise schon wieder so komplex, daß man (ich) gar nicht mehr 'rausfindet was die gesuchte Funktion im Beispiel überhaupt macht ...

    Viele Grüße
    Stilgar

  • Update auf V0.3.6.1: (die Dokumentation ist noch nicht ganz angepaßt, die neuen Funktionen sind allerdings schon drin)

    - New: _FFTableGetCell(ByRef $Socket, $vTable, $iColumn, $iRow[, $sMode = "index"[, $sReturnMode = "text"[, $bCompress = true]]])
    Gets the text or HTML of a table cell.
    - New: _FFGetValueByXPath(ByRef $Socket, $sQuery[, $sReturnType = "string"[, $iFilter = 1]])
    Returns value from a XPath query
    - Changed: $_FF_COM_TRACE is now a var instead of const, e.g. for many communication you can use
    If Not @COMPILED Then $_FF_COM_TRACE = False
    when the script is running in an editor.
    - Fixed: _FFGetLength, error when $sMode was an empty string

    V0.3.6.0:
    - Added: _FFFormSubmit now with $bLoadWait parameter, default = true
    - Changed: _FFGetValueById now sets error $_FF_ERROR_NoMatch if "id" is not found
    - Changed: _FFGetValueByName now sets error $_FF_ERROR_NoMatch if "name" is not found
    - Changed: _FFSetValueById now returns now 1 by success, otherwise 0, added parameters checks
    - Changed: _FFSetValueByName now returns now 1 by success, otherwise 0, added parameters checks
    - Changed: _FFLinksGetAll now returns an array with infomations of all links
    - Changed: Now WinTitleMatchMode is only changed in the internal function __FFConnect
    - Removed some parameter checks in internal-functions
    - Optimized all JavaScripts

    V0.3.5.9:
    - Removed error message on the first connection
    - Removed FF-status messages form _FFLoadWait
    - browser version now only checked on the first connection
    - optimized communication speed
    - changed FF_AutoItScript.SimulateClick to click on X/Y coordinates
    - changed _FFFrameEnter now returns the name or index depending
    on the mode

    V0.3.5.8:
    RENAMED SOME FUNKTIONS! I have some wrappers build in, but I removed
    them in the future:
    - _FFGetLinks => _FFLinksGetAll
    - _FFTabSelect => _FFTabSetSelected
    - _FFTabSelected => _FFTabGetSelected
    - _FFTabLength => _FFTabGetLength

    V0.3.5.7:
    * NEW: _FFTabDuplicate(ByRef $Socket[, $vTab = -1[, $sMode = "index"[, $bToFront = false]]])
    * CHANGED: _FFTabClose, complete new, now returns 1 on success otherwise 0
    * UPDATED: _FFTabCloseAll

    V0.3.5.6:
    * NEW: _FFLoadWait: Added Default keyword for $iDelay and $iTimeOut
    * NEW: _FFGetLength: Added "tables"
    * CHANGED!!!: _FFAction: replaced all "true" and "false" strings with boolean true / false
    * CHANGED: _FFFormReset now returns 1 on success otherwise 0
    * CHANGED: _FFFormCheckBox, now returns -1 on error
    * CHANGED: _FFGetLinks, removed the parameter "length"
    if @error the return value is now -1
    Use instead: _FFGetLength()
    * OPTIMIZED: _FFClick

    Viel Spaß damit,

    Grüße
    Stilgar

  • Wer die Syntax, Kurzbeschreibung usw. haben möchte, kann gerne diese Daten dort verwenden:
    http://thorsten-willert.de/Themen/AutoIt-…FF.au3_info.txt
    diese werden auch in der Online Hilfe verwendet.
    Das Trennzeichen der Datensätze ist die Zeichenfolge: <|>

    Das Programm zum erstellen davon:

    Spoiler anzeigen
    [autoit]

    #region Includes
    #include <File.au3>
    #endregion Includes

    [/autoit] [autoit][/autoit] [autoit]

    ; Programm zum extrahieren von Funktions Informationen.
    ; Mon Feb 23 11:43:45 CET 2009 @488 /Internet Time/, by Thorsten Willert

    [/autoit] [autoit][/autoit] [autoit]

    Global $aFile
    Global $aInf[6] = ["name", "description", "beschreibung", "syntax", "link", "related"]
    Global $sText = "", $sTmp, $sLineL
    Global $bSearch = false

    [/autoit] [autoit][/autoit] [autoit]

    Global $sFile = FileOpenDialog("Select an *.au3 file:", EnvGet("programmfiles") & "\AutoIt3\Include", "au3 (*.au3)", 1)
    If @error Then Exit

    [/autoit] [autoit][/autoit] [autoit]

    _FileReadToArray($sFile, $aFile)

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 1 To UBound($aFile) - 1
    $sLineL = StringLower($aFile[$i])

    [/autoit] [autoit][/autoit] [autoit]

    ; alles andere ueberspringen
    If StringInstr($sLineL, "; #function# ===") Then $bSearch = true
    If StringInstr($sLineL, "; ============= ") Then $bSearch = false
    If StringInStr($sLineL, "; #internal_use_only#") Then ExitLoop

    [/autoit] [autoit][/autoit] [autoit]

    If $bSearch Then
    For $j = 0 To UBound($aInf) - 1
    If StringRegExp($sLineL, "; " & $aInf[$j]) Then
    $sTmp = StringStripWs(StringMid($aFile[$i], StringInStr($aFile[$i], ":") + 1), 3)

    [/autoit] [autoit][/autoit] [autoit]

    ConsoleWrite($sTmp & @crlf)
    $sText &= $sTmp & "<|>"
    If $j = UBound($aInf) - 1 Then $sText &= @crlf
    EndIf
    Next
    EndIf
    Next
    $sFile = $sFile & "_info.txt"
    $hFile = FileOpen($sFile,2)
    FileWrite($hFile, $sText)
    FileClose($hFile)

    [/autoit]

    [EDIT]
    Kleines Update - die Links werden nun auch ausgelesen.

    Grüße
    Stilgar

    Einmal editiert, zuletzt von Stilgar (26. Februar 2009 um 12:09)

  • Update auf V0.4.0.5:

    Änderungen seit V0.3.6.1:

    V0.4.0.5:
    - New: String-filter now are working, + HTML-tag filter
    - Changed: _FFGetValueByXPath to
    _FFXPath(ByRef $Socket, $sQuery[, $sAttribute = "textContent"[, $iReturnType = 0[, $iFilter = 1]]])
    now you can get and set attributes by a XPath query.
    - Fixed: _FFLoadWait: Added an additional check for the nsIWebProgress / webProgress.busyFlags
    - Fixed: _FFFormSubmit by Id is now working
    - Removed: Constants for string-filter

    V0.4.0.4:
    - Removed: the event linstener for _FFLoadWait and used the nsIWebProgress interface instead.
    - Removed: _FFKeyPress, use _FFDispatchKeyEvent instead

    V0.4.0.3:
    - Changed: _FFLoadWait now works with the EventListener "DOMContentLoaded"
    removed last parameter from _FFLoadWait
    - Changed: Renamed _FFKeyPress to _FFDispatchKeyEvent and added a new parameter for the event type:
    _FFDisPatchKeyEvent(ByRef $Socket, $sObject, $iKeyCode[, $sEventType = "keydown"])
    - Fixed: _FFStart start-mode 1: added option -new-window to the FF commandline
    - Misc: Added german function description (Beschreibung)
    - Removed: __FFGetBrowserVersion
    - Removed: wrappedJSObject from _FFSetGet (hope that works)

    V0.4.0.2:
    - New: _FFGetObject: Returns a 2 dim array with informations of an object in FF
    _FFGetObject(ByRef $Socket[, $sObject = "window"])
    - New: _FFFormGetLength: Returns the length of the forms
    - New: Global Const $_FF_AU3VERSION = FF.au3 Version
    - New: Global var $_FF_ERROR_MSGBOX = True = show errors in msgboxes if compiled
    - Changed: _FFKeyPress: Now you can can simulate every key on every object
    _FFKeyPress(ByRef $Socket, $sObject, $iKeyCode)
    - Misc: Disabled the output to the console while transfering the JavaScripts and
    in the function _FFLoadWait

    !! Only for test
    - New: Global Array with the last error:
    $_aFF_ERRORS[0][0] time
    $_aFF_ERRORS[0][1] function
    $_aFF_ERRORS[0][2] error int
    $_aFF_ERRORS[0][3] error string
    $_aFF_ERRORS[0][4] message
    V0.4.0.1:
    - Optimized: _FFLoadWait, _FFFormSubmit, _FFStart, __FFStartProcess

    V0.4.0.0:
    - New/Changed: Added parameter $iFilter to (instead of $bCompress)
    _FFReadHTML, _FFReadText, _FFGetValueById, _FFGetValueByName, _FFGetValueByXPath
    Values are:
    $_FF_FILTER_NONE = 0 ; no filter
    $_FF_FILTER_NONE_ASCII = 1 ; remove non ASCII characters
    $_FF_FILTER_WHITESPACES = 2 ; remove all double whitespaces
    $_FF_FILTER_LINEFEEDS= 4 ; remove all double linefeeds
    you combinate them with +

    - New: _FFFormGetLength
    - Added: _FFTabAdd parameter $bLoadWait
    - Added: _FFFormSubmit parameter $bLoadWait
    - Changed: _FFFrameSelected => _FFFrameGetSelected
    - Changed: _FFTabLength => _FFTabGetLength
    - Changed: _FFTabSelected => _FFTabGetSelected
    - Changed: _FFTabSelect => _FFTabSetSelected
    - Changed: _FFGetLinks => _FFLinksGetAll
    - Optimized: _FFFormReset
    - Updated: __FFIsURL - RegEx


    Viel Spaß damit!

    Grüße
    Stilgar

  • Ein kleines Update V0.4.0.6:

    - New: _FFXPath now returns an array for UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE
    - Changed: _FFXPath changed numbers for $iReturnType
    - Fixed: Error in _FFSetGet
    - Fixed: _FFDispatchKeyEvent: events now case insensitiv
    - Fixed: __FFStartProcess (_FFStart) now works with different ports, again

    [EDIT]
    Beispiel für die erweiterte _FFXPath Funktion:

    Spoiler anzeigen
    [autoit]

    #include <Array.au3>
    #include <FF.au3>

    [/autoit] [autoit][/autoit] [autoit]

    $Socket = _FFConnect()
    _FFTabAdd($Socket,"http://ff-au3-example.thorsten-willert.de/")

    [/autoit] [autoit][/autoit] [autoit]

    ; alle "src"en der Bilder die mit "http://www.thorsten-willert.de/bilder" beginnen:
    $aTmp = _FFXPath($Socket,"//img[starts-with(@src,'http://www.thorsten-willert.de/bilder')]","src",7)
    _ArrayDisplay($aTmp)

    [/autoit] [autoit][/autoit] [autoit]

    ; alle Texte des "legend" tags auf der Seite:
    $aTmp = _FFXPath($Socket,"//legend","textcontent",7)
    _ArrayDisplay($aTmp)

    [/autoit]

    Viel Spaß damit!
    Grüße
    Stilgar

    Einmal editiert, zuletzt von Stilgar (5. März 2009 um 17:45)

  • ich bekomm da was nich ausgefuellt, weiss aber net warum :(

    kann mir da einer weiter helfen?

    ich moechte das hier ausfuelle lassen:
    var nick = document.getElementById('username').value;
    var pw = document.getElementById('password').value;

    hab das so versucht:
    #include "FF.au3"

    $Socket = _FFStart()
    If $Socket <> -1 Then
    _FFOpenURL($Socket, "http://www.seafight.de")
    $Obj = "document.getElementById[0]."
    _FFSetGet($Socket, $Obj & 'username.value="username"')
    Sleep(5000)
    _FFSetGet($Socket, $Obj & 'password.value="passwort"')
    Sleep(3000)
    _FFSetGet($Socket, $Obj & 'submit()')
    Else
    MsgBox(16, "Error", "Connection error")
    EndIf

    klappt aber nich:(

    danke

  • Hallo,
    erstmal falscher Thread hier. Hier gibts Nachrichten über neue Versionen.

    Zu deinem Problem, verwende doch auch mal die restlichen Befehle der FF.au3 sonst wirds unnötig kompliziert.

    Zum Script korrigier ich mich, laut AGBs:

    Spoiler anzeigen

    1.2.9 Die Nutzung der Spiele und Services ist nur mittels eines Internetbrowsers oder spezieller, von der Bigpoint GmbH zur
    Verfügung gestellter oder ausdrücklich zugelassener Tools zulässig („Verbot der Nutzung nicht autorisierter Skripte“). Dies
    bedeutet insbesondere: Die Verwendung von Programmen, die eine übermäßige Belastung des Servers erzeugen, ist unzulässig.
    Der Einsatz von Software zur systematischen oder automatischen Steuerung der Spiele oder einzelner Spielfunktionen (Bots,
    Makros), zur Reproduktion oder Auswertung der Spiele, Spielelemente oder der auf der Plattform Bigpoint eingestellten Inhalte ist
    unzulässig.


    und unseren Forenregeln, verweis ich dich einfach mal auf die Online-Hilfe.

    Grüße
    Stilgar

    Einmal editiert, zuletzt von Stilgar (11. März 2009 um 21:49)