看板 EzHotKey 關於我們 聯絡資訊
想要達到當我用下拉式選單選某值之後 按下按鈕可以得到我想要的資料 但目前還是失敗的 有哪裡需要修改的嗎 另外是否有無宣告陣列是key+多維的格式嗎 gui, add, DDL, vname ,小明|小美 gui, add, button, gtest w80, TEST gui, add, edit, readonly vautoreport w400 h300, gui, show, x1260 y590 w620 ,score Auto return ;===================== test: select := name 小明 := [[10,11,12,13],[20,21,22,23]] 小美 := [[30,31,32,33],[40,41,42,43]] gui, submit, nohide TestScore:= select[2,2] guicontrol,,autoreport,%name%的第2次的第2個成績:%TestScore% return 多謝b大提醒 後來改成這樣就可以了 test: gui, submit, nohide ming := [[10,11,12,13],[20,21,22,23]] mei := [[30,31,32,33],[40,41,42,43]] select :={小明:ming,小美:mei} TestScore:= select[name][2,2] guicontrol,,autoreport,%name%的第2次的第2個成績:%TestScore% return ----- Sent from JPTT on my iPhone -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 150.117.155.159 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/EzHotKey/M.1647140353.A.8E9.html
bhbbbbb: 你的 select 是個 string 他自然不可能用 select[2,2] 這03/14 00:32
bhbbbbb: 種用來取二維陣列中資料的方法。我想你需要的是一個以名03/14 00:32
bhbbbbb: 子為 key 而以二維陣列為 value 的 map。然後除此之外,03/14 00:32
bhbbbbb: 你的 gui submit 放的位置你可能要再思考一下。03/14 00:32
※ 編輯: s20714dog (110.26.36.139 臺灣), 03/14/2022 09:35:34