Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- ; #Warn ; Enable warnings to assist with detecting common errors.
- #SingleInstance, force
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- peopleList := [{person: "test", work: "650", mob: "800"},{person: "Two", work: "700", mob: "900"}]
- ; peopleList.Push({person: "Two", work: "700", mob: "900"})
- Gui, Add, Text, , % "plr length" . peopleList.GetCapacity()
- Gui, Add, Text, , % "person 1 =" . peopleList[1].person
- GUI, Add, Text, , Name:
- Gui, Add, Edit, vEPerson Uppercase, ; force CASE so easier sanitize data
- GUI, Add, Text, , Work:
- Gui, Add, Edit, vEWork Number,
- GUI, Add, Text, , Mob:
- Gui, Add, Edit, vEMob Number,
- Gui, Add, Button, gAddPerson Default, Add
- Gui, Add, Button, gOpenPeopleTable vOpenPeopleTable, People table
- Gui, Show, x467 y200 h399 w499, Shows first gui
- Gui, SecondWin:Default
- Gui, SecondWin:Add, ListView, vDbView, Person|work|mob
- For index, item in peopleList
- {
- pn := item.person
- pb := item.work
- ps := item.mob
- Gui, Add, Text, , % index . item.person
- LV_Add("", pn, pb, ps)
- }
- return
- OpenPeopleTable:
- ; GuiControl, , DbView, peopleList
- Gui, SecondWin:Show, ,second gui
- GuiControl, SecondWin:, DbView, %peopleList%
- ; i can still see my people list object ?
- return
- AddPerson:
- Gui, Submit, NoHide
- peopleList.Push({person: EPerson, work: EWork, mob: EMob})
- MsgBox, % "Added person:" EPerson . ", " . EWork . ", " . EMob . " playerList length: " . peopleList.GetCapacity()
- ; GuiControl, SecondWin:Show, DbView
- ; GuiControl, SecondWin:, DbView ; , peopleList
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement