Use value directly from an array

Get help with using AutoHotkey and its commands and hotkeys
radukn
Posts: 2
Joined: 20 Apr 2019, 02:34

Use value directly from an array

20 Apr 2019, 02:44

I have the array Sample. It's working something like this:

onevalue=Sample[1]
Menu, Something, Add, %onevalue%, MenuHandler

but I want to use the value from the array directly, with no intermediar variable.

Menu, Something, Add, Sample[1], MenuHandler
or
Menu, Something, Add, %Sample[1]%, MenuHandler

did not work. What should I do? Thanks!
Osprey
Posts: 453
Joined: 18 Nov 2017, 05:50

Re: Use value directly from an array

20 Apr 2019, 02:56

You want to do Menu, Something, Add, % Sample[1], MenuHandler. A % sign followed by a space allows you to insert expressions.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], DMDComposer, SOTE, swagfag and 208 guests