danusko Posted August 24, 2005 Posted August 24, 2005 Hi everybody, i need your help with stupid simply command. I want to send a key to not active window of IE. In this window is 2 combos (month of year). I want to select other month in combo. I use the "down" key but it doesnt works. skript: ControlSend("Kalendár", "", "Internet Explorer_TridentCmboBx1", "{down 3}") it makes 3x down but no in combo. It makes in window - scrool - 3 lines down. pls. help. why it doesnt works? thank you very much
LOULOU Posted August 24, 2005 Posted August 24, 2005 Hi everybody, i need your help with stupid simply command.I want to send a key to not active window of IE. In this window is 2 combos (month of year). I want to select other month in combo. I use the "down" key but it doesnt works. skript: ControlSend("Kalendár", "", "Internet Explorer_TridentCmboBx1", "{down 3}") it makes 3x down but no in combo. It makes in window - scrool - 3 lines down. pls. help. why it doesnt works?thank you very much<{POST_SNAPBACK}>You can't control IE with ControlSend because this function can't see an Object Explorer. The reason while you have three {down } is because Controlsend apply anywhere in the current window .You can have the same result using IE automation by daleHohmRead that's post IE automation and after you can do what you want
danusko Posted August 24, 2005 Author Posted August 24, 2005 Oh no. My old problem. I dont have install autoit 3 on my computer. (its in work and i dont have a permission). But i try it. I create IE.au3 file - copy the script from your link and insert it in my "include" folder, but its show me error - "Error reading the file: IE.au3" I run script: #include <IE.au3> $o_IE = _IECreate () _IENavigate ($o_IE, "http://autoitscript.com") _IEClickLinkByText ($o_IE, "forum") _IEClickLinkByText ($o_IE, "Search") $o_SearchForm = _IEFormGetObjByName ($o_IE, "sForm") $o_Keywords = _IEFormElementGetObjByName ($o_SearchForm, "keywords") _IEFormElementSetValue ($o_Keywords, "ReadyState") _IEFormSubmit ($o_SearchForm) It is because i dont have instaled Autoit 3??? Or is there other problem ? thanks
Raindancer Posted August 24, 2005 Posted August 24, 2005 #include <IE.au3>Replace it with:#include "C:\Program Files\Autoit\Include\IE.au3"Replace C:\Program Files\AutoIt\Include\ to wherever the IE.au3 file is located on your harddrive. Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer
danusko Posted August 24, 2005 Author Posted August 24, 2005 Replace it with:#include "C:\Program Files\Autoit\Include\IE.au3"Replace C:\Program Files\AutoIt\Include\ to wherever the IE.au3 file is located on your harddrive.<{POST_SNAPBACK}>yes, it works but, .......... .its shows this error---------------Line 776 (File "c:\autoit\include\IE.au3):If IsObj($o_object.elements) ThenIf IsObj($o_object.e-ERRORError: Unable to parse line. ---------------------------Pleeeease help. it will be very usefull for me, when it will be works...but i have still some problem
Raindancer Posted August 24, 2005 Posted August 24, 2005 yes, it works but, .......... .its shows this error---------------Line 776 (File "c:\autoit\include\IE.au3):If IsObj($o_object.elements) ThenIf IsObj($o_object.e-ERRORError: Unable to parse line. ---------------------------<{POST_SNAPBACK}>Are yo using the latest Beta? If not, then you can get it here: http://www.autoitscript.com/forum/index.php?showtopic=10256It is needed, cause only the Beta is able to use COM-Objects. Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer
danusko Posted August 24, 2005 Author Posted August 24, 2005 Are yo using the latest Beta? If not, then you can get it here: http://www.autoitscript.com/forum/index.php?showtopic=10256It is needed, cause only the Beta is able to use COM-Objects.<{POST_SNAPBACK}>No, i dont have the newest vs, you right. I downloaded the newest vs. and its works. GREATThanke you very much. Im happy. )))))))
Raindancer Posted August 24, 2005 Posted August 24, 2005 Im happy. )))))))<{POST_SNAPBACK}>I'm happy that I could help you Have a nice day Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer
danusko Posted August 24, 2005 Author Posted August 24, 2005 ok now its all works but i dont find out, how i use this IE function f.e. i wont to click on button, but i don know how i define it or combo box i try to use $oFrom = _IEFormGetObjByName($oIE, "sForm") but it doesnt works $oFrom = _IEFormGetObjByName($oIE, "sForm") with AU3info i find info about window out, but which variables are? sorry for my english thanks
Raindancer Posted August 24, 2005 Posted August 24, 2005 Search for the Form which Button you want to press.Ex: <form action="http://www.autoitscript.com/forum/index.php?" method="post" name="search">Look for the Name.Then get the Form-Object like this.$oForm = _IEFormGetObjByName($oIE, "search")if it is a Submit button you want to click Ex: <input type="submit" value="Search Topic" class="button" />just use the following code:_IEFormSubmit($oForm)If it isn't a Submit ButtonEx: <input type="button" name="qrc" >Then use the following code to get the Object for this Button:$oButton = _IEFormElementGetObjByName($oIE, "qrc")Then just invoke the following code:$oButton.clickGreat isn't it Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer
danusko Posted August 25, 2005 Author Posted August 25, 2005 sorry but from where you have this info? Ex: <input type="submit" value="Search Topic" class="button" />In AU3Info.exe is only class information. Or it depends, what i want? f.e.: i want to click on "submit button", so i choose this example?Concrete. I need to 3x send "down key" in combo box, but i dont know, define it. this info i have in au3info-----------------Press CTRL-ALT-F to pause the display.>>>>>>>>>>>> Window Details <<<<<<<<<<<<<Title: Kalendár - Microsoft Internet ExplorerClass: IEFrameSize: X: 0 Y: 3 W: 850 H: 700>>>>>>>>>>> Mouse Details <<<<<<<<<<<Screen: X: 162 Y: 258Cursor ID: 2>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<RGB: Hex: 0xDCEDFD Dec: 14478845>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<Size: X: 131 Y: 214 W: 41 H: 22Control ID: 57ClassNameNN: Internet Explorer_TridentCmboBx2Text: >>>>>>>>>>> Status Bar Text <<<<<<<<<<<(1): Done(2): (3): (4): (5): (6): Local intranet--------------Can i use this info, or i no use InfoAU3 at all?thanks for help
Raindancer Posted August 25, 2005 Posted August 25, 2005 sorry but from where you have this info? Ex: <input type="submit" value="Search Topic" class="button" />This is HTML Code. You get it by a right click -> Show source on the webpage you want to investigate, and then you can search for type="submit".In AU3Info.exe is only class information. Or it depends, what i want? f.e.: i want to click on "submit button", so i choose this example?AU3Info is unable to get the Control Informations of Webpage element, so it would never help you in scripting a Webpage.Concrete. I need to 3x send "down key" in combo box, but i dont know, define it. <{POST_SNAPBACK}>Hopefully for you the Combobox also has a name attribute (Ex. name="combo1")Then you can select it with: $oCombo = _IEFormElementGetObjByName($oIE, "combo1")Then how to set the Focus to it I don't know... Maybe a $oCombo.Focus (didn't test) I never had to mess with comboboxes on webpages... Read trough the IE.au3, there are so descriptions which might help you. Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer
danusko Posted August 25, 2005 Author Posted August 25, 2005 Oh HTML i dont know its a pity it seems, its too hard for me thanke you very much for you time and advise
LOULOU Posted August 25, 2005 Posted August 25, 2005 OhHTML i dont know its a pityit seems, its too hard for methanke you very much for you time and advise<{POST_SNAPBACK}>gIVE US THE ADRESS OF THE WEBSITE YOU WANT TO AUTOMATE? AFTER WE WILL SAY YOU HOW TO DO
Raindancer Posted August 25, 2005 Posted August 25, 2005 HTML i dont know its a pity<{POST_SNAPBACK}>You don't have to know how to write HTML. Just search for a Line looking similar to my example. You only need the name of the element you want to adress. And this name can you find if you investigate the HTML-Sourcecode.But yes. Tell us which page you want to automate maybe we can help you there... Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer
danusko Posted August 25, 2005 Author Posted August 25, 2005 Rally thanks for your goodlwill boys.But this is not a i-net web, this is our intranet in my work and it is an Aplication names Calendar. (see on picture. )I want get up work with combos and buttons and so...Rally thanks for your goodlwill boys.Or is easear possibility to send key to not activ IE window ?
Raindancer Posted August 25, 2005 Posted August 25, 2005 You can send us the Code inside this Forum. And the last possibility is to {TAB} arround until you are on the correct control. Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer
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