Page 1 of 1
Quotes in captions
Posted: 12 Jul 2016 21:15
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?
Re: Quotes in captions
Posted: 12 Jul 2016 21:28
by highend
Do you mean something like this?
Code: Select all
"abc's" text "abc";
"def's" text "def";
Re: Quotes in captions
Posted: 12 Jul 2016 23:27
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\";
Re: Quotes in captions
Posted: 12 Jul 2016 23:29
by rebr
Sorry a had meant double quotes...

Re: Quotes in captions
Posted: 13 Jul 2016 05:45
by highend
Don't know if this is possible...
Just use single quotes instead

Re: Quotes in captions
Posted: 13 Jul 2016 09:22
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.
Re: Quotes in captions
Posted: 13 Jul 2016 16:13
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.....
