Jump to content

how to use ObjCreate with .item in the script


Recommended Posts

Hi All,

I have spent lot of time on internet to know that how do we use ObjCreate and  .item in our autoit scripts. but no such productive information is found related to both

I have some code which i want to understand

$oSection = ObjCreate('Scripting.Dictionary')
$Section.Add("Action","")
$Section.Add("ConfrmAction","")
$Section.Add("Value","")
$Section.Add("EmailID","")



$Section.Item('Action') = $sAction
$Section.Item('ConfrmAction') = True
$Section.Item('Value') = $sValue
$Section.Item('EmailID') = ''

Well this code might be unclear to you, but the only thing which i want to understand that

1. what is the use of objCreate

2. what .item is doing in the code above.

Beside that if you can please elaborate the concept of using objCreate and .item it would be very helpful . Because in the help file objCreate is not very much of helpful.

Thanks

Link to post
Share on other sites

ObjCreate creates a reference to a COM object so you can access the properties and methods.

Looks like item returns a single object by name out of a collection of items.

The description of the dictionary object can be found here.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...