RamandeepSingh Posted April 2, 2014 Posted April 2, 2014 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 expandcollapse popup#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}")
Moderators Melba23 Posted April 2, 2014 Moderators Posted April 2, 2014 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Unc3nZureD Posted April 2, 2014 Posted April 2, 2014 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.
Danp2 Posted April 2, 2014 Posted April 2, 2014 Your best bet is to figure out why FF.au3 wasn't functioning as expected. Do you have MozRepl installed and running? Latest Webdriver UDF Release Webdriver Wiki FAQs
RamandeepSingh Posted April 3, 2014 Author Posted April 3, 2014 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
orbs Posted April 3, 2014 Posted April 3, 2014 (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 April 3, 2014 by orbs Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff
RamandeepSingh Posted April 3, 2014 Author Posted April 3, 2014 (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 April 3, 2014 by RamandeepSingh
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now