From: timsuth@... (Tim Sutherland) Date: 2004-05-24T20:33:45+09:00 Subject: Re: Win32OLE question In article <2harbeFaburtU1@uni-berlin.de>, Shashank Date wrote: >Hi Carl, > >> Basically what I want to do is write >> some scripts that search through the current window hierarchy and find >> certain windows and then send messages to those windows to imitate >> clicks and keystrokes. Does anyone know if this can be done with the >> libraries in their current state? >> >> Thanks, >> Carl Youngblood > >Were you able to find a solution for this ? I'm not the original poster, but I've done something like this. I didn't use Win32OLE though, I used Win32 calls. (Easy thanks to the 'dl' library.) There's a program called "Winspector" (www.windows-spy.com) which allows you to see what messages are sent to a window when you do things. (Like click a button.) You can simulate user-actions by sending these same messages. (Microsoft has a similar program called Spy++ which they distribute with Visual Studio.) I gave a talk about this once, slides are at http://www.sdkacm.com/static/events/12-March-2004/slides.sxi (OpenOffice.org format). I'm not sure how useful the slides will be, many of them just say things like "[demonstrate code that does ... ]", and I don't have the demonstrations online. I'll ask work if I can release the code I wrote under a nice license (BSD/MIT-style). They've previously done this for code that's not directly related to our project, so there's a good chance we can do this. (It may take a little while ...) Feel free to ask me if you have any questions about this. -- Tim Sutherland 2004 SDKACM President Software Developers' Klub - the University of Auckland ACM Student Chapter http://www.sdkacm.com/