vivek Posted October 28, 2008 Share Posted October 28, 2008 Hi, I am Vivek and I am trying out Auto IT for automating a few applications I am working with. I checked the tutorials which explained how to open a notepad. I have an application installed on my machine which I would like to automate. Can I open any such exe/application installed on my machine using AutoIt? Link to comment Share on other sites More sharing options...
BrettF Posted October 28, 2008 Share Posted October 28, 2008 Run() Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 28, 2008 Share Posted October 28, 2008 Yes,you can. You need to go through the helpfile carefully and write a bit of your own code. If you have problems post your code here and someone will help. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 28, 2008 Share Posted October 28, 2008 (edited) Yes, feel free to ask questions but make sure that you ask a question we can understand. Goodness knows we get enough garbage requests. Edited October 28, 2008 by Richard Robertson Link to comment Share on other sites More sharing options...
vivek Posted October 29, 2008 Author Share Posted October 29, 2008 Hi All, Thanks for your help. I was able to do it. Can we open aany webpage of our choice with Auto It? Assume I know the IP address of a device, can I open its web interface using an Auto IT command and then perform operations on that page? thanks in advance. Vivek Link to comment Share on other sites More sharing options...
therks Posted October 29, 2008 Share Posted October 29, 2008 Yes, most likely. Have a look at the functions in the helpfile that start with _IE (like _IECreate, _IENavigate, etc). Be warned though, you may need to know/learn how to use the IE DOM. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
vivek Posted November 4, 2008 Author Share Posted November 4, 2008 Hi, #include <IE.au3> $oIE = _IECreate ("www.autoitscript.com") ;Sleep(5000) _IENavigate ($oIE, "http://www.autoitscript.com/forum/index.php?") ;Sleep(5000) _IENavigate ($oIE, "http://www.autoitscript.com/forum/index.php?showforum=9") I guess this script is correct. When I run it, no navigation happesn to the other links given. Am I going wrong anywhere? Also, when I try to launch a webpage, whats happening is that as soon as I run a script, a blank webpage pops up ,and after about 5-6 seconds, another page opens with the site I have requested. Because of 2 webpages getting opened, I am unable to keep my second window as active window and perform operations on it. If I forcefully close the first blank window that popped up, then my code runs on the second window. I have tried commands like WinActive,WinWaitActive,WinActivate with not much help. Does it have anything to do with IE7 browser I am using since multiple tabs open up in the same window in IE7 unlike IE6 where each window is independent. I am suspecting that the trouble I am facing for making a particular window as the active window is due to this. Thanks. Link to comment Share on other sites More sharing options...
bogQ Posted November 4, 2008 Share Posted November 4, 2008 Hi,#include <IE.au3>$oIE = _IECreate ("www.autoitscript.com");Sleep(5000)_IENavigate ($oIE, "http://www.autoitscript.com/forum/index.php?");Sleep(5000)_IENavigate ($oIE, "http://www.autoitscript.com/forum/index.php?showforum=9")I guess this script is correct. When I run it, no navigation happesn to the other links given. Am I going wrong anywhere?Also, when I try to launch a webpage, whats happening is that as soon as I run a script, a blank webpage pops up ,and after about 5-6 seconds, another page opens with the site I have requested. Because of 2 webpages getting opened, I am unable to keep my second window as active window and perform operations on it. If I forcefully close the first blank window that popped up, then my code runs on the second window. I have tried commands like WinActive,WinWaitActive,WinActivate with not much help.Does it have anything to do with IE7 browser I am using since multiple tabs open up in the same window in IE7 unlike IE6 where each window is independent. I am suspecting that the trouble I am facing for making a particular window as the active window is due to this.Thanks.as i understand you have already opened your page and your question is why autoit did open another page if your already exsist. if thats the case look under _IEAttach to replace your _IECreate command.IE7 dono, probably not, maby someone other who is using it can help you with that question :/ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.  Link to comment Share on other sites More sharing options...
vivek Posted November 4, 2008 Author Share Posted November 4, 2008 Hi, _IEAttach doesnt help much. The code just does not run if I use IEAttach instead of IECreate. My goal is simle: Open a webpage( for our example let it be www.gmail.com) Navigate to the Username tab there...type username..navigate to Password...type pasword...click on sign In...Once it logs in, perform some operations inside...maybe click on some mail...etc. i am able to launch the webpage i want ...but as i have mentioned above, as soon as I run the code, a intermediate blank window pops up before my webpage opens up. I am not able to gain control of the 2nd page (actual site page) and enter the username/pwd and login. Does the code below correct atleast partially to get what I want? I am not sure if I am making some basic errors since I am very new to Auto IT... #include <IE.au3> $oIE = _IECreate ("http://www.gmail.com") WinWaitActive ("Gmail: Email from Google - Windows Internet Explorer") $o_form = _IEFormGetObjByName ($oIE, "f1") $o_username = _IEFormElementGetObjByName ($o_form, "username") $o_password = _IEFormElementGetObjByName ($o_form, "passwd") $o_SignIn = _IEFormElementGetObjByName ($o_form, "SI") $username = "enter username here" $password = "enter password here" _IEFormElementSetValue ($o_username, $username) _IEFormElementSetValue ($o_password, $password) _IEAction ($o_SignIn, "click") Please help. Thanks Link to comment Share on other sites More sharing options...
bogQ Posted November 4, 2008 Share Posted November 4, 2008 #include <IE.au3> $oIE = _IECreate ("http://www.gmail.com") $oForm= _IEFormGetCollection ($oIE, 0) $UN = _IEFormElementGetCollection ($oForm, 7) $PW = _IEFormElementGetCollection ($oForm, 8) _IEFormElementSetValue ($UN, "me") _IEFormElementSetValue ($PW, "mypass") _IEFormSubmit ($oForm) there are alot of other exsamples for the ie func if you dono Obj correct name (forum search is your best friend ) have fun TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.  Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 4, 2008 Share Posted November 4, 2008 This is a known problem. Read the help file carefully. IE 7 has some issues. Link to comment Share on other sites More sharing options...
system24 Posted November 5, 2008 Share Posted November 5, 2008 From the help file:As well, if you attempt to use a function like _IENavigate on such an object you may receive COM errors due to the way that IE7 has implemented Tabs. [center]It's a question of mind over matter, if I don't mind, it doesn't matter.[/center] Link to comment Share on other sites More sharing options...
trendzy2010 Posted March 3, 2009 Share Posted March 3, 2009 From the help file: @ "To Open a webpage for example www.gmail.com & Navigate to the Username tab there...type username..navigate to Password...type pasword...click on sign In" U can try using Au3Info.exe to find out the mouse coordinates and use something like MouseClick("primary", 1011, 276, 2), where coordinates 1011, 276 are found using Au3Info.exe. Sample Code:- Run ("C:\Program Files\Internet Explorer\iexplore.exe") WinWaitActive("Blank Page - Microsoft Internet Explorer") Send ("http://www.gmail.com") Send ("{ENTER}") WinWaitActive("Gmail: Email from Google - Microsoft Internet Explorer") MouseClick("primary", 1011, 276, 2) Send ("username") Send ("{TAB}") Send ("password") Send ("{ENTER}") Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 3, 2009 Share Posted March 3, 2009 What was the point of this? Also, when people are automating IE using the COM object, you have to realize that sometimes they don't want a window visible. Link to comment Share on other sites More sharing options...
bogQ Posted March 3, 2009 Share Posted March 3, 2009 old topic @trendzy2010 if you do mouseclick it can b corrcet on your comp, if y try it on comp that have diffrent resolution, in alot of cases it will not work, or if y have one toolbar activated on your IE, coodrinates on that web page will b wrong and your script will not work. send() and mouseclick arnt good way to automate web page, with send "{tab}" will probably b beter option to focus the input on ie, and still it will newer b correct like _IE commands from help file r TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.  Link to comment Share on other sites More sharing options...
trendzy2010 Posted March 4, 2009 Share Posted March 4, 2009 @ bogQ :- Yes, I agree that the coordinates may work for a specific resolution, hence the user is advised to use Au3Info.exe (to find his desirable pts.) before writing his script for all possible cases and use some programming logic to choose between them. Link to comment Share on other sites More sharing options...
herewasplato Posted March 4, 2009 Share Posted March 4, 2009 @ trendzy2010, Welcome to the forum - check your PM inbox. :-) [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
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