Jump to content

Does Autoit3 support Map/Hash data structure?


Recommended Posts

Pick one..:whistle:

  • Implement them with a UDF (you should find several in the Script's forum)
  • Use a vbscript com object (collection or what MS call it these days).
  • Use the SQLite UDF and a in memmory db.
Link to comment
Share on other sites

its pretty easy if you use this:

; http://msdn2.microsoft.com/en-us/library/s....hashtable.aspx

$hash = ObjCreate("System.Collections.Hashtable")

$hash.add ("txt", "notepad.exe")

$hash.add ("bmp", "paint.exe")

$hash.add ("dib", "paint.exe")

$hash.add ("rtf", "wordpad.exe")

ConsoleWrite("For key = 'bmp', value = " & $hash ("bmp") & @CRLF)

ConsoleWrite("For key = 'rtf', value = " & $hash ("rtf") & @CRLF)

Link to comment
Share on other sites

  • 2 weeks later...

its pretty easy if you use this:

; http://msdn2.microsoft.com/en-us/library/s....hashtable.aspx

$hash = ObjCreate("System.Collections.Hashtable")

$hash.add ("txt", "notepad.exe")

$hash.add ("bmp", "paint.exe")

$hash.add ("dib", "paint.exe")

$hash.add ("rtf", "wordpad.exe")

ConsoleWrite("For key = 'bmp', value = " & $hash ("bmp") & @CRLF)

ConsoleWrite("For key = 'rtf', value = " & $hash ("rtf") & @CRLF)

When trying to run the above code snippet, it will fail at ObjCreate, so I wonder if any environment need to be set up first?

Expecting your reply and thanks!

Link to comment
Share on other sites

  • 4 months later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...