bailworth Posted June 24, 2009 Share Posted June 24, 2009 Dear All, This is my first post in this forum so I hope somebody out there can help me. I am developing my first autoit project and so far have managed to find all the answers to my questions somewhere in the forum. However, I cannot seem to find anything that helps me with the issue I currently have, which is: I am developing an autoit project to work with a IE based application that reads/writes data to an oracle database. The application uses java and so when I use the 'Window Info' tool, the 'text' that is found in the window just says 'Output Painter Window'. This is causing me a problem because there is a parent application window and several child application windows within the same IE browser window (I hope that makes sense). Part of the process that my project does, is to enter a bank sortcode and account number. However, when I click 'Next' the application checks to see if the sortcode and account number already exists in the oracle database and opens different windows as to whether it does or does not already exist. What I would like to do is find a way to identify if this window appears and if so then I will change the next process in the autoit project, if it doesnt appear then continue with the predefined function. The problem is, that I cannot uniquely identify this child window that opens because the 'Window Info' tool doesnt find any text that is specifc to this page, it just lists 'Output Painter Window' the same as all the others. Does anyone know of another way that I can identify this window or a clever work around to help me with this? Thanks in advance Keith Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 24, 2009 Share Posted June 24, 2009 Dear All,This is my first post in this forum so I hope somebody out there can help me.I am developing my first autoit project and so far have managed to find all the answers to my questions somewhere in the forum. However, I cannot seem to find anything that helps me with the issue I currently have, which is:I am developing an autoit project to work with a IE based application that reads/writes data to an oracle database. The application uses java and so when I use the 'Window Info' tool, the 'text' that is found in the window just says 'Output Painter Window'. This is causing me a problem because there is a parent application window and several child application windows within the same IE browser window (I hope that makes sense).Part of the process that my project does, is to enter a bank sortcode and account number. However, when I click 'Next' the application checks to see if the sortcode and account number already exists in the oracle database and opens different windows as to whether it does or does not already exist. What I would like to do is find a way to identify if this window appears and if so then I will change the next process in the autoit project, if it doesnt appear then continue with the predefined function. The problem is, that I cannot uniquely identify this child window that opens because the 'Window Info' tool doesnt find any text that is specifc to this page, it just lists 'Output Painter Window' the same as all the others.Does anyone know of another way that I can identify this window or a clever work around to help me with this?Thanks in advanceKeithHave you examined the IE DOM objects involved with something like DebugBar, and looked at the _IE* functions of the IE.au3 UDF? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
bailworth Posted June 24, 2009 Author Share Posted June 24, 2009 Have you examined the IE DOM objects involved with something like DebugBar, and looked at the _IE* functions of the IE.au3 UDF? No I havent and I dont profess to know much about DOM, is there any pointers you could give me? Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 24, 2009 Share Posted June 24, 2009 No I havent and I dont profess to know much about DOM, is there any pointers you could give me?Try out the example scripts for the various _IE* functions in the help file to get the general idea. The specifics can be Googled, for example: MSDN: About the W3C Document Object Model Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
bailworth Posted June 24, 2009 Author Share Posted June 24, 2009 Try out the example scripts for the various _IE* functions in the help file to get the general idea. The specifics can be Googled, for example: MSDN: About the W3C Document Object Model Thanks for the reference. However, I have got stuck on a starter for 10.I am trying to read in the html of the particular page (mentioned above) so that I can flag an identification process on it as a possible resolution, but I cant see how to _IEDocReadHtml on a window that is already open. I can get the html using _IECreate but this is no good as the window will already be open. I tried _IEAttach but that didnt seem to work. Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 24, 2009 Share Posted June 24, 2009 Thanks for the reference. However, I have got stuck on a starter for 10.I am trying to read in the html of the particular page (mentioned above) so that I can flag an identification process on it as a possible resolution, but I cant see how to _IEDocReadHtml on a window that is already open. I can get the html using _IECreate but this is no good as the window will already be open. I tried _IEAttach but that didnt seem to work.Take it one step at time. First, you need to get _IEAttach() working. Post your code for just getting "$oIE = _IEAttach(your, stuff, here)". Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
bailworth Posted June 24, 2009 Author Share Posted June 24, 2009 (edited) Take it one step at time. First, you need to get _IEAttach() working. Post your code for just getting "$oIE = _IEAttach(your, stuff, here)". The window that I want to read the html from is a remote login. When I run the 'Window Info' tool it returns the IP address, this works fine for using something like 'WinActivate("00.11.22.33") but _IEAttach doesnt seem to like it. Here the 3 lines of code I am using$oIE = _IEAttach("00.11.22.33")$sHTML = _IEDocReadHTML($oIE)MsgBox(0, "Document Source", $sHTML) Edited June 24, 2009 by bailworth Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 24, 2009 Share Posted June 24, 2009 The window that I want to read the html from is a remote login. When I run the 'Window Info' tool it returns the IP address, this works fine for using something like 'WinActivate("00.11.22.33") but _IEAttach doesnt seem to like it. Here the 3 lines of code I am using$oIE = _IEAttach("00.11.22.33")$sHTML = _IEDocReadHTML($oIE)MsgBox(0, "Document Source", $sHTML)Look at the second parameter in the help file for _IEAttach(). The default match type is "Title", the DOCUMENT title. You seem to want "WindowTitle". Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
bailworth Posted June 24, 2009 Author Share Posted June 24, 2009 Look at the second parameter in the help file for _IEAttach(). The default match type is "Title", the DOCUMENT title. You seem to want "WindowTitle". I is beng well DUM ere, how do I specify the window title instead of the document title?I have tried _IEAttach("00.11.22.33","embedded") but that just returns 0 Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 25, 2009 Share Posted June 25, 2009 I is beng well DUM ere, how do I specify the window title instead of the document title?I have tried _IEAttach("00.11.22.33","embedded") but that just returns 0If it is a standard instance of IE, then _IEAttach("00.11.22.33","WindowTitle") should work. Why did you try "embedded"? Is this instance of IE embedded within another app's GUI? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
bailworth Posted June 25, 2009 Author Share Posted June 25, 2009 (edited) If it is a standard instance of IE, then _IEAttach("00.11.22.33","WindowTitle") should work. Why did you try "embedded"? Is this instance of IE embedded within another app's GUI? Thanks for the syntax, I will give it a try and see what happens. I have no idea why I tried 'embedded', other than the fact that I had been trawling through the help files, reading so much material that I think I just got totally confused. I only started on autoit a few days ago so am still a total newbie.Thanks for your help so far, I will give your suggestion a try and see what happens. Edited June 25, 2009 by bailworth 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