Jump to content
Sign in to follow this  
jb15

How to set up AutoIt for Firefox

Recommended Posts

jb15

Appologies for my newbie question--I'm trying to automate Firefox.

I've installed AutoIt, SciTE, and MozRepl 1.1.2, and downloaded FF.au3. FF.au3 is in the same folder as my script.

Why does this code give me "error: _FFStart(): undefined function"?

#Include <FF.au3>
_FFStart("http://www.lego.com/en-us/default.aspx")
Edited by jb15

Share this post


Link to post
Share on other sites
jb15

Thanks, JohOne, but still getting the same error message:

#Include "FF.au3"
_FFStart("http://www.lego.com/en-us/default.aspx")
; Also tried it without beginning underscore: FFStart(http://www.lego.com/en-us/default.aspx)
Edited by jb15

Share this post


Link to post
Share on other sites
jb15

error: _FFStart(): undefined function.

Share this post


Link to post
Share on other sites
jb15

Oh. Sorry. Is this what you mean?

>"C:\Program Files 
(x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut 
/in "C:\Users\User Not Named\Desktop\AutoIt\BetaMST1.au3" 
/UserParams    +>17:49:29 Starting AutoIt3Wrapper 
v.2.1.4.4 SciTE v.3.3.7.0 ;  Keyboard:00000409  OS:WIN_81/  
CPU:X64 OS:X64    Environment(Language:0409  
Keyboard:00000409  OS:WIN_81/  CPU:X64 OS:X64)>Running AU3Check 
(3.3.10.2)  from:C:\Program Files (x86)\AutoIt3! Au3check doesn't 
support input files encoded as UTF8 with BOM: C:\Users\User Not 
Named\Desktop\AutoIt\FF.au3"C:\Users\User Not 
Named\Desktop\AutoIt\BetaMST1.au3"(12,32) : error: _FFStart(): undefined 
function._FFStart("http://www.lego.com/")~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^C:\Users\User 
Not Named\Desktop\AutoIt\BetaMST1.au3 - 2 error(s), 0 
warning(s)!>17:49:29 AU3Check ended. Press F4 to jump to next 
error.rc:2+>17:49:29 AutoIt3Wrapper Finished..>Exit code: 
2    Time: 0.562
Edited by jb15

Share this post


Link to post
Share on other sites
Danp2
Running AU3Check 
(3.3.10.2)  from:C:\Program Files (x86)\AutoIt3! Au3check doesn't support input files 
encoded as UTF8 with BOM
This is the issue. Open FF.au3 in Scite and then resave it without the UTF-8 encoding.

Share this post


Link to post
Share on other sites
jb15

I copied the text into a new au3 file, and it the function is now recognized. I now get this error, though:

>"C:\Program Files 
(x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut 
/in "C:\Users\User Not Named\Desktop\AutoIt\BetaMST1.au3" 
/UserParams    +>18:34:44 Starting AutoIt3Wrapper 
v.2.1.4.4 SciTE v.3.3.7.0 ;  Keyboard:00000409  OS:WIN_81/  
CPU:X64 OS:X64    Environment(Language:0409  
Keyboard:00000409  OS:WIN_81/  CPU:X64 OS:X64)>Running AU3Check 
(3.3.10.2)  from:C:\Program Files (x86)\AutoIt3+>18:34:44 AU3Check 
ended.rc:0>Running:(3.3.10.2):C:\Program Files (x86)\AutoIt3\autoit3.exe 
"C:\Users\User Not Named\Desktop\AutoIt\BetaMST1.au3"   
 --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to 
Stop__FFStartProcess ==> General Error: Error reading registry entry for 
FireFox.HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mozilla\Mozilla 
Firefox\*CurrentVersion*\Main\PathToExeError from RegRead: 1_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
Edited by jb15

Share this post


Link to post
Share on other sites
jb15

Thank you, Danp2! I really appreciate the help.

Edited by jb15

Share this post


Link to post
Share on other sites
JWW
This is the issue. Open FF.au3 in Scite and then resave it without the UTF-8 encoding.

I know this is old, but I just wanted to know which Encoding option (if not UTF-8 with BOM) I should select before saving FF.au3. Why would the creator using that if it throws errors? I'm new to AutoIt, so I'm genuinely curious!

I need to use FF.au3 and already made the changes that were shown in post #10 (from ). Aside from those 2 changes and changing the Encoding, is there anything else that needs to be changed for FF.au3 to work? Thanks!

2labms2.jpg

Share this post


Link to post
Share on other sites
Sanil

new to autoIT 

i am still not able to add FF udf in autoit 

added the ff.au3 to a folder and connected autoit to include that folder 

started mozrepl( open ff - tools - mozrepl - activate on startup ) 

opened scite wrote 

#Include "FF.au3"

_FFStart("http://www.lego.com/en-us/default.aspx")

errored

scriptfile trying to include itself

i don't know what i am doing wrong

sorry for the noob question

Share this post


Link to post
Share on other sites
Sanil
>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:UserssthomasDesktopautoIT_Progf.au3" /UserParams    
+>09:08:35 Starting AutoIt3Wrapper v.14.801.2025.0 SciTE v.3.4.4.0   Keyboard:00000409  OS:WIN_7/  CPU:X64 OS:X64    Environment(Language:0409)
+>         SciTEDir => C:Program Files (x86)AutoIt3SciTE   UserDir => C:UserssthomasAppDataLocalAutoIt v3SciTEAutoIt3Wrapper   SCITE_USERHOME => C:UserssthomasAppDataLocalAutoIt v3SciTE 
>Running AU3Check (3.3.12.0)  from:C:Program Files (x86)AutoIt3  input:C:UserssthomasDesktopautoIT_Progf.au3
"C:UserssthomasDesktopautoIT_Progf.au3"(1,10) : error: can't open include file "FF.au3".
#Include "FF.au3"
~~~~~~~~~^
"C:UserssthomasDesktopautoIT_Progf.au3"(2,50) : error: _FFStart(): undefined function.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UserssthomasDesktopautoIT_Progf.au3 - 2 error(s), 0 warning(s)
!>09:08:35 AU3Check ended. Press F4 to jump to next error.rc:2
+>09:08:35 AutoIt3Wrapper Finished.
>Exit code: 2    Time: 0.7245

Share this post


Link to post
Share on other sites
Sanil

What do you get if you include the full path to FF.au3 in your include statement?

thank you sir

it worked 

i gave the full path where i kept my udfs ( even though i have connected scite to that folder  in scite config ) 

so every time i have to include the full path of the udf in my include  right ? 

this was my code 

#Include "C:AutoIt_UDFFF V0.6.0.1b-14.au3"

Share this post


Link to post
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
Sign in to follow this  

×