COM Object Reference

Post a reply


In an effort to prevent automatic submissions, we require that you type the text displayed into the field underneath.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: COM Object Reference

Re: COM Object Reference

Post by guesto » 10 Apr 2016, 14:32

sinkfaze wrote:COM Object: ImageMagickObject COM+ Object
Purpose: ImageMagick® is a software suite to create, edit, and compose bitmap images.
System Requirements: ImageMagickObject COM+ Object
Documentation Link:
Other Links: http://www.imagemagick.org/script/binary-releases.php#windows
Basic Code Example:


I have installed ImageMagick with the COM option in the installer (the checkbox about VBS something, don't remember exactly). I can run the ImageMagickObject .vbs test script that comes with ImageMagick. But I can't get it to work in AHK. The sample script generated "Invalid class string" error on this line

Code: [Select all]GeSHi © Codebox Plus

oI :=	ComObjCreate("ImageMagickObject.MagickImage.1")

Re: COM Object Reference

Post by Joe Glines » 18 Jul 2015, 11:09

Joetazz wrote:Any idea what the maximum size that can be stored in this? I read through some of the documentation however I was playing around and was storing a lot more characters than what I saw in the documentation.


I reached a max of 524,285 charchters on my 64 bit version of Windows 7

Re: COM Object Reference

Post by Joe Glines » 17 Jul 2015, 19:08

Any idea what the maximum size that can be stored in this? I read through some of the documentation however I was playing around and was storing a lot more characters than what I saw in the documentation.

sinkfaze wrote:COM Object: WScript.Shell
Purpose: Exchange variables between scripts
System Requirements: General
Documentation Link: WshEnvironment Object
Other Links: Environment Variables

Re: COM Object Reference

Post by joedf » 11 Jan 2015, 13:15

Hello asynchronous downloads!

Re: COM Object Reference

Post by lexikos » 11 Jan 2015, 03:20

COM Object: Msxml2.XMLHTTP, a.k.a. XmlHttpRequest object.
Purpose: Making HTTP requests. Unlike UrlDownloadToFile, it doesn't require managing a temporary file. Unlike WinHttpRequest, it can notify us when the request is complete.
System Requirements: IE7+ and AutoHotkey v1.1.17+ to use onreadystatechange.
Documentation Link: XMLHttpRequest object
Basic Code Example:

Code: [Select all] [Expand]GeSHi © Codebox Plus


I started looking into this because using WinHttpRequest in synchronous mode causes the script to hang until the request completes, but it turns out you can get around that by opening the request in asynchronous mode and calling WinHttpRequest.WaitForResponse(). The advantages of XMLHTTP are that the API is well known to many web developers, and the events (like onreadystatechange) are compatible with AutoHotkey.

Re: COM Object Reference

Post by GeekDude » 07 Nov 2014, 08:32

Wouldn't this be better suited to a GitHub repository or something along those lines? Perhaps under the AhkScript group?

Re: COM Object Reference

Post by kon » 06 Nov 2014, 18:42

COM Object: Publisher.Application
Purpose: Microsoft Publisher is an entry-level desktop publishing application from Microsoft, differing from Microsoft Word in that the emphasis is placed on page layout and design rather than text composition and proofing.
System Requirements: Microsoft Office Publisher
Documentation Link: Object model reference (Publisher 2013 developer reference)
Other Links: Save the active document as .jpg
Basic Code Example: This example will open Publisher, create a new document, draw a curve and a line, add some text, and SaveAs with two different formats (.jpg and .pub).

Code: [Select all] [Expand]GeSHi © Codebox Plus

Re: COM Object Reference

Post by kon » 15 Jul 2014, 14:50

A remake of the index.
Index

Re: COM Object Reference

Post by Menixator » 03 Oct 2013, 04:13

Re: COM Object Reference

Post by joedf » 03 Oct 2013, 04:09

Interesting..

Re: COM Object Reference

Post by Hamlet » 03 Oct 2013, 03:38

sinkfaze wrote:COM Object: VBSript.RegExp
Purpose: VBS Regular Expressions
System Requirements: General
Documentation Link: Regular Expression Object Properties and Methods

Personally, I'd like to recommend the following link.

Microsoft Beefs Up VBScript with Regular Expressions
http://msdn.microsoft.com/en-us/library/ms974570.aspx

Code: [Select all] [Expand]GeSHi © Codebox Plus

Re: COM Object Reference

Post by sinkfaze » 02 Oct 2013, 20:53

COM Object: VBSript.RegExp
Purpose: VBS Regular Expressions
System Requirements: General
Documentation Link: Regular Expression Object Properties and Methods, Microsoft Beefs Up VBScript with Regular Expressions
Basic Code Example: Global Regex match & replace

Code: [Select all] [Expand]GeSHi © Codebox Plus

Re: COM Object Reference

Post by sinkfaze » 02 Oct 2013, 20:50

COM Objects: msxml2.DOMDocument.6.0, msxml2.SAXXMLReader.6.0, msxml2.MXXMLWriter.6.0
Purpose: Format XML output
System Requirements: Windows XP SP3+, Microsoft Core XML Services (MSXML) 6.0
Documentation Link: XML DOM Reference
Other Links: Use MXXMLWriter
Basic Code Example:

Code: [Select all] [Expand]GeSHi © Codebox Plus



Although the flexibility of the XML writer is limited, the output is correctly parsed, formatted, and encoded.

Re: COM Object Reference

Post by sinkfaze » 02 Oct 2013, 20:46

COM Object: Outlook
Purpose: Demonstrate sending an email with attachments using Outlook
System Requirements: Windows 2000 or higher
Documentation Link: Outlook Object Model
Other Links: CreateItem Method, OlItemType constants, Attachments Collection, Recipients Collection
Basic Code Example: The following code copies the files from he A:\ drive to a backup folder, then emails them as attachments to the specified recipient.

Code: [Select all] [Expand]GeSHi © Codebox Plus

Re: COM Object Reference

Post by sinkfaze » 02 Oct 2013, 20:41

COM Object: ActiveX Data Objects (ADODB.Connection and others)
Purpose: Work with a variety of databases, such as CSV, Excel xls, Access mdb and so on.
System Requirements: General
Documentation Link: http://msdn.microsoft.com/en-us/library/windows/desktop/ms675532
Basic Code Example:

Code: [Select all] [Expand]GeSHi © Codebox Plus

Re: COM Object Reference

Post by sinkfaze » 02 Oct 2013, 20:36

COM Object: Outlook.Application
Purpose: Personal Information Manager
System Requirements: MS Outlook (MS Office)
Documentation Link: Application Object
Other Links: Session Property, Folders Collection, MAPIFolder Object, MailItem Object
Basic Code Example: This example will access the Outlook Folders, and then each item in the Drafts Folder, assuming Outlook is already open.

Code: [Select all] [Expand]GeSHi © Codebox Plus

Re: COM Object Reference

Post by sinkfaze » 02 Oct 2013, 20:31

COM Object: Shell.Application [Folder & FolderItems object]
Purpose: Extract Files From/Unzip a Zip Directory
System Requirements: General
Documentation Link: Shell Object, Folder Object, FolderItems
Other Links: CopyHere Method
Code Example:

Code: [Select all] [Expand]GeSHi © Codebox Plus

Re: COM Object Reference

Post by sinkfaze » 02 Oct 2013, 20:28

COM Object: Excel.Sheet
Purpose: Hold MS Excel Data - represents a MS Excel workbook
System Requirements: MS Excel
Documentation Link: WorkBook Object
Other Links: Excel Constants, Sort Method
Code Example:

Code: [Select all] [Expand]GeSHi © Codebox Plus



Note - the Excel.Sheet object will open in the Active Excel Process (accessed by ComObjActive) - or will create a new Excel Process - and it will close when the pointer is released.

Re: COM Object Reference

Post by sinkfaze » 02 Oct 2013, 20:25

COM Object: CAPICOM Series
Purpose: digitally sign data, sign code, verify digital signatures, envelop data for privacy, hash data, encrypt/decrypt data and more.
System Requirements: 32-bit OS, for more details, please see MSDN
Documentation Link: CAPICOM Reference
Other Links:Platform SDK Redistributable: CAPICOM
Basic Code Example: First require to install capicom.dll from microsoft's site above.

Code: [Select all] [Expand]GeSHi © Codebox Plus

Re: COM Object Reference

Post by sinkfaze » 02 Oct 2013, 20:20

COM Object: Outlook.Application
Purpose: Create various new items in Outlook
System Requirements: Windows 2000 or higher
Documentation Link: Outlook 2003 Visual Basic Reference
Other Links: CreateItem Method, GetInspector Property, OlItemType constants
Basic Code Example: The entire process of creating a new Outlook item can be executed in a single line using one of the OlItemType constants shown in the below code (and in the above link) with the CreateItem method. This method is valuable if you have problems opening new items using the command line switches.

Code: [Select all] [Expand]GeSHi © Codebox Plus



And here's a sample ListBox GUI that will allow you to select and create a new instance of any of the applicable Outlook items:

Code: [Select all] [Expand]GeSHi © Codebox Plus


Top