Sign in to follow this  
Followers 0
mobittu

Does Autoit3 support Map/Hash data structure?

6 posts in this topic

Hi all,

It seems that Autoit don't support Map/Hash mechnism, right? If I want to use such mechanism, how can I do, please help, thanks.

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
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)

Share this post


Link to post
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)

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!

Share this post


Link to post
Share on other sites

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!

I believe you need the .NET framework installed.

Share this post


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
Sign in to follow this  
Followers 0