Page 1 of 1

canceling popupmenu cancels the script?

Posted: 10 Dec 2016 09:15
by yusef88
how to cancel the script If I cancelled popupmenu

Code: Select all

  $s = popupmenu("test1|test2");
  runret ("cmd /k ""chcp 65001 & ""<xyscripts>\es"" -s $s > ""<xydata>\S-Everything.txt"" &exit""", , 1);
  writefile("<xypaper>\S-Everything.txt", readfile("<xydata>\S-Everything.txt", t, , 65001), , "tu");
  delete 0, 0, "<xydata>\S-Everything.txt"; if (tab("get", "path") != "paper:S-Everything") {
  tab("new", "paper:S-Everything");};delete 0, 0, "<xydata>\S-Everything.txt";

Re: canceling popupmenu cancels the script?

Posted: 10 Dec 2016 09:21
by highend

Code: Select all

if !($s) { end 1==1; }
?

Re: canceling popupmenu cancels the script?

Posted: 10 Dec 2016 11:07
by yusef88
thanks
is there any workaround to get this work
[code] popupmenu("pdf;doc;txt|test2")[/code]

Re: canceling popupmenu cancels the script?

Posted: 10 Dec 2016 11:42
by highend

Code: Select all

popupmenu(replace("<the variable containing the extensions>", "|", ";"))
Something like that?

Re: canceling popupmenu cancels the script?

Posted: 10 Dec 2016 11:57
by yusef88
I put it in quotes and worked thanks for helping :tup: