"Timestamp" can't work with variable?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
eil
Posts: 1923
Joined: 13 Jan 2011 19:44

"Timestamp" can't work with variable?

Post by eil »

I'm trying to make a script that first picks an item and then copies its datem+datec to other selected items. Help file gives example "timestamp 'mc', <focitem>, , 'a';" where <focusitem> is quite like a variable for me, but when i try to use simple variable $clondate "magic doesn't happen".. Timestamp seem to not recognize dates of item in variable but takes it's path as a "direct time format, though Syntax says:
timestamp [type = "cma"], [date / source_item], [itemlist], [source_type = "*"], [shift]
What am i doing wrong?

Code: Select all

  perm $clondate;
  if ($clondate == "") {$clondate = <curitem>; trayballoon $clondate;}
  else {timestamp 'mc', $clondate, , 'mc', "1 s"; unset $clondate;}
Last edited by eil on 27 Feb 2021 13:44, edited 2 times in total.
Win 7 SP1 x64 100% 1366x768|1900x1080

RalphM
Posts: 2143
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: "Timestamp" can't work with variable?

Post by RalphM »

Without testing it myself, I don't see why you need this to be a perm var and the single quotes might make it trip?!
Ralph :)
(OS: W11 26H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)

eil
Posts: 1923
Joined: 13 Jan 2011 19:44

Re: "Timestamp" can't work with variable?

Post by eil »

RalphM wrote: ↑26 Feb 2021 14:24 Without testing it myself, I don't see why you need this to be a perm var and the single quotes might make it trip?!
cause it's ought to work in 2 stages: select source-date-item, use script(or push a button), select items to be date-coppied , use script again. it's useful cause one can specifically pick 1 source, and in situations when source and target is in different locations.
Win 7 SP1 x64 100% 1366x768|1900x1080

jupe
Posts: 3570
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: "Timestamp" can't work with variable?

Post by jupe »

source_type can only be 1 char at a time, or an asterisk.

eil
Posts: 1923
Joined: 13 Jan 2011 19:44

Re: "Timestamp" can't work with variable?

Post by eil »

jupe wrote: ↑26 Feb 2021 18:57 source_type can only be 1 char at a time, or an asterisk.
my bad, didn't notice that detail. so there is no way to simple clone all dates in once, only one at a time if exact copy is desired..
Win 7 SP1 x64 100% 1366x768|1900x1080

jupe
Posts: 3570
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: "Timestamp" can't work with variable?

Post by jupe »

eil wrote: ↑26 Feb 2021 19:20 no way to simple clone all dates in once
jupe wrote: ↑26 Feb 2021 18:57 or an asterisk.

eil
Posts: 1923
Joined: 13 Jan 2011 19:44

Re: "Timestamp" can't work with variable?

Post by eil »

jupe wrote: ↑26 Feb 2021 19:21
eil wrote: ↑26 Feb 2021 19:20 no way to simple clone all dates in once
jupe wrote: ↑26 Feb 2021 18:57 or an asterisk.
i wrote it wrong, meant only 2 of 3 dates. well tried with 1 - now it works, which is already good.!
but one strange thing happens = i have "1 s" stated in shift parameters, but time is shifted +2sec for some dates.
Win 7 SP1 x64 100% 1366x768|1900x1080

Post Reply