Send and receive data from Firefox.
#Include <FF.au3>
_FFCmd($sArg[, $iTimeOut = 30000[, $bTry = True[, $bRec = True]]])
Parameters
$sArg | To send data / commands (JavaScript). |
$iTimeOut | Optional: Timeout for data reception 10000 = (Default) in ms |
Return Value
Success: | Returns Value |
Failure: | Returns "" and sets @ERROR |
@ERROR: |
0 ($_FF_ERROR_Success) 9 ($_FF_ERROR_RetValue) |
Remarks
"window.content.document" always prepended automatically if $sArg beginngs with a leading "."
Related
Example
#Include <FF.au3> _FFConnect() If _FFIsConnected() Then ; href of the current page $sHref = _FFCmd(".location.href") If Not @error Then MsgBox(64,"Current href:",$sHref) _FFOpenURL("http://ff-au3-example.thorsten-willert.de/") ; href from an image link $sHref = _FFCmd(".images[0].parentNode.href") If Not @error Then MsgBox(64,"Href of the first image-link:",$sHref) ; title of the current page $sTitle = _FFCmd( ".title") If Not @error Then MsgBox(64,"Title of the current page:",$sTitle) ; browser version $sVersion = _FFCmd("navigator.userAgent") If Not @error Then MsgBox(64,"Browser version:",$sVersion) Else MsgBox(64,"Error:","Can't conncect to FireFox") EndIf