Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Novice: Displaying regular message?

12 views
Skip to first unread message

Terry Pinnell

unread,
Apr 6, 2012, 3:39:34 AM4/6/12
to
Could one of the experts show me how I can write a BAT that would display
a message either in my text editor (or Notepad) or as a bitmap JPG/BMP
please.

This is on an XP PC, so I would want it to appear as the active window,
whatever else I might be doing. I want to add it to my Scheduled Tasks to
give me a monthly reminder about something.

I tried simply

@echo off
echo This is the reminder

But that just flashes a DOS window briefly. And even if I could get it to
stay displayed, the message isn't really as prominent as I'd like.

Do I just launch the necessary file?

--
Terry, East Grinstead, UK

Terry Pinnell

unread,
Apr 6, 2012, 3:48:24 AM4/6/12
to
Meanwhile it struck me that the obvious way to find out was to try it!
This worked OK:

@echo off
C:\Docs\SUNDRY\UpdateMessageHOSTS.jpg

where that is a 400 x 200 pixel JPG image containing my bold message. It
gets displayed by IrfanView, as that's the file association.

But is there some way I can get it to appear at a certain window size and
position please?

Timo Salmi

unread,
Apr 6, 2012, 5:30:55 AM4/6/12
to
On 06.04.2012 10:39 Terry Pinnell <terry...@DELETEgmail.com> wrote:
> Could one of the experts show me how I can write a BAT that would display
> a message either in my text editor (or Notepad) or as a bitmap JPG/BMP
> please.

Just put a PAUSE at the end of your script, so the window won't close.
As for invoking a program, just write out the call to it (as per the
item 109) and the file it is supposed to open. For more see e.g.

2} On Windows XP how do you stop the script files from closing?
http://www.netikka.net/tsneti/info/tscmd002.htm

3} How can I customize the Command Prompt Window with script commands?
http://www.netikka.net/tsneti/info/tscmd002.htm

109} How do I open e.g. three separate instances of notepad at one go?
http://www.netikka.net/tsneti/info/tscmd109.htm

36} I start a program from my script and it hogs my command window.
http://www.netikka.net/tsneti/info/tscmd036.htm

All the best, Timo

--
Prof. (emer.) Timo Salmi, Vaasa, Finland
https://twitter.com/TimoSalmi
http://www.netikka.net/tsneti/homepage.php
Useful CMD script tricks http://www.netikka.net/tsneti/info/tscmd.php

Terry Pinnell

unread,
Apr 6, 2012, 9:45:16 AM4/6/12
to
Timo Salmi <t...@uwasa.fi> wrote:

>On 06.04.2012 10:39 Terry Pinnell <terry...@DELETEgmail.com> wrote:
>> Could one of the experts show me how I can write a BAT that would display
>> a message either in my text editor (or Notepad) or as a bitmap JPG/BMP
>> please.
>
>Just put a PAUSE at the end of your script, so the window won't close.
>As for invoking a program, just write out the call to it (as per the
>item 109) and the file it is supposed to open. For more see e.g.
>
> 2} On Windows XP how do you stop the script files from closing?
> http://www.netikka.net/tsneti/info/tscmd002.htm
>
> 3} How can I customize the Command Prompt Window with script commands?
> http://www.netikka.net/tsneti/info/tscmd002.htm
>
> 109} How do I open e.g. three separate instances of notepad at one go?
> http://www.netikka.net/tsneti/info/tscmd109.htm
>
> 36} I start a program from my script and it hogs my command window.
> http://www.netikka.net/tsneti/info/tscmd036.htm
>
> All the best, Timo

Thanks, Timo, but I think I'll go with my JPG approach, which looks a lot
more striking than a DOS window!

However, does anyone have any solution to my follow-up question about
sizing and positioning it from the BAT please?

Terry Pinnell

unread,
Apr 6, 2012, 9:48:24 AM4/6/12
to
I meant to add: someone's bound to ask "Why use a batch file at all. Just
specify the JPG full filename in the Scheduled task". Agreed! It's now
just a matter of curiosity.

foxidrive

unread,
Apr 6, 2012, 10:12:08 AM4/6/12
to
On 6/04/2012 23:48, Terry Pinnell wrote:

>> However, does anyone have any solution to my follow-up question about
>> sizing and positioning it from the BAT please?
>
> I meant to add: someone's bound to ask "Why use a batch file at all. Just
> specify the JPG full filename in the Scheduled task". Agreed! It's now
> just a matter of curiosity.

This allows you to set the image screen position. See the options text file in the irfanview folder for many command line switches.


@echo off
start "" "c:\Program Files\Irfanview\i_view32.exe" "c:\folder\image.jpg" /pos=(200,400)



--
Mic

Todd Vargo

unread,
Apr 6, 2012, 4:22:53 PM4/6/12
to
This will display the message an then close in 10 seconds.

msg * /time:10 "This is the reminder"

--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)

Dr J R Stockton

unread,
Apr 7, 2012, 1:46:34 PM4/7/12
to
In alt.msdos.batch.nt message <uv6tn7h0jbj9oglfb...@4ax.co
m>, Fri, 6 Apr 2012 08:39:34, Terry Pinnell <terry...@DELETEgmail.com>
posted:

>Could one of the experts show me how I can write a BAT that would display
>a message either in my text editor (or Notepad) or as a bitmap JPG/BMP
>please.

If you name a .htm or .html or .hta file, a browser window may appear
showing that file.

With JavaScript, you can make it move or throb or flash in an attention-
getting fashion (browser-dependent) .

If you name, or the above loads, a sound file such as (for me, XP sp3)
C:\Windows\Media\ringout.wav, and your sound is on, you hear the noise.

You will want something that stays on top visually.

--
(c) John Stockton, nr London UK. ?@merlyn.demon.co.uk DOS 3.3 6.20 ; WinXP.
Web <http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms & links.
PAS EXE TXT ZIP via <http://www.merlyn.demon.co.uk/programs/00index.htm>
My DOS <http://www.merlyn.demon.co.uk/batfiles.htm> - also batprogs.htm.

Zaidy036

unread,
Apr 7, 2012, 6:02:51 PM4/7/12
to
On 4/7/2012 1:46 PM, Dr J R Stockton wrote:
> In alt.msdos.batch.nt message<uv6tn7h0jbj9oglfb...@4ax.co
> m>, Fri, 6 Apr 2012 08:39:34, Terry Pinnell<terry...@DELETEgmail.com>
> posted:
>
>> Could one of the experts show me how I can write a BAT that would display
>> a message either in my text editor (or Notepad) or as a bitmap JPG/BMP
>> please.
>
> If you name a .htm or .html or .hta file, a browser window may appear
> showing that file.
>
> With JavaScript, you can make it move or throb or flash in an attention-
> getting fashion (browser-dependent) .
>
> If you name, or the above loads, a sound file such as (for me, XP sp3)
> C:\Windows\Media\ringout.wav, and your sound is on, you hear the noise.
>
> You will want something that stays on top visually.
>
The simplest way is to use Task Scheduler and choose as its Action
"Display a Message"

--
Zaidy036

Todd Vargo

unread,
Apr 7, 2012, 7:27:43 PM4/7/12
to
I'm using XP sp3 but do not see that option available. Please confirm.
0 new messages