canceling popupmenu cancels the script?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

canceling popupmenu cancels the script?

Post 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";

highend
Posts: 14996
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: canceling popupmenu cancels the script?

Post by highend »

Code: Select all

if !($s) { end 1==1; }
?
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: canceling popupmenu cancels the script?

Post by yusef88 »

thanks
is there any workaround to get this work
[code] popupmenu("pdf;doc;txt|test2")[/code]

highend
Posts: 14996
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: canceling popupmenu cancels the script?

Post by highend »

Code: Select all

popupmenu(replace("<the variable containing the extensions>", "|", ";"))
Something like that?
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: canceling popupmenu cancels the script?

Post by yusef88 »

I put it in quotes and worked thanks for helping :tup:

Post Reply