This is a rebuild of the original COM Object Reference thread, minus the tangential discussions. Please keep an eye out for any potential code improvements to keep this repository up to date with the latest AHK changes.

jethrow's original opening post:

Purpose: to create a basic reference for commonly used COM objects.

AutoHotkey now supports COM natively (thank you Lexikos, Sean, & fincs ). This doesn't eliminate the COM Standard Library, but it does add quite a bit of functionality to AutoHotkey. However, if users don't know or understand any COM objects, this Native COM support is less appealing/useful. Therefore, I am creating this thread as somewhat of a basic COM object reference. Forum members can add a COM object "profile", and I will link it to the original post. Questions are also welcome. Here is the suggested BBCode for the COM obj profile:

* Note MSDN says Windows 2000 or later required, but I've seen some other cases where this wasn't accurate; maybe they say that since they really don't support older versions of Windows. Furthermore, AutoHotkey_L requires Windows 2000 or later.

; Vertex contains a list of x\y-coordinates for use with AddVertex, DrawPolyLine and FreeVertex.; Of course this list can be created dynamically in practical use.Vertex :="0,240|25,240|29,210|42,269|56,225|62,240|117,240|137,190|158,269|167,217|170,240|233,240|"."248,179|267,270|281,218|288,240|354,240|372,176|390,259|402,220|408,240|458,240|487,118|530,319|552,185|"."565,240|600,240"

COM Object: ScriptControlPurpose: Dynamically execute VBScript or JScriptNOTE: Many VBScript & JScript scripts can be translated to AHK, rather than using the ScriptControl object. (see the last example)System Requirements: 32bit AHK (see here for 64bit compatability)Documentation Link:Using the ScriptControlCode Examples:

COM Object: Microsoft OutlookPurpose: Read and Write Appointments from calendarSystem Requirements: Microsoft Outlook: tested with 2010 and 2007Documentation:http://support.microsoft.com/kb/220595Other Links: following is a translation of this vb.net script.

Several of the methods/properties for the Shell.Application object are simple to do with AHK's commands - such as showing certain Dialog boxes or Minimizing all windows. However, here are a few examples for moving windows around:

xmldata =(<?xml version="1.0"?><compactdiscs><compactdisc><artist type="individual">Frank Sinatra</artist><title numberoftracks="4">In The Wee Small Hours</title><tracks><track>In The Wee Small Hours</track><track>Mood Indigo</track><track>Glad To Be Unhappy</track><track>I Get Along Without You Very Well</track></tracks><price>$12.99</price></compactdisc><compactdisc><artist type="band">The Offspring</artist><title numberoftracks="5">Americana</title><tracks><track>Welcome</track><track>Have You Ever</track><track>Staring At The Sun</track><track>Pretty Fly (For A White Guy)</track></tracks><price>$12.99</price></compactdisc></compactdiscs>)

tryoWorkbook := Excel_Get().ActiveWorkbook ; try to access active Workbook objectcatchreturn; case when Excel doesn't exist, or it exists but there is no active workbook. Just Return or Exit or ExitApp.

; if there is active workbook, code continues execution...oWorkbook.ActiveSheet.Range("B2").Value :="B2"; set value of B2 cell in active sheet to "B2"