Page 1 of 1

Batch file in windows environment.

Posted: Sunday 09 June 2019 23:54
by PVerburg
I have been reading for days and am lost on what is supported under script:\\ in a windows environment.
can I call a batch file don't look like it, do I have to use lua to call cmd/batch.
Or is there no support under windows/dos OS.

I'm not strong in unix and run some dos only based sensors "watts clever" power meter so like to stay with windows at this stage.

Thanks,

Paul V.

Re: Batch file in windows environment.

Posted: Monday 10 June 2019 0:15
by waaren
PVerburg wrote: Sunday 09 June 2019 23:54 I have been reading for days and am lost on what is supported under script:\\ in a windows environment.
can I call a batch file
Yes you can. Do this from the On/Off actions fields and use something like

Code: Select all

script://c:\users\<user name>\<bat name>.bat
windows.png
windows.png (46.41 KiB) Viewed 1256 times

Code: Select all

C:\Users\XXXX>more ff.bat
timeout 8
echo hi > c:\users\XXXX\ff.txt

C:\Users\XXXX>more ff.txt
hi

C:\Users\XXXX>dir ff.txt
 Volume in drive C has no label.
 Volume Serial Number is FCAE-F424

 Directory of C:\Users\XXXX

10-06-2019  00:06                 5 ff.txt
               1 File(s)              5 bytes
               0 Dir(s)  40.349.782.016 bytes free

Re: Batch file in windows environment.

Posted: Tuesday 16 July 2019 22:49
by PVerburg
Thanks, that worked the problem was that the sound command won't work when called in a batch file like that.
will experiment with different options i'm sure i will find the cause.