Sign in to follow this  
Followers 0
RamandeepSingh

To use AutoIT in firefox.(Downloaded FF.au3)

7 posts in this topic

hello everyone ,

    Well I am very much new to AutoIT and worked a very few dayz on it for some RnD purposes. I dont want to create a browser object so I am working with Sending keystrokes through the script in mozilla. what I wanted to do is almost done but I am confused that is it the right way.??
I have not used FF.au3 because its not showing intellisence and the methods in it are giving errors .

I have attached the Script file ...please have a look and let me know if i can make it more consistent and "AutoIT" styleWise.......
thanks

#include <GUIConstantsEx.au3>
#include <FF.au3>
; Open Run Command and start Mozilla firefox
Send("#r")
WinWaitActive("Run")
Run ( @ProgramFilesDir & '\Mozilla Firefox\firefox.exe' )
Sleep(5000)
Send("^l");; select the address bar
Send("http://powerschool.nlcphs.org/admin/pw.html")
Send("{ENTER}")
Sleep(15000)
Send("^a")
Send("psadmin3;psdeveloper")
Send("{TAB}")
Send("{ENTER}")
Sleep(10000)
Send("^l")
Send("http://powerschool.nlcphs.org/admin/tech/dde/")
Send("{ENTER}")
Sleep(6000)
Send("Calendar_Day")
Send("{ENTER}")
Sleep(14000)
;MouseMove(500, 350)
;Send("{TAB}")
;Send("{TAB}")
;Send("{TAB}")
;Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{ENTER}")
Sleep(9000)

MouseClick("left", 500, 355, 1)
Sleep(9000)
Send("{TAB}")
Send("^a")
Send("{BS}")
Send("+{TAB}")
Send("ID")
Send("{ENTER}")
Sleep(2000)
Send("schoolid")
Send("{ENTER}")
Sleep(2000)
Send("scheduleid")
Send("{ENTER}")
Sleep(2000)
Send("{TAB}")
Send("{TAB}")
Send("{DOWN}")

Send("{TAB}")
Send("{TAB}")
Send("{DOWN}")
Send("{DOWN}")
Send("{DOWN}")
Send("{TAB}")
Send("@;;;@")
Send("{TAB}")
Send("{SPACE}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{ENTER}")
Sleep(5000)
Send("!s")
Send("{ENTER}")

Share this post


Link to post
Share on other sites



RamandeepSingh,

Welcome to the AutoIt forum. :)

But please pay attention to where you post - the "Developer Chat" section where you started this thread is not for general support questions. I have moved the thread for you, but would ask you to be more careful in future. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

I suggest to use ControlSend, since simple send causes bug rarely (Alt button will get stucked). Anyways it's better, since it sends directly to a window, not to everything.

Share this post


Link to post
Share on other sites

Your best bet is to figure out why FF.au3 wasn't functioning as expected. Do you have MozRepl installed and running?

Share this post


Link to post
Share on other sites

Thanks for the usefull replies guys.......

Well yes I have MozRepl installed and I hope its working too .....

I ll look forward to make FF.au3 working and use ControlSend ...too

this is the error which  I am getting -

_FFConnect: OS: WIN_8 WIN32_NT 9200 
_FFConnect: AutoIt: 3.3.8.1
_FFConnect: FF.au3: 0.6.0.1b-10
_FFConnect: IP: 127.0.0.1
_FFConnect: Port:   4242
__FFStartProcess ==> General Error: Error reading registry entry for FireFox.
HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox\*CurrentVersion*\Main\PathToExe
Error from RegRead: 1
_FFConnect: Delay:  2ms
_FFConnect ==> Timeout: TCPConnect Error: 10061
_FFConnect ==> General Error: Timeout: Can not connect to FireFox/MozRepl on: 127.0.0.1:4242
_FFIsConnected ==> Socket Error: -1
+>10:26:12 AutoIt3.exe ended.rc:0
>Exit code: 0    Time: 61.588

well I am getiing this .....
Is my MozRepl really working ..??
any more suggestions and feedbacks are welcomed .....thanks guyz

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

your error is discussed in the "Example Scripts" for the FF UDF thread. it requires a fix to the UDF itself (a very simple fix).

'?do=embed' frameborder='0' data-embedContent>>

(scroll up a bit)

to make MozRepl active, click F10 for the Firefox menu, Tools > MozRepl > "start" or "Activate on startup"

Edited by orbs

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Well It Worked .....
made a small test script and FF.au3 Worked ...
Thanks a lot ....Guys
you made my day......
For others who are looking for the small "FIX".......

its ...the line inFF.au3

Local $sFFExe = RegRead($sHKLM & "" & RegRead($sHKLM, "CurrentVersion") & "\Main", "PathToExe")

change it to -

Local $sFFExe = RegRead($sHKLM & "\" & RegRead($sHKLM, "CurrentVersion") & "\Main", "PathToExe")

and Hopefully issue will be fixed.....
Happy Coding....

Edited by RamandeepSingh

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  
Followers 0