Function Reference

_FFConnect

Connects to FireFox / MozRepl

#Include <FF.au3>
_FFConnect([$IP = "127.0.0.1"[, $iPort = 4242[, $iTimeOut = 60000]]])

 

Parameters

$IP Optional: IP of the computer where FireFox is running.
"127.0.0.1" = (Default) localhost
$iPort Optional: Port number of MozRepl.
4242 = (Default)
$iTimeOut Optional: TimeOut in ms.
60000 = (Default)

 

Return Value

Success: Returns 1 / $_FF_GLOBAL_SOCKET > -1
Failure: Returns 0 / $_FF_GLOBAL_SOCKET = -1 / and sets @ERROR
@ERROR: 0 ($_FF_ERROR_Success)
1 ($_FF_ERROR_GeneralError)
3 ($_FF_ERROR_InvalidDataType)
6 ($_FF_ERROR_Timeout)

 

Remarks

For all parameters can also used the keyword default.

 

Links

http://msdn.microsoft.com/en-us/library/ms740668(VS.85).aspx

 

Related

_FFDisConnect, _FFIsConnected, _FFStart

 

Example

#Include <FF.au3>

; trying to connect to a running FireFox with MozRepl on
If _FFConnect(Default, Default, 3000) Then
	; open a page
	_FFOpenURL("http://ff-au3-example.thorsten-willert.de/")
	Sleep(3000)
	; disconnect from FireFox
	If _FFDisConnect() Then MsgBox(64, "", "Disconnected from FireFox!")
Else
	MsgBox(64, "", "Can't connect to FireFox!")
EndIf