How to execute command from popupmenu return string
Posted: 19 Oct 2017 20:13
I'm trying to setup a custom popupnested menu which can have button commands (like :viewthumbs) or normal commands (like #306)
I don't want to execute the commands directly from the popup menu, but instead read the selected menu item, then decide whether to execute it or not:
My problem is, how do I 'execute' whatever is in $fil?
I don't want to execute the commands directly from the popup menu, but instead read the selected menu item, then decide whether to execute it or not:
Code: Select all
$a = readfile("<xydata>\filters.txt");
$fil = popupnested($a);
if ($fil != ""){
if(gettoken($fil, 1,"") == "§"){
execute $fil; //$fil = #306 or $fil = :viewthumbs
}
else{
filter $fil, 8;
}
}
My problem is, how do I 'execute' whatever is in $fil?