| Author |
Message |
Topic: Microsoft.XMLDOM |
amokoura
Replies: 12
Views: 2181
|
Forum: Scripts & Functions Posted: Tue Jan 06, 2009 8:57 am Subject: Microsoft.XMLDOM |
It's amazing, thanks!
I tried to use xpath function: translate() but received error: "Unknown method".
According to
XML_Open( pDoc, pAsync=false, pShowErr=true ){
... |
Topic: COM Standard Library |
amokoura
Replies: 555
Views: 94410
|
Forum: Scripts & Functions Posted: Fri Nov 07, 2008 1:19 pm Subject: COM Standard Library |
COM_Invoke_(obj, "Method", 8, value)8 is VT_BSTR, which indicates a COM string value.
Thanks, that works like a charm! |
Topic: COM Standard Library |
amokoura
Replies: 555
Views: 94410
|
Forum: Scripts & Functions Posted: Fri Nov 07, 2008 9:01 am Subject: Re: com_invoke with zero beginning value |
"0" vs 0
Thanks, but didn't help. Here's how I tested:
COM_InvokeDeep(oExcel, "ActiveSheet.Range[A1].Value", "012354")
It sets the cell value to &quo ... |
Topic: COM Standard Library |
amokoura
Replies: 555
Views: 94410
|
Forum: Scripts & Functions Posted: Thu Nov 06, 2008 12:14 pm Subject: com_invoke with zero beginning value |
How can i pass a number that has zero in the beginning to com_invoke?
So the number should probably be passed as text. Invoke() thinks it's a number so it strips the zero away. |
Topic: COM Standard Library |
amokoura
Replies: 555
Views: 94410
|
Forum: Scripts & Functions Posted: Fri Oct 10, 2008 1:30 pm Subject: COM Standard Library |
...there is no need for errorlevel as far as im concerned
You told earlier you're using ADO. Aren't the connection/query calls unreliable enough to require some error checking? |
Topic: COM_InvokeDeep - climb a COM tree more easily |
amokoura
Replies: 10
Views: 4740
|
Forum: Scripts & Functions Posted: Fri Oct 10, 2008 11:30 am Subject: COM_InvokeDeep - climb a COM tree more easily |
| The standard library should have this included, very nice! |
Topic: COM Standard Library |
amokoura
Replies: 555
Views: 94410
|
Forum: Scripts & Functions Posted: Fri Oct 10, 2008 11:28 am Subject: Errorlevel |
I've used COM lib with errorlevels and experiences are quite positive.
I recommend these additions:
- COM_Invoke resets ErrorLevel to zero
- on COM_Error, set ErrorLevel to 1
Just couple lines ... |
Topic: COM Standard Library |
amokoura
Replies: 555
Views: 94410
|
Forum: Scripts & Functions Posted: Mon Oct 06, 2008 9:43 pm Subject: COM Standard Library |
...
so you can tweak it to your need in your custom build.
...
I often got the feeling that an user was even unaware of who produced the error MsgBox, AHK itself or COM.ahk.
Using complex COM is a ... |
Topic: COM Standard Library |
amokoura
Replies: 555
Views: 94410
|
Forum: Scripts & Functions Posted: Mon Oct 06, 2008 1:30 pm Subject: Re: Debugging |
After every unstable invoke call COM_IsError() could be called and process interrupted on failure.
You can use extended MsgBox syntax and IfMsgBox for that.
Sometimes I don't want to show a msgbox ... |
Topic: COM Standard Library |
amokoura
Replies: 555
Views: 94410
|
Forum: Scripts & Functions Posted: Mon Oct 06, 2008 11:26 am Subject: Debugging |
POST UPDATE: Now I ended up using plain ErrorLevel variable. It's quite easy to implement inside COM lib.
In the main script:
COM_Invoke(oObject,"SomeMethod")
if ErrorLevel
Ret ... |
Topic: COM Standard Library |
amokoura
Replies: 555
Views: 94410
|
Forum: Scripts & Functions Posted: Mon Oct 06, 2008 7:05 am Subject: COM Standard Library |
Now the variable COM_VT is Global in COM_Invoke()/COM_Invoke_(), which is the VT value of the result of COM_Invoke()/COM_Invoke_().
Thank you for a very rapid reply. You are the true AHK Messiah.
He ... |
Topic: COM Standard Library |
amokoura
Replies: 555
Views: 94410
|
Forum: Scripts & Functions Posted: Fri Oct 03, 2008 3:04 pm Subject: COM Standard Library |
I think thats pretty unique i for one wouldnt mind it being added and i am a heavy user at least for ADO and IE purposes
In that case, I may make it Global after renaming vt to COM_VT.
Any other opi ... |
Topic: COM Standard Library |
amokoura
Replies: 555
Views: 94410
|
Forum: Scripts & Functions Posted: Thu Oct 02, 2008 6:44 pm Subject: COM Standard Library |
What do you want to get in case of NULL value? Currently the behavior for VT_NULL is undefined
Thanks for reply. It's nice to hear the reason because I had really hard debuggings without a solution ... |
Topic: COM Standard Library |
amokoura
Replies: 555
Views: 94410
|
Forum: Scripts & Functions Posted: Thu Oct 02, 2008 1:06 pm Subject: Nulls |
I found a funny problem: retrieving null values from database.
I used ADO objects and just a traditional SELECT. I retrieved the value this way:
vValue := COM_Invoke(COM_Invoke(oRecord ... |
Topic: COM Standard Library |
amokoura
Replies: 555
Views: 94410
|
Forum: Scripts & Functions Posted: Tue Sep 02, 2008 3:32 pm Subject: Nothing value |
Is it possible to have a "Nothing" value? As in VB's Nothing.
ADO Recordset's ActiveConnection property must be set to Nothing in a certain situation.
So:
COM_Invoke(objRecordset, &qu ... |
| |