From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Mon Jul 15 2013 - 01:31:47 CDT

please always cc: the mailing list on your replies. thanks.

On Mon, Jul 15, 2013 at 7:25 AM, Verwandlung Die <wrabacon_at_gmail.com> wrote:
> I am reading the tutorials now.
> in the mean time I wrote this script in expect:
> #!/usr/bin/expect
> set DATE [exec date +%F_%H_%M];
> spawn vmd
> sleep 5
> expect "vmd >"
> send "logfile "
> send "$DATE"
> send "_log \r"
> expect "vmd >"
> interact
>
>
> From what i have read so far, I am able to send cli flags, only after vmd
> loads. Maybe i will understand more in the next few days.

what you write is very confusing. what you feed the CLI are "commands"
(either plain Tcl or the VMD specific add-ons) not "flags", "flags"
would be command-line arguments that start with a dash.

what you seem to be wanting is that the logfile is automatically
created when you launch VMD. while it don't quite understand what good
that will do outside of filling your harddrive with lots of clutter,
that sounds definitely like a job for a command in .vmdrc.

how about this?

logfile [clock format [clock seconds] -format {%Y-%m-%d_%H_%M_log} ]

or if you don't want part of the startup being logged this?

after idle {
   logfile [clock format [clock seconds] -format {%Y-%m-%d_%H_%M_log} ]
}

no need for such expect monstrosities.

axel.

--
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
International Centre for Theoretical Physics, Trieste. Italy.