mark2004 Posted September 15, 2006 Share Posted September 15, 2006 I would like to know if the COM capabilities in the new beta would allow one to create an application that interacts with another program's objects "behind the scenes". A simple example of what I'm trying to accomplish is this: A GUI with 2 edit fields. You enter some text in one edit field and press a button on the GUI. The GUI takes that text and opens a web page such as yahoo. The script then enters the text from the GUI's edit field in the Yahoo search edit field, and initiates the search. The script would then take the number 1 result from the search and populates that text in the other edit field in the GUI. It would be nice if this could be done comletely in the background, i.e. without having the Yahoo IE page visible. This was a generic example. I'm not actually interested in using Yahoo like this. But if a script could be written to do this simple example then I could probably extend the idea to what I want to do. OLE programming is fascinating to me and I know I have alot to learn. This would be a cool (and incredibly useful) tool if I could get this sort of thing to work. Thanks, Mark Link to comment Share on other sites More sharing options...
Stumpii Posted September 15, 2006 Share Posted September 15, 2006 I would like to know if the COM capabilities in the new beta would allow one to create an applicationthat interacts with another program's objects "behind the scenes". A simple example of what I'm tryingto accomplish is this:A GUI with 2 edit fields. You enter some text in one edit field and press a button on the GUI. The GUI takesthat text and opens a web page such as yahoo. The script then enters the text from the GUI's edit field in the Yahoo search edit field, and initiates the search. The script would then take the number 1 result from the search and populates that text in the other edit field in the GUI. It would be nice if this could be done comletely in the background, i.e. without having the Yahoo IE page visible.This was a generic example. I'm not actually interested in using Yahoo like this. But if a script could be written to do this simple example then I could probably extend the idea to what I want to do. OLE programming is fascinating to me and I know I have alot to learn. This would be a cool (and incrediblyuseful) tool if I could get this sort of thing to work.Thanks,MarkDepend on the COM component you are using, but in general, yes, that is whole purpose of having a COM interface.If you need any more help, you need to detail what COM component you plan to use. Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity. Link to comment Share on other sites More sharing options...
Locodarwin Posted September 15, 2006 Share Posted September 15, 2006 (edited) A GUI with 2 edit fields. You enter some text in one edit field and press a button on the GUI. The GUI takesthat text and opens a web page such as yahoo. The script then enters the text from the GUI's edit field in the Yahoo search edit field, and initiates the search. The script would then take the number 1 result from the search and populates that text in the other edit field in the GUI. It would be nice if this could be done comletely in the background, i.e. without having the Yahoo IE page visible.That example is completely possible now. You don't even need the beta, as the current standard release includes all the functionality you need.Open up AutoIt's help file, expand the section called "User Defined Functions," then expand the subsection called "IE Management," and check out some of the functions.Too, be sure to check out the section on COM automation. Open the help, go to the "Search" tab, and search for "COM Reference." There's a wealth of information there.-S Edited September 15, 2006 by Locodarwin (Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent] Link to comment Share on other sites More sharing options...
mark2004 Posted September 15, 2006 Author Share Posted September 15, 2006 Depend on the COM component you are using, but in general, yes, that is whole purpose of having a COM interface.If you need any more help, you need to detail what COM component you plan to use.Thanks Stumpii.I gave that simple example to illustrate a COM component that everyone could relate to and have access to. I think if I could see a simple example of a script that does something along these lines, it would pointme in the right direction. I tend to learn so much quicker by seeing simple examples before I dive intothe theory and documentation. Kind of gives me a good reference to help the theory make sense......anyway, I guess I have some reading to do. I will get there one way or the other!! This is such a powerful tool. I can't wait to master it.Mark Link to comment Share on other sites More sharing options...
CWorks Posted September 15, 2006 Share Posted September 15, 2006 you should take a look at thishttp://www.autoitscript.com/forum/index.php?showtopic=32391 Link to comment Share on other sites More sharing options...
mark2004 Posted September 15, 2006 Author Share Posted September 15, 2006 Thats exactly what I was looking for!!!! very impressive script and it seems to do approximately what I'm looking to learn. I'll go over it along with the documentation for COM. Thanks again. 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