Function Reference

_FFObj

Returns or sets an value of an attribute.

#Include <FF.au3>
_FFObj($sObject[, $sAttrib = ""[, $vValue = ""]])

 

Parameters

$sObject Object from _FFObjGet or _FFXPath
DOM element
DOM element abbreviation
DOM element with attribute and value
$sAttrib (Optional) attribute of the element
$vValue (Optional) value of the attribute

 

Return Value

Success: Returns value from attribute
Failure: Returns "" and sets @ERROR
@ERROR: 0 ($_FF_ERROR_Success)
4 ($_FF_ERROR_InvalidValue)
8 ($_FF_ERROR_NoMatch)

 

Remarks



 

Related

_FFObjGet, _FFObjNew, _FFObjDelete

 

Example

#Include <FF.au3>

_FFConnect()

If _FFIsConnected() Then
	_FFTabAdd("http://ff-au3-example.thorsten-willert.de/")

	_FFXPath("//form[1]//input[position()=2]","",9)
	MsgBox(64,"", _FFObj("xpath","type"))
	; OR
	MsgBox(64,"", _FFObj("xpath.value"))
	_FFObj("xpath.checked=true")

	Sleep(5000)

	_FFOpenURL("google.com")

	If _FFObjNew("google", "window.content.document") Then
		MsgBox(64, "Cookie", _FFObj("google","cookie"))
		; OR
		MsgBox(64, "Domain", _FFObj("google.domain"))
		_FFObjDelete("google") ; :D
	EndIf

	$sInput = _FFObjGet("q", "name") ; returns a string - no object!
	_FFObj($sInput, "value", "autoit")
	MsgBox(64, "Suche: ", _FFObj($sInput, "value"))

	_FFTabClose("Google", "label")

	_FFDisConnect()
EndIf