Jump to content



Photo

problème with _FFstart()


  • Please log in to reply
7 replies to this topic

#1 capomar

capomar

    Seeker

  • Active Members
  • 7 posts

Posted 22 March 2012 - 09:11 PM

Hello Everyone

When I execute _FFstart (url) two mozilla window opens simultaneously
one with the url I get , the other window is one with the port number of mozrepl "'4242"
execuse me my English is somewhat mediocre, if somebody have a idea on the problem?





#2 CaptainClucks

CaptainClucks

    Unum Cavillator Spuria

  • Active Members
  • PipPipPipPipPipPip
  • 1,216 posts

Posted 23 March 2012 - 12:07 AM

Hello Everyone

When I execute _FFstart (url) two mozilla window opens simultaneously
one with the url I get , the other window is one with the port number of mozrepl "'4242"
execuse me my English is somewhat mediocre, if somebody have a idea on the problem?


There are two things wrong with your question, let me pont them out for you since no one seems to wana do it...

1.) You provide no source regarding the problem script code;
2.) Are we supposed to just magically know what's wrong with the source we can't even see?

A lot of new people here seems to think this place is full of wizards, it's actually not..

If the script in question is a UDF from the examples area, then you should at least specify where you got it by providing a link to the version you have.

Edited by THAT1ANONYMOUSEDUDE, 23 March 2012 - 12:09 AM.

Spoiler
Warning: Posts by this user are subject to change or may disappear without notice.

#3 capomar

capomar

    Seeker

  • Active Members
  • 7 posts

Posted 23 March 2012 - 08:48 AM

i'm just a beginer in autoit
here is code:

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


_FFStart("http://www.Exemple.co.ma/")
WinWaitActive("SSO v4.07.13 - Mozilla Firefox")
;Sleep(5000)

$ct=_FFFormOptionselect("slctSSOService","name","http://www.google.co.ma/")
If $ct=1 then
Sleep(1000)
Send("osounfou",1)
sleep(1000)
Send("{TAB}")
sleep(1000)
Send("Crypton'042488",1)
_FFClick("Imagefield","name",0)
WinWaitActive("TeamForge : Welcome - Mozilla Firefox")
;sleep(9000)


Else
Msgbox(0,"Error"," Error: " & @error)
EndIf
_FFLoadWait()
$ct1= _FFLinkClick("https://www.coco.com")
If $ct1<>1 Then
Msgbox(0,"Error"," oops " & @error)
EndIf
Sleep(1000)


#4 JLogan3o13

JLogan3o13

    Down to 98

  • MVPs
  • 2,070 posts

Posted 23 March 2012 - 12:53 PM

There are two things wrong with your question, let me pont them out for you since no one seems to wana do it...

1.) You provide no source regarding the problem script code;
2.) Are we supposed to just magically know what's wrong with the source we can't even see?

A lot of new people here seems to think this place is full of wizards, it's actually not..

If the script in question is a UDF from the examples area, then you should at least specify where you got it by providing a link to the version you have.


While I agree with the line of thought, I think it could have been delivered better. Take a look at your own Content sometime :oops: We were all new once, and have all asked a question we probably should have given more thought to (I know I have).
J.I spent 10 minutes reviewing code and thinking "What kind of drugs is this guy on?" before realizing it was something I wrote.My Scripts:Include Source with Compiled Script, Disk Maintenance for Windows XP, "Deal-A-Day" Sites, SCCM 2007 Front End, Windows Firewall UDF

#5 CaptainClucks

CaptainClucks

    Unum Cavillator Spuria

  • Active Members
  • PipPipPipPipPipPip
  • 1,216 posts

Posted 23 March 2012 - 01:05 PM

While I agree with the line of thought, I think it could have been delivered better. Take a look at your own Content sometime :doh: We were all new once, and have all asked a question we probably should have given more thought to (I know I have).


You seem to imply that I once as well thought this forum was inhabited by wizards that knew my problems, link me to a post I've made that supports this idea, I like the concept of it, good times.. :oops: , jk, don't link me to anything, I don't want to be embarrassed.. :bye:

anyway, to the op, I think he needs to be setting his own parameters, so I assume it must be that or something that has to do with the functions parameters in question.

_FFStart($sURL = "about:blank", $sProfile = "default", $iMode = 1, $bHide = False, $IP = "127.0.0.1", $iPort = 4242)

Especially since he mentioned port 4242 and that's the default port the function uses.
Spoiler
Warning: Posts by this user are subject to change or may disappear without notice.

#6 GMK

GMK

  • Active Members
  • PipPipPipPipPipPip
  • 330 posts

Posted 23 March 2012 - 08:21 PM

Unfortunately, it's a problem when using newer versions of Firefox with FF.au3. Apparently, the -repl command line switch doesn't work anymore. I ended up modifying the __FFStartProcess function (at the very bottom of FF.au3):
AutoIt         
; #INTERNAL_USE_ONLY# ========================================================== ; Name ..........: __FFStartProcess ; Description ...: Starts the firefox.exe ; AutoIt Version : V3.3.0.0 ; Syntax ........: __FFStartProcess([$sURL = "about:blank"[, $bNewWin = False[, $sProfile = "default"[, $bNoRemote = False[, $bHide = False[, $iTimeOut = 30000]]]]]]) ; Parameter(s): .: $sProfile    - Optional: (Default = "default") : ;                 $bNewWin   - Optional: (Default = false) : ;                 $bNoRemote   - Optional: (Default = false) : ;                 $bHide       - Optional: (Default = False) : ;                 $iTimeOut - Optional: (Default = 30000) : min. 2000ms ; Return Value ..: Success    - 1 ;                 Failure     - 0 ;                 @ERROR       - ;                 @EXTENDED - PID from the firefox.exe ; Author(s) .....: Thorsten Willert ; Date ..........: Wed Nov 04 16:01:59 CET 2009 ; ============================================================================== Func __FFStartProcess($sURL = "about:blank", $bNewWin = False, $sProfile = "default", $bNoRemote = False, $bHide = False, $iTimeOut = 30000)     Local Const $sFuncName = "__FFStartProcess"     Local $PID = -1     Local $sNoRemote = "", $sNewWin     Local $sProcName = $_FF_PROC_NAME     If $sProfile = "default" Then         $sProfile = ''     Else         $sProfile = ' -P "' & $sProfile & '"'     EndIf     If $bNoRemote Then $sNoRemote = "-no-remote"     If $bNewWin Then $sNewWin = "-new-window"     $sURL = '"' & $sURL & '"'     If $iTimeOut < 2000 Then $iTimeOut = 2000     Local $sHKLM = "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp Pathsfirefox.exe"     Local $sFFExe = RegRead($sHKLM, "")     If @error Then         SetError(__FFError($sFuncName, $_FF_ERROR_GeneralError, "Error reading registry entry for FireFox." & @CRLF & _                 "HKEY_LOCAL_MACHINEMicrosoftWindowsCurrentVersionApp Pathsfirefox.exe" & @CRLF & _                 "Error from RegRead: " & @error))         Return 0     EndIf     Local $sCommand = StringFormat('"%s" %s %s %s %s', $sFFExe, $sNewWin, $sURL, $sNoRemote, $sProfile)     $PID = Run($sCommand)     If $bHide Then BlockInput(1)     Local $iTimeOutTimer = TimerInit()     While 1         Sleep(2000)         If ProcessExists($sProcName) Then ExitLoop         If (TimerDiff($iTimeOutTimer) > $iTimeOut) Then             SetError(__FFError($sFuncName, $_FF_ERROR_Timeout, "Browser process not exists: " & $sProcName))             BlockInput(0)             Return 0         EndIf     WEnd     If $bHide Then         Local $WINTITLE_MATCH_MODE = AutoItSetOption("WinTitleMatchMode", 4)         WinWaitActive("[CLASS:MozillaUIWindowClass]")         Sleep(500)         WinSetState("[CLASS:MozillaUIWindowClass]", "", @SW_MINIMIZE)         BlockInput(0)         AutoItSetOption("WinTitleMatchMode", $WINTITLE_MATCH_MODE)     Else         Sleep(1000)     EndIf     If $_FF_COM_TRACE Then ConsoleWrite('__FFStartProcess: "' & $sCommand & @CRLF)     SetExtended($PID)     Return 1 EndFunc   ;==>__FFStartProcess

Edited by GMK, 23 March 2012 - 08:22 PM.


#7 RichardL

RichardL

    Adventurer

  • Active Members
  • PipPip
  • 141 posts

Posted 24 March 2012 - 06:10 AM

Hi Capomar,

See fix for this from Cramaboule

http://www.autoitscript.com/forum/topic/95595-ffau3-v0600b/page__st__380

Richard

#8 capomar

capomar

    Seeker

  • Active Members
  • 7 posts

Posted 25 March 2012 - 04:23 PM

thank's everyone for the help :oops:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users