local re=regex.new'/\\.(paq8(?:l|p2))$/i' local function act(AC,arc) local ext=re:match(AC) local cline=ext and ext..' -d' or arc..' -8' panel.GetUserScreen() win.system(cline..' "'..AC..'"') panel.SetUserScreen() end Macro { area="Shell"; key="F2"; description="Arc: paq8l"; flags="EmptyCommandLine EnableOutput"; action = function() act(APanel.Current,"paq8l") end; } Macro { area="Shell"; key="F2"; description="Arc: paq8p2"; flags="EmptyCommandLine EnableOutput"; action = function() act(APanel.Current,"paq8p2") end; } |