
Basic Ahk v1.1+ COM Tutorial for Webpages
If you want to quickly change it from IE to pwb then use Ctrl + h and replace IE with Pwb. :wink:

wb.quitbefore exiting your script.
During testing I ended up with 10 invisible iexplore.exe processes.
I only found this in one place in the manual and it has no explaination.

That's because you never closed those windows. By default Microsoft windows start off in invisible mode. They exist just like normal windows you just can't see them. Since you can't see the close window button you can't close them normally. The .quit method closes them as if you press that button. :wink:


Thank your and thank you. I feel the trick is to explain it as you would to yourself. Only a dumber version, if possible, of yourself. :wink:Mickers, please continue with your amazing tutorial. You have a talent for explaining complicated things in simple terms. Also, I like your sense of humor.
I'll take any suggestions you may have as to what I should work on next.


- I know nothing about COM, but I really want to learn it at least to some degree that I could use it in solving some of my problems and achieving some of my goals. I have already stumbled upon "you need to do it trough COM" suggestion quite a few times. So I can't really give you any specific suggestions here. The only one is please don't stop, please continue with this tutorial.I'll take any suggestions you may have as to what I should work on next.

Why don't you post questions in Ask For Help? I'd happy to help if you keep questions simple.- I know nothing about COM, but I really want to learn it at least to some degree that I could use it in solving some of my problems and achieving some of my goals. I have already stumbled upon "you need to do it trough COM" suggestion quite a few times.

- At the moment I don''t have any specific questions on COM as my knowledge of it and experience in using it, apart from knowing that it could really be helpful, equal almost to zero. So, I would rather first read a tutorial on it to get a general idea of how COM works and what it can do.Why don't you post questions in Ask For Help? I'd happy to help if you keep questions simple
Anyway, thank you for your reediness to provide support in the form of answers, as well as thank you for all the answers you have already provided to my questions so far on this forum (I am not sure whether you are that "Guest" who have been answering my questions in "Ask for Help" so far or merely a guest that just came by, in which case I guess my many thanks are obviously not addressed to you)
- Since my knowledge of COM is, as I said, so little, my questions will surely be very simple.I'd happy to help if you keep questions simple

Your probably need to learn more about using the MSDN as a reference.
your probably if using a browser need to spend more time learning DOM
you know how to use create obj
and you know how to set a property such as visible and call a method such as quit
My advice is learn more about using the documentation for the app your using COM on

WIN or LEARN.
- I have no idea what DOM is.your probably if using a browser need to spend more time learning DOM
- Objects and whatever is related to them is still a deep forest to me.you know how to use create obj
- No idea at all. Why do you think that I know? Probably, you saw some of the scripts that I posted here on this forum and figured that I wrote them by myself, which is not really the case - many kind supporters here have given me their snippets of scripts and I was successfully using them in my scripts, but it doesn't mean that I fully knew the workings of their scripts.and you know how to set a property such as visible and call a method such as quit
- I have visited MSDN page quite a few times trying to create my own DllCall, but I found that a lot of things written there are absolutely out of the frame of my reference - I don't know what many of those things mean.Your probably need to learn more about using the MSDN as a reference...
My advice is learn more about using the documentation for the app your using COM on

No idea at all. Why do you think that I know?
Maybe you DO know, but you just don't know THAT you know it.
I started my AHK life, and programming in general, doing the same thing. 'Borrowing' snippets, being Frankenstein. I never learned anything that way, and caused more problems for myself than anything.
You have more ability than you give yourself credit for... now you just need to motivation to match.
DOM is not the end of the world. It is a structure, like 'folders'. You can find your favorite MP3 or picture, buried deep on your PC, no? You categorize and classify things, DOM is sort of like that.
Someone, can't remember off the top of my head who (sorry)... used the example of an office building. you want to find a pen. The state the city is in. The block the building is on within the city. The floor the office is on, the location of that office within the floor. Within the office is a desk, in the desk is a drawer. In the drawer has the pen.
The piece of data you need, is the pen... you just need to rationalize how to find it.

- Very interesting example. Thank you.Someone, can't remember off the top of my head who (sorry)... used the example of an office building. you want to find a pen. The state the city is in. The block the building is on within the city. The floor the office is on, the location of that office within the floor. Within the office is a desk, in the desk is a drawer. In the drawer has the pen

Someone, can't remember off the top of my head who (sorry)... used the example of an office building.
That was probably me:
Don't let objects confuse you too well, it's simply a matter of doing one thing in order to do another. Oversimplified example: Suppose you want to go visit your friend at their office, which is in a high rise downtown. To visit them first you need to get to where the buildings are (Application), then you need to get to the right building (Workbook), then you need to go to the right floor in that building (Worksheet), then you need to go down the right hall on that floor (Range), to finally get to their office (Cell).
For DOM (or HTML or DHTML or what have you), how objects work isn't quite as broad as how they work in Excel, but the same principles generally apply. For instance, if you wanted to access a cell in a table, you wouldn't expect to go through the links object to do it. That's why you only access cells through a rows collection, which is accessed through a table object. It's a matter of sorting and limiting how things are accessed.
And just to re-emphasize, Microsoft's HTML and DHTML Reference is an excellent resource to keep around for your own learning.
