array in gui dont work

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
havrepojken
Posts: 1
Joined: 28 Apr 2017, 08:08

array in gui dont work

28 Apr 2017, 08:30

Hi i cant get an array to work in my script. heres the code please help :)

Code: Select all

global save := []
save.1:="hej"

Gui,Add,Edit,x37 y39 w50 h21 vKeyArray left,Välj knapp att spara 
Gui,Add,Edit,x107 y40 w75 h21 vStringArray left,HotString
Gui,Add,Button,x39 y140 w43 h23 vsave Gsave,spara
Gui,Add,Button,x123 y145 w120 h23 vshowhotkeys gshow_hotkeys,Visa dina HotKeys
Gui,Show,w303 h188,snabb_kommandon


save:
{
	gui, submit, nohide

}

show_hotkeys:
{
	MsgBox,, save array , save.1
}
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: array in gui dont work

28 Apr 2017, 13:11

Add 'percent' symbol to force expression:

Code: Select all

show_hotkeys:
{
	MsgBox,, save array , % save.1
}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: RussF and 375 guests