Posts: 1,271
Threads: 399
Joined: Mar 2003
how to i get the menu text instead of index?
like
sel PopupMenu.Index.Label
case "Andre"
Function
rclick
str menu=
;Andre
;Anne
;Dirk
;Empfang
;Maya
;Lichtrechner Lenovo
;Server
;-
;Admin Backupstation
;Admin Fritzbox 1
;-
;Exit
out
int i=PopupMenu(menu)
;out i
sel(i)
,case 1 make_rdp("andre-pc" "remote" "starled02")
Posts: 12,086
Threads: 142
Joined: Dec 2002
Macro
Macro2120
str menu=
;Andre
;Anne
;Dirk
;Empfang
;Maya
;Lichtrechner Lenovo
;Server
;-
;Admin Backupstation
;Admin Fritzbox 1
;-
;Exit
out
MenuPopup m.AddItems(menu 1)
int i=m.Show
out i
if(!i) ret
m.GetItemText(i _s)
out _s
Posts: 1,271
Threads: 399
Joined: Mar 2003
thank you. now i don't have to use index anymore, this way it is easier for me to maintain my small solution.
Posts: 12,086
Threads: 142
Joined: Dec 2002
or
Macro
Macro2120
str menu=
;1 Andre
;2 Anne
;3 Dirk
;4 Empfang
;5 Maya
;6 Lichtrechner Lenovo
;7 Server
;-
;101 Admin Backupstation
;102 Admin Fritzbox 1
;-
;900 Exit
out
int i=ShowMenu(menu)
out i
Posts: 12,086
Threads: 142
Joined: Dec 2002
or
Macro
Macro2120
def M_ANDRE 1
def M_ANNE 5
;...
str menu=
F
;{M_ANDRE} Andre
;{M_ANNE} Anne
;...
out
int i=ShowMenu(menu)
out i
sel i
,case M_ANDRE
,case M_ANNE
,;...