AutoHotkey Community

It is currently May 27th, 2012, 3:27 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 646 posts ]  Go to page Previous  1 ... 37, 38, 39, 40, 41, 42, 43, 44  Next
Author Message
 Post subject:
PostPosted: June 1st, 2010, 5:12 pm 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
Use AHK_L/COM_L.
http://www.autohotkey.com/forum/topic22923-429.html


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 1st, 2010, 5:21 pm 
Sean wrote:


So, what I've been using is outdated? :oops:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 1st, 2010, 5:46 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 8th, 2010, 12:49 pm 
Offline

Joined: February 11th, 2007, 4:10 pm
Posts: 185
COM_CreateObject always return null in COM_L.
Plz check it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 8th, 2010, 1:04 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
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.

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 8th, 2010, 1:46 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
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.

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 8th, 2010, 3:20 pm 
Offline

Joined: February 11th, 2007, 4:10 pm
Posts: 185
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 8th, 2010, 6:27 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
Correct, if you want to check if the variable COM_CreateObject("ADODB.Connection") was saved to represents an object use the IsObject() function.

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 8th, 2010, 6:38 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
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

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 15th, 2010, 10:51 am 
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?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 15th, 2010, 11:38 am 
Offline
User avatar

Joined: May 10th, 2007, 10:54 am
Posts: 649
Location: .switzerland
COM is not a Library in the normal sense - COM is an interface to make Programms/Librarys compatible to other Languages.

http://en.wikipedia.org/wiki/Component_Object_Model

_________________
http://securityvision.ch
AHK 2D GAME ENGINE


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 15th, 2010, 11:54 am 
IsNull wrote:
COM is not a Library in the normal sense - COM is an interface to make Programms/Librarys compatible to other Languages.

http://en.wikipedia.org/wiki/Component_Object_Model


So, what is it capable to improve in AHK? How could I benefit with COM?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 15th, 2010, 12:26 pm 
Offline
User avatar

Joined: May 10th, 2007, 10:54 am
Posts: 649
Location: .switzerland
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 15th, 2010, 1:02 pm 
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 ( :D ) 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. :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 16th, 2010, 1:12 pm 
Offline

Joined: December 29th, 2009, 12:48 am
Posts: 43
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 ( :D ) 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 :D, 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 :D


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 646 posts ]  Go to page Previous  1 ... 37, 38, 39, 40, 41, 42, 43, 44  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Stigg, xXDarknessXx and 13 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group