| View previous topic :: View next topic |
| Author |
Message |
Sean
Joined: 12 Feb 2007 Posts: 2462
|
|
| Back to top |
|
 |
ApertureLabs Guest
|
Posted: Tue Jun 01, 2010 4:21 pm Post subject: |
|
|
So, what I've been using is outdated?  |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Jun 01, 2010 4:46 pm Post subject: |
|
|
COM is now built into AHK:
http://www.autohotkey.com/forum/topic58237.html
However, this native COM doesn't support named parameters, but, it allows up to 50 parameters, which is practically no limit. |
|
| Back to top |
|
 |
hughman
Joined: 11 Feb 2007 Posts: 166
|
Posted: Tue Jun 08, 2010 11:49 am Post subject: |
|
|
COM_CreateObject always return null in COM_L.
Plz check it. |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Tue Jun 08, 2010 12:04 pm Post subject: |
|
|
there are 2 versions of COM one for the vanilla ahk and one for ahk_l. Please ensure you have the right version with the right version. the only way create object returns 0 or blank is if your ProgID is invalid or not properly registered. _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5044 Location: the tunnel(?=light)
|
Posted: Tue Jun 08, 2010 12:46 pm Post subject: |
|
|
| hughman wrote: | COM_CreateObject always return null in COM_L.
Plz check it. |
Did you check the variable with IsObject() to verify that no object has been retrieved? A variable which houses an object will return null if you check it like a normal variable. _________________ Try Quick Search for Autohotkey or see the tutorial for newbies. |
|
| Back to top |
|
 |
hughman
Joined: 11 Feb 2007 Posts: 166
|
Posted: Tue Jun 08, 2010 2:20 pm Post subject: |
|
|
| sinkfaze wrote: |
Did you check the variable with IsObject() to verify that no object has been retrieved? A variable which houses an object will return null if you check it like a normal variable. |
So COM_CreateObject("ADODB.Connection") will return an object in COM for AHK_L other than a handle as in COM for mainstream AHK? |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5044 Location: the tunnel(?=light)
|
|
| Back to top |
|
 |
jethrow
Joined: 24 May 2009 Posts: 1907 Location: Iowa, USA
|
Posted: Tue Jun 08, 2010 5:38 pm Post subject: |
|
|
For AHKL & COM_L: | Code: | if ptr := COM_CreateObject("ADODB.Connection") ; doesn't return null
MsgBox, % COM_Unwrap( ptr ) ; shows pointer address/handle
. "`n" IsObject( ptr ) ; shows 1 |
_________________
- in case I forgot to smile
Basic Webpage Controls
COM Object Reference |
|
| Back to top |
|
 |
ddk`notlogdin Guest
|
Posted: Tue Jun 15, 2010 9:51 am Post subject: |
|
|
Hi, I've been wondering for a long time for using this library, but I havent found any documentation about the commands Could someone please help me started? |
|
| Back to top |
|
 |
IsNull
Joined: 10 May 2007 Posts: 593 Location: .switzerland
|
|
| Back to top |
|
 |
ddk`notlogdin Guest
|
Posted: Tue Jun 15, 2010 10:54 am Post subject: |
|
|
So, what is it capable to improve in AHK? How could I benefit with COM? |
|
| Back to top |
|
 |
IsNull
Joined: 10 May 2007 Posts: 593 Location: .switzerland
|
Posted: Tue Jun 15, 2010 11:26 am Post subject: |
|
|
You can easily control Programs which are COM compatible. For Example Outlook - you can use COM to let Outlook do anything you want.
All the Office Programs have COM included and many others too. _________________ http://securityvision.ch
AHK 2D GAME ENGINE |
|
| Back to top |
|
 |
ddk`notlogdin Guest
|
Posted: Tue Jun 15, 2010 12:02 pm Post subject: |
|
|
I see. I've been reading the tutorial about the basic webpage controls with COM and with searching I've also found iWebBrowser2 Learner. The iWebBrowser2 Learner seems to be pretty, I was impressed how detailed information I got about the values and the controls (name, id & stuff..).
If I've understood right, I could make highly automated softwares for webapplications, like client-based facebook ( ) or maybe a bot for browserbased game, could I?
Well, maybe some practising first. May I request a sample script which could messagebox current IE windows current controls details via hotkey. Just like the iWebBrowser2 Learner does, but into GUI. I guess I could make it myself, reading from iWebBrowser2 Learner's source, but it's pretty hard to understand (as far as I've read it..).
Please, don't understand me wrong. I hope I dont bother you guys, too much and I post to right thread.  |
|
| Back to top |
|
 |
ddk
Joined: 28 Dec 2009 Posts: 43
|
Posted: Wed Jun 16, 2010 12:12 pm Post subject: |
|
|
| ddk`notlogdin wrote: | I see. I've been reading the tutorial about the basic webpage controls with COM and with searching I've also found iWebBrowser2 Learner. The iWebBrowser2 Learner seems to be pretty, I was impressed how detailed information I got about the values and the controls (name, id & stuff..).
If I've understood right, I could make highly automated softwares for webapplications, like client-based facebook ( ) or maybe a bot for browserbased game, could I?
Well, maybe some practising first. May I request a sample script which could messagebox current IE windows current controls details via hotkey. Just like the iWebBrowser2 Learner does, but into GUI. I guess I could make it myself, reading from iWebBrowser2 Learner's source, but it's pretty hard to understand (as far as I've read it..).
Please, don't understand me wrong. I hope I dont bother you guys, too much and I post to right thread.  |
Hey,
I think, I just did it.. somehow , just need help to get the very current controls value. Eh, my code:
| Code: | r::
COM_CoInitialize()
pweb := GetWebBrowser()
MsgBox % COM_Invoke(pweb, "document.getElementsByTagName[input].item[3].value")
COM_Release(pweb)
COM_CoUninitialize()
Return |
I know it's like 666% of copypaste, but however, just testing  |
|
| Back to top |
|
 |
|