Jump to content

how to run firefox hidden


Recommended Posts

Should be:

_FFStart("https://website.com", Default, Default, True)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

 

Should be:

_FFStart("https://website.com", Default, Default, True)

it is still showing up:

case $button

     _FFStart ("https://google.com", Default, Default, True)

I use it as a button

am i missing an other code to make this work or something??

some other info

 
>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\programma\test.au3" /UserParams    
+>16:10:45 Starting AutoIt3Wrapper v.2.1.4.4 SciTE v.3.3.7.0 ;  Keyboard:00020409  OS:WIN_81/  CPU:X64 OS:X64    Environment(Language:0413  Keyboard:00020409  OS:WIN_81/  CPU:X64 OS:X64)
>Running AU3Check (3.3.10.2)  from:C:\Program Files (x86)\AutoIt3
+>16:10:45 AU3Check ended.rc:0
>Running:(3.3.10.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\programma\test.au3"    
--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
__FFStartProcess: ""C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-window "https://google.com"  "-repl 4242 "
_FFConnect: OS: WIN_81 WIN32_NT 9600 
_FFConnect: AutoIt: 3.3.10.2
_FFConnect: FF.au3: 0.6.0.1b-10
_FFConnect: IP: 127.0.0.1
_FFConnect: Port:   4242
_FFConnect: Delay:  2ms
_FFConnect: Socket:     844
_FFConnect: Browser:    Mozilla/5.0 (Windows NT 6.3; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0
__FFSendJavaScripts: Sending functions to FireFox .......... done
_FFLoadWait: . loaded in 11ms
[object XrayWrapper [object HTMLDocument]] - {location: {...}, x-auto-57: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, ...}
Edited by Arclite86
Link to comment
Share on other sites

Which version of the UDF do you run?
Search for

Global Const $_FF_AU3VERSION

in the UDF.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Same problem here.

Maybe the UDF needs to be updated for the new versions of FireFox because the Window Class used in _FFStartProcess changed from "MozillaUIWindowClass" to "MozillaWindowClass".

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

have you tryed to switch off the monitor while firefox is running?, in this way you should be able to "hide" the browser......

....just a bit of fun

:P

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to comment
Share on other sites

So in other words it doesn't work untill the the FF creator update's it... <_<  This sucks very much because i created a program that that took me about 4 months to develop it opens about 40 browsers in a few seconds and the it only works on firefox :mad:

Link to comment
Share on other sites

So in other words it doesn't work untill the the FF creator update's it... <_<  This sucks very much because i created a program that that took me about 4 months to develop it opens about 40 browsers in a few seconds and the it only works on firefox :mad:

 

Why don't you try exploring the UDF and make the changes yourself? Water gave you a great head start. Just go through it step by step.

Same problem here.

Maybe the UDF needs to be updated for the new versions of FireFox because the Window Class used in _FFStartProcess changed from "MozillaUIWindowClass" to "MozillaWindowClass".

Link to comment
Share on other sites

Exactly what I would have suggested :)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

So in other words it doesn't work untill the the FF creator update's it... <_<  This sucks very much because i created a program that that took me about 4 months to develop it opens about 40 browsers in a few seconds and the it only works on firefox :mad:

40 browser windows???? You have my attention. what does this thing do once the windows are open? I know a series of operations but I'm curious as to why you need 40 windows to do it.

Link to comment
Share on other sites

40 browser windows???? You have my attention. what does this thing do once the windows are open? I know a series of operations but I'm curious as to why you need 40 windows to do it.

I need to use firefox to use greasemonkey that you recommended me, Thanks for that :) ,but now the whole function is useless If i cant start it hidden, the reason why I need 40 is that I have a large list of name's so i track all info from a website and show the info of that name/user, 

I have about 100 names/users so thats why...

I have found the part of the FF script that  has to do with _FFstart but i have no idea what to chance, And i did not found a  "MozillaUIWindowClass" or a "MozillaWindowClass" in the script where Water was talking about.

; #FUNCTION# ===================================================================
; Name ..........: _FFDisConnect
; Description ...: Disconnects from FireFox
; Beschreibung ..: Trennt die Verbindung mit FireFox / MozRepl
; AutoIt Version : V3.3.0.0
; Syntax ........: _FFDisConnect()
; Parameter(s): .:
; Return Value ..: Success      - 1 / $_FF_GLOBAL_SOCKET = -1
;                  Failure      - 0
;                  @ERROR       -
; Author(s) .....: Thorsten Willert
; Date ..........: Wed Apr 15 09:54:09 CEST 2009
; Link ..........: http://msdn.microsoft.com/en-us/library/ms740668(VS.85).aspx
; Related .......: _FFConnect, _FFIsConnected, _FFStart
; Example .......: Yes
; ==============================================================================
Func _FFDisConnect()
    Local Const $sFuncName = "_FFDisConnect"

    Opt("TCPTimeout", 200)

    If __FFIsSocket($_FF_GLOBAL_SOCKET) Then
        __FFSend("repl.quit()")
        TCPCloseSocket($_FF_GLOBAL_SOCKET)
        If @error Then
            SetError(__FFError($sFuncName, $_FF_ERROR_GeneralError, "TCP Error: " & @error))
            Return 0
        EndIf
        TCPShutdown()
        If Not @error Then
            If $_FF_COM_TRACE Then ConsoleWrite("_FFDisConnect: disconnected" & @CRLF)
            $_FF_FRAME = 'top'
            $_FF_GLOBAL_SOCKET = -1
            Return 1
        Else
            SetError(__FFError($sFuncName, $_FF_ERROR_GeneralError, "TCP Error: " & @error))
            Return 0
        EndIf
    Else
        SetError(__FFError($sFuncName, $_FF_ERROR_SocketError, $_FF_GLOBAL_SOCKET))
        Return 0
    EndIf

EndFunc   ;==>_FFDisConnect

; #FUNCTION# ===================================================================
; Name ..........: _FFIsConnected
; Description ...: Connection status to FireFox / MozRepl
; Beschreibung ..: Liefert den Status der Verbindung mit FireFox / MozRepl
; AutoIt Version : V3.3.0.0
; Syntax ........: _FFIsConnected()
; Parameter(s): .:
; Return Value ..: Success      - 1
;                  Failure      - 0
;                  @ERROR       -
; Author(s) .....: Thorsten Willert
; Date ..........: Mon Sep 28 11:03:44 CEST 2009
; Link ..........:
; Related .......: _FFConnect, _FFDisConnect, _FFStart
; Example .......: Yes
; ==============================================================================
Func _FFIsConnected()
    Local Const $sFuncName = "_FFIsConnected"

    If __FFIsSocket($_FF_GLOBAL_SOCKET) And _FFCmd("FFau3 != null?1:0") = 1 Then Return 1

    SetError(__FFError($sFuncName, $_FF_ERROR_SocketError, $_FF_GLOBAL_SOCKET))
    Return 0
EndFunc   ;==>_FFIsConnected
Link to comment
Share on other sites

; #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[, $iPort = 4242[, $iTimeOut = 30000]]]]]]])
; Parameter(s): .: $sProfile    - Optional: (Default = "default") :
;                  $bNewWin     - Optional: (Default = false) :
;                  $bNoRemote   - Optional: (Default = false) :
;                  $bHide       - Optional: (Default = False) :
;                  $iPort       - Optional: (Default = 4242) :
;                  $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
; ==============================================================================
_FFStart("https://website.com", False, Default, False, True)

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

; #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[, $iPort = 4242[, $iTimeOut = 30000]]]]]]])
; Parameter(s): .: $sProfile    - Optional: (Default = "default") :
;                  $bNewWin     - Optional: (Default = false) :
;                  $bNoRemote   - Optional: (Default = false) :
;                  $bHide       - Optional: (Default = False) :
;                  $iPort       - Optional: (Default = 4242) :
;                  $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
; ==============================================================================
_FFStart("https://website.com", False, Default, False, True)

thanks i hope it works, has somebody a quick way to test if it works

but if i run 

_FFStart("https://google.com", False, Default, False, True)

i get this message:

>Running AU3Check (3.3.10.2)  from:C:\Program Files (x86)\AutoIt3
+>14:18:16 AU3Check ended.rc:0
>Running:(3.3.10.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\joesoef pc\Desktop\autoit\twitter programma\test.au3"    
--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
_FFStart ==> Invalid data type: (IP) $IP: True

I dont know if it works..

Edited by Arclite86
Link to comment
Share on other sites

; #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[, $iPort = 4242[, $iTimeOut = 30000]]]]]]])
; Parameter(s): .: $sProfile    - Optional: (Default = "default") :
;                  $bNewWin     - Optional: (Default = false) :
;                  $bNoRemote   - Optional: (Default = false) :
;                  $bHide       - Optional: (Default = False) :
;                  $iPort       - Optional: (Default = 4242) :
;                  $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
; ==============================================================================
_FFStart("https://website.com", False, Default, False, True)

it doesn't work, has somebody a better solution.

Link to comment
Share on other sites

I also found this code:

Run(@ProgramFilesDir & "\mozilla firefox\firefox.exe")
Do
     Sleep(20)
Until WinExists("Mozilla Firefox")
WinSetTrans("Mozilla Firefox", "", 0)
Sleep(2000)
WinSetState ("[Last]", "", @SW_HIDE)

MsgBox(0, "", "Firefox is now hidden and transparent. Click OK to undo those attributes")

WinSetState ("[Last]", "", @SW_SHOW)
WinSetTrans("[Last]", "", 255)

that also hiddes the browser but I dont know to open a url

Link to comment
Share on other sites

http://kb.mozillazine.org/Command_line_arguments

Run(@ProgramFilesDir & "mozilla firefoxfirefox.exe www.google.com")

Thanks  I got now something like this,: 

Run(@ProgramFilesDir & "\mozilla firefox\firefox.exe www.google.com",@SW_HIDE)

and it works but is it possible to use function like _FFOpenURL , _FFtabadd etc,

it give's me this error when i try it:(no match)

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\joesoef pc\Desktop\autoit\tewt.au3" /UserParams    
+>14:19:30 Starting AutoIt3Wrapper v.2.1.4.4 SciTE v.3.3.7.0 ;  Keyboard:00020409  OS:WIN_81/  CPU:X64 OS:X64    Environment(Language:0413  Keyboard:00020409  OS:WIN_81/  CPU:X64 OS:X64)
>Running AU3Check (3.3.10.2)  from:C:\Program Files (x86)\AutoIt3
+>14:19:30 AU3Check ended.rc:0
>Running:(3.3.10.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\joesoef pc\Desktop\autoit\tewt.au3"    
--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
_FFOpenURL: http://www.autoitscript.com/forum/topic/159896-how-to-run-firefox-hidden/
__FFSend ==> Socket Error
_FFCmd ==> Error return value
_FFOpenURL ==> No match: http://www.autoitscript.com/forum/topic/159896-how-to-run-firefox-hidden/
+>14:19:31 AutoIt3.exe ended.rc:0
+>14:19:31 AutoIt3Wrapper Finished..
>Exit code: 0    Time: 1.594
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...