AutoHotkey Community

It is currently May 27th, 2012, 12:38 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: December 29th, 2010, 1:29 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
tinku99 wrote:
@HotkeyIt:
1. can you provide the type library for autohotkey com interface as well ?

Is that what you mean? ComServer.idl
tinku99 wrote:
2. Is it possible to return safearrays (ComObjArray) using ahkgetvar(varname) ?
So we can do something like this from python:
Code:
code = '''
arr := ComObjArray(VT_VARIANT:=12, 3)
arr[0] := "Auto"
arr[1] := "Hot"
arr[2] := "key"
'''
dll.ahkExec(code)
dll.ahkgetvar("arr")

You can do it using AutoHotkey_H, not sure how to do in phyton :?
Code:
code=
(
#Persistent
arr := ComObjArray(VT_VARIANT:=12, 3)
arr[0] := "Auto"
arr[1] := "Hot"
arr[2] := "key"
)
dll:=AhkDllThread("X:\AutoHotkey.dll")
dll.ahktextdll(code)
Sleep 100
Alias(arr,dll.ahkgetvar("arr",1))
MsgBox % arr.0 arr.1 arr.2

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
PostPosted: December 29th, 2010, 5:28 pm 
Offline

Joined: August 3rd, 2007, 8:01 am
Posts: 555
Location: Houston, TX
HotKeyIt wrote:
tinku99 wrote:
@HotkeyIt:
1. can you provide the type library for autohotkey com interface as well ?

Is that what you mean? ComServer.idl
Yes. Thanks.

For safearray I guess I can just return a pointer to the data in the array... I was thinking of returning something like what dispatchobj returns. So safearrays could be returned by value instead of by reference. By value avoids problems with memory management...


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: chaosad, jrav and 21 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