How to reset an array

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
songdg
Posts: 569
Joined: 04 Oct 2017, 20:04

How to reset an array

24 Nov 2017, 02:01

arr := ComObjArray(VT_VARIANT:=12, 7),I want to reset the array to the default null.
User avatar
Micromegas
Posts: 260
Joined: 28 Apr 2015, 23:02
Location: Germany

Re: How to reset an array

25 Nov 2017, 20:53

Have you looked at ComObjArray()? The first example there has a loop accessing all elements, which you can use as a model, giving the following:

Code: Select all

Loop % arr.MaxIndex() + 1
   arr[A_Index-1] := VT_NULL 
But I'm not sure whether null is the default; where did you get that information?
User avatar
Delta Pythagorean
Posts: 627
Joined: 13 Feb 2017, 13:44
Location: Somewhere in the US
Contact:

Re: How to reset an array

25 Nov 2017, 21:47

Arr := "" Done

[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat


Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: filipemb, Joey5 and 168 guests