Quotes in captions

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
rebr
Posts: 41
Joined: 17 Nov 2013 20:30

Quotes in captions

Post by rebr »

Hi all!

I am creating command in a script file and would to use quotes in its caption.

Is it possible without recurring to variables?

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

Re: Quotes in captions

Post by highend »

Do you mean something like this?

Code: Select all

"abc's" text "abc";
"def's" text "def";
One of my scripts helped you out? Please donate via Paypal

rebr
Posts: 41
Joined: 17 Nov 2013 20:30

Re: Quotes in captions

Post by rebr »

highend wrote:Do you mean something like this?

Code: Select all

"abc's" text "abc";
"def's" text "def";
Something like this:

Code: Select all

"Backup to ""Desktop""|%desktop% : bak2desktop"
  $local = %desktop%;

  // Data e hora:
  $tc = <date yyyy-mm-dd hh:nn:ss>;
  $td = gettoken($tc, 1, " ");
  $th = gettoken($tc, 2, " ");

  // Fragmentar a hora:
  $h = substr($th, 0, 2);
  $m = substr($th, 3, 2);
  $s = substr($th, 6, 2);

  // Nome final do arquivo:
  $n = $td $h . "h" . $m;
  if (exists($local . \Backup\) != 2) { new($local . "\Backup", "dir"); }
  copyas '* ' . "(bak " . $n . ")" . '.?', "$local" . "\Backup\";

rebr
Posts: 41
Joined: 17 Nov 2013 20:30

Re: Quotes in captions

Post by rebr »

Sorry a had meant double quotes... :)

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

Re: Quotes in captions

Post by highend »

Don't know if this is possible...
Just use single quotes instead :)
One of my scripts helped you out? Please donate via Paypal

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Quotes in captions

Post by LittleBiG »

highend wrote:Don't know if this is possible...
Just use single quotes instead :)
Indeed. I have tried a couple of things without success.

rebr
Posts: 41
Joined: 17 Nov 2013 20:30

Re: Quotes in captions

Post by rebr »

I got it using variables this way:

Code: Select all

"_Initialize"
  perm $p_tmpCaption1 = "Send to ""Backup"" folder";

/*
[...]
*/

"$p_tmpCaption1"
  text OK;
Actually to avoid using variables, I use curved double quotes:

Code: Select all

"Backup to “Desktop”|%desktop% : bak2desktop"
  $local = %desktop%;
But you know when you put something in head and just don't give up..... :shock:

Post Reply