| Author |
Message |
Forum: Scripts Topic: COM Event Handler |
| tfcahm |
|
Posted: September 6th, 2007, 9:14 pm
|
|
Replies: 61 Views: 13264
|
| I added to AtlAx.ahk AtlAxCreateControl(hWnd, Name, Version = "") which is actually the wrapper of AtlAxCreateControlEx. Works perfectly! Was going to post my code but I see my problem now with AtlAxCreateControlEx, I didn't use Ansi4Unicode. Thanks for the code. BTW, compare it w... |
|
 |
Forum: Scripts Topic: COM Event Handler |
| tfcahm |
|
Posted: September 5th, 2007, 4:19 pm
|
|
Replies: 61 Views: 13264
|
| I merged CoEvent.ahk into CoHelper.ahk. Nice! You might want to add something like this to AtlAx.ahk. It is useful for controls that will not initialize using CreateObject() followed by AtlAxAttachControl(). AtlAxCreateControl(hWnd, sName, Version = "") { Ansi2Unicode(sNa... |
|
 |
Forum: Scripts Topic: COM Helper |
| tfcahm |
|
Posted: July 26th, 2007, 3:05 pm
|
|
Replies: 155 Views: 44688
|
Sean wrote: _TEMP_VT_BYREF_%A_Index% is dynamically generated global variables inside Invoke_(). I completely missed that...working too late. Thanks.
Sean wrote: Do you know of an app which uses other than bstr as ByRef? Nero has some ByRef as Variants. I haven't tried it. |
|
 |
Forum: Scripts Topic: COM Helper |
| tfcahm |
|
Posted: July 26th, 2007, 7:37 am
|
|
Replies: 155 Views: 44688
|
| OK, I implemented VT_BYREF too in Invoke_(). Wow...unexpected. Thanks! It runs perfectly as you wrote it above, but strangely it does not work properly as a function. The values for _TEMP_VT_BYREF_n are blank. The GenerateHTML method in BookCAT runs properly and returns the correct nResult, so the ... |
|
 |
Forum: Scripts Topic: ADO COM - Database Query |
| tfcahm |
|
Posted: July 26th, 2007, 12:13 am
|
|
Replies: 131 Views: 35931
|
| Thanks for the script. I like th part of writing/reading binary files to DB. Glad you found it useful. I remeber there is a way of compressing MDB(access file). Do you know what it is(maybe method name)? Please refer to http://support.microsoft.com/kb/230501 #Include CoHelper.ahk CoInitialize(&... |
|
 |
Forum: Scripts Topic: ADO COM - Database Query |
| tfcahm |
|
Posted: July 25th, 2007, 4:43 pm
|
|
Replies: 131 Views: 35931
|
| Here's an example script that uses ADO COM to do some Access database manipulations. The script by itself does not do anything particularly useful, but it does demonstrate several basic operations. Before running the script you may need to adjust the three filename values at the top to match your en... |
|
 |
Forum: Scripts Topic: ADO COM - Database Query |
| tfcahm |
|
Posted: July 25th, 2007, 9:25 am
|
|
Replies: 131 Views: 35931
|
| Sorry for the delay in posting the promised script. I ran into a problem with the most recent CoHelper.ahk (edit 33). The change from "Int64" to "Uchar" to this statement of Invoke_() NumPut(type%A_Index%,varg,16*(nParams-A_Index),"Uchar") causes this li... |
|
 |
Forum: Scripts Topic: ADO COM - Database Query |
| tfcahm |
|
Posted: July 24th, 2007, 11:06 pm
|
|
Replies: 131 Views: 35931
|
| Good to know, and don't forget to release the array after finished: Thanks for that. Should Release() be called on every type IDispatch? For example: ... Invoke_(pmstream, "Write", 8209,pSafearray:=Invoke(pfld:=Invoke(pflds:=Invoke(prs, "Fields"), "Item&... |
|
 |
Forum: Scripts Topic: ADO COM - Database Query |
| tfcahm |
|
Posted: July 24th, 2007, 6:20 am
|
|
Replies: 131 Views: 35931
|
| As a temporary workaround, replace the following part in varResult NumGet(varResult,0,"Ushort")=8||NumGet(varResult,0,"Ushort")<>9&& with NumGet(varResult,0,"Ushort")=8||NumGet(varResult,0,"Ushort")<>9&&NumGet... |
|
 |
Forum: Scripts Topic: ADO COM - Database Query |
| tfcahm |
|
Posted: July 24th, 2007, 5:13 am
|
|
Replies: 131 Views: 35931
|
| 8209 = 0x2011 is VT_ARRAY | VT_UI1, i.e., an array of bytes. So, try after replacing 12 with 8209. An array of bytes certainly makes sense, but 8209 gave the same result. If it still doesn't work, I'd like to know what value was returned for Invoke(Invoke(Invoke(prs, "Fields"), "Item... |
|
 |
Forum: Scripts Topic: ADO COM - Database Query |
| tfcahm |
|
Posted: July 24th, 2007, 3:20 am
|
|
Replies: 131 Views: 35931
|
| Why did you use 12 as the type? 12 is VT_VARIANT, so, I suppose it was wrong here unless the data field is encapsulated in a variant. I tried them all. VT_VARIANT was the last one left in there before I posted. Need to do some debug: go to the near the end of Invoke(), add MsgBox, % NumGet(varResul... |
|
 |
Forum: Scripts Topic: ADO COM - Database Query |
| tfcahm |
|
Posted: July 24th, 2007, 1:15 am
|
|
Replies: 131 Views: 35931
|
| I suppose a way with the least risk would be that if a parameter is recognized as an integer don't do type coercion into bstring but do specify it as one of the integer types. It would also reduce substantially further the need of Invoke_(). One problem with it, however, is what integer type should... |
|
 |
Forum: Scripts Topic: ADO COM - Database Query |
| tfcahm |
|
Posted: July 23rd, 2007, 6:02 pm
|
|
Replies: 131 Views: 35931
|
| BTW, what do you guys think about omitting member function name "Item" in the index parameter cases? Was it a good or a bad decision? The only problem I have with it will be remembering to use it six months from now. It's easy to remember when something doesn't work with Invoke() to just ... |
|
 |
Forum: Scripts Topic: ADO COM - Database Query |
| tfcahm |
|
Posted: July 23rd, 2007, 2:43 pm
|
|
Replies: 131 Views: 35931
|
daonlyfreez wrote: Your example with the updated CoHelper.ahk doesn't work for me (Excel 2000 v. 9.0.6926 SP-3) What does it do, or not do? I run the same version of Excel on XPSP2 and it works fine here. |
|
 |
Forum: Scripts Topic: Explorer Windows Manipulations |
| tfcahm |
|
Posted: July 23rd, 2007, 5:36 am
|
|
Replies: 99 Views: 25744
|
| One thing which might affect is: what version of IE installed? IE7 is installed on my machine. Right you are! I never upgraded to IE7. Just did so and the previous script using IPersistFolder3 and IShellFolder2 started working. For both interfaces MSDN refers only to the minimum version of Shell32.... |
|
 |
| Sort by: |