Function Reference

_FFCmd

Sendet und empfängt Daten von FireFox.

#Include <FF.au3>
_FFCmd($sArg[, $iTimeOut = 30000[, $bTry = True[, $bRec = True]]])

 

Parameters

$sArg Zu sendende Daten / Befehle (JavaScript).
$iTimeOut Optional: TimeOut für den Datenempfang
10000 = (Default) in ms

 

Return Value

Success: Returns Value
Failure: Returns "" and sets @ERROR
@ERROR: 0 ($_FF_ERROR_Success)
9 ($_FF_ERROR_RetValue)

 

Remarks

Bei den zu sendenden Daten wird "window.content.document" immer automatisch vorangestellt, sobald Daten mit führendem Punkt gesendet werden.
z.B.:
".forms[0].elements[2].value=2"
wird gesendet als:
"window.content.document.forms[0].elements[2].value=2"

 

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