Article View: news.software.readers
Article #258695Re: Scripting Functions in 40tude Dialog
From: Bernd Rose
Date: Fri, 12 Dec 2014 21:12
Date: Fri, 12 Dec 2014 21:12
36 lines
2759 bytes
2759 bytes
On Fri, 12 Dec 2014 01:07:31 -0600, Sqwertz wrote: > Why is when I try and write or modify scripts in Dialog I always seem > to run into unknown built-in functions? Are only a subset of the > Delphi functions available in the Dialog scripting host? Or maybe > built around an old version of Delphi that does not support these > functions? Object Pascal. The Dialog Help file lists the available functions and types (last chapter of section Reference). On this page Marcus recommends the Reference Book by Marco Canto, which is still online under the link from the help file. The second edition of the book is free to download and, IMHO, more than sufficient for scripting Dialog. > Specifically, how do you assign a date to TDateTime variable? All the > references for Delphi say this is how it's done: > > var toDate : TDateTime; > ...... > toDate := EncodeDateTime(2015, 12, 31, 23, 59, 59, 0); There's no such thing as EncodeDateTime() in Object Pascal. But there are two separate functions, which can quite easily be combined: ;-------------------------------------------------------------------- Program Test; var toDate:TDateTime; Begin toDate := EncodeDate(2015, 12, 31) + EncodeTime(23, 59, 59, 0); Writeln(DateTimeToStr(toDate)); End. ;-------------------------------------------------------------------- HTH. Bernd
Technical Details
Message-ID:
<whxzxr4rt04t$.dlg@b.rose.tmpbox.news.arcor.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-rec.autos.sport.f1.20141227.mbox.gz!border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!news.albasani.net!.POSTED!not-for-mailReferences:
<1c0y615tqd78p$.dlg@sqwertz.com>Show Full Headers
Complete Article Headers
Message-ID: <whxzxr4rt04t$.dlg@b.rose.tmpbox.news.arcor.de> Subject: Re: Scripting Functions in 40tude Dialog Date: Fri, 12 Dec 2014 22:12:04 +0100 From: Bernd Rose <b.rose.tmpbox@arcor.de> References: <1c0y615tqd78p$.dlg@sqwertz.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-rec.autos.sport.f1.20141227.mbox.gz!border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!news.albasani.net!.POSTED!not-for-mail Newsgroups: news.software.readers Organization: albasani.net Lines: 36 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net b08i+8oYrAfjGgppdkauQAzFzpCjdB4t/TsmWIhzlvGtOsyRuUMBlPsWEVxgCKreQlP89RK8JiUv+wkY8XJlxqdqa2+WJBgnkCZJqh7MeUDrEYNlzoWE02bUWsPJwFrA NNTP-Posting-Date: Fri, 12 Dec 2014 21:12:06 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="SvssnSH07pFO4Th1mmcMqmhmtRrpZY84NuxKr/t12K/PLXrFwcaGNKPYcsCRWk0QYHDSBFrS5bG9paMBo4zrtGb0tpgEgyENjPCWt2lr1jLRlehFxNjvs70lK6LmD+7F"; mail-complaints-to="abuse@albasani.net" User-Agent: 40tude_Dialog/2.0.15.41 (0c40887a.240.323) Cancel-Lock: sha1:Q5lEro23R/2tjffmPIFEn3v63K8=