madhuri Posted June 4, 2013 Posted June 4, 2013 Hi, By going firefox menu in that click on File------->Save Page As is possible to auto it to automate? Please help me. Thanks
EndFunc Posted June 4, 2013 Posted June 4, 2013 I would say many windows and menus are able to be automated. Have you tried anything yet? Depending on how you want to do it, you could look at Controlclick(), ControlSend() in the helpfile. EndFuncAutoIt is the shiznit. I love it.
madhuri Posted June 4, 2013 Author Posted June 4, 2013 Hi EndFunc, Iam able to click on File but iam not able to click on save Page As. I tried like this: WinWaitActive("Absolute Beginners - General Help and Support - AutoIt Forums - Mozilla Firefox","","20") If WinExists("Absolute Beginners - General Help and Support - AutoIt Forums - Mozilla Firefox") Then Send("!t") Sleep(5000) Send("!d") EndIf If I am using Controlclick() iam not having control id for that bcz iam not able to get it frm window info. Thanks,
jdelaney Posted June 4, 2013 Posted June 4, 2013 Get the FireFox UDF, install the needed addon to firefox to allow the interaction, then use this function in the UDF: _FFReadHTML IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
EndFunc Posted June 4, 2013 Posted June 4, 2013 Hi EndFunc, Iam able to click on File but iam not able to click on save Page As. I tried like this: WinWaitActive("Absolute Beginners - General Help and Support - AutoIt Forums - Mozilla Firefox","","20") If WinExists("Absolute Beginners - General Help and Support - AutoIt Forums - Mozilla Firefox") Then Send("!t") Sleep(5000) Send("!d") EndIf If I am using Controlclick() iam not having control id for that bcz iam not able to get it frm window info. Thanks, Not sure what it is you're doing but this is a simple version. WinActivate("AutoItScript - AutoItScript Website - Mozilla Firefox") Send("!f") Sleep(500) Send("a") WinWaitActive("Save As") Sleep(1000) Send("!s") EndFuncAutoIt is the shiznit. I love it.
jdelaney Posted June 4, 2013 Posted June 4, 2013 (edited) This is reliable, with IE...if only there was a way to interact with the window class #32768...microsoft search states that getmenu should work...it doesn't, can't grab it's commandids...out of ideas...but this is not needed due to the IE functions that can pull the source. #include <GuiToolbar.au3> #include <ie.au3> #include <WinAPI.au3> $oIE = _IECreate("google.com") $hWin = _IEPropertyGet($oIE, "HWND") ConsoleWrite($hWin & @CRLF) WinActivate($hWin) $hControl = ControlGetHandle($hWin, "", "[CLASS:ToolbarWindow32; INSTANCE:5]") $i = 0 While True $cmd = _GUICtrlToolbar_IndexToCommand($hControl, $i) If StringLen ($cmd) > 2 Then ConsoleWrite($cmd & @TAB) $text = _GUICtrlToolbar_GetButtonText($hControl, $cmd) ConsoleWrite($text & @CRLF) If $text = "&File" Then _GUICtrlToolbar_ClickButton($hControl, $cmd) ExitLoop EndIf Else $cmd = "" $hControl = "" Exit EndIf $i += 1 WEnd $hwnd = WinWait("[CLASS:#32768]") ConsoleWrite($hwnd & @CRLF) Sleep(500) ControlSend($hwnd,"","","a") Edited June 4, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
madhuri Posted June 5, 2013 Author Posted June 5, 2013 Hi endfunc, I tried that code but that script is able to click on File only not able to click on Save Page As.Please help me. Thanks
somdcomputerguy Posted June 5, 2013 Posted June 5, 2013 File------->Save Page As Try Send("!fa"), instead of Send("!t") Sleep(5000) Send("!d") - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
madhuri Posted June 5, 2013 Author Posted June 5, 2013 Try Send("!fa"), instead of Send("!t") Sleep(5000) Send("!d") Hi sir, what is the meaning of that "!fa", can u plz explain ............Iam not getting anythng frm google ,Plz help me. Thanks,
somdcomputerguy Posted June 5, 2013 Posted June 5, 2013 Hi,By going firefox menu in that click on File------->Save Page As is possible to auto it to automate?Please help me.Thanks - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
Solution madhuri Posted June 5, 2013 Author Solution Posted June 5, 2013 thank u very much now I got it...........
madhuri Posted June 5, 2013 Author Posted June 5, 2013 thank u very much now I got it........... hi sir , one more clarification i want.......... actually i added some addons in my FF so in Tools it is showing as export cookies (for this no underline is there ), how to work with those scenarios. Please help me. Thanks,
somdcomputerguy Posted June 5, 2013 Posted June 5, 2013 hi sir ,one more clarification i want.......... actually i added some addons in my FF so in Tools it is showing as export cookies (for this no underline is there ), how to work with those scenarios. Please help me. Thanks,You'll probably need the Firefox UDF to do any of that kind of thing. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
madhuri Posted June 5, 2013 Author Posted June 5, 2013 You'll probably need the Firefox UDF to do any of that kind of thing. Hi, How to use FF UDF ? I explored what I understood is first we have place FF.au3 file into our script folder and we have use those predefined functions , Is is correct sir? Iam new to this tool sir please help. Thanks.
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