Well, it partly implements what its help says, anyway:
*ifrunning
Syntax: *IfRunning <task name> Then <command> [Else <command>]
However, I can't get the Else clause to run, no matter what I try.
(The Then part works OK.) Has anyone else got it to work?
Also, I can't find documentation for it, so does anyone know which
version of RISC OS was the first to implement it? And has the
Else clause ever worked?
What part of RISC OS implements it?
Dave
> I notice that RISC OS 5.14 implements a command "IfRunning".
> Well, it partly implements what its help says, anyway:
> *ifrunning
> Syntax: *IfRunning <task name> Then <command> [Else <command>]
Doesn't give anything here except 'not found'! Think you may have a
third-party module running.
John
--
John Williams, Brittany, Northern France - no attachments to these addresses!
Non-RISC OS posters change user to johnrwilliams or put 'risc' in subject!
Who is John Williams? http://petit.four.free.fr/picindex/author/ Somewhere nice to stay in Brittany? http://petit.four.free.fr/visitors/locate
> In article <3587c5ba50...@dsl.pipex.com>,
> Dave Higton <daveh...@dsl.pipex.com> wrote:
>
> > I notice that RISC OS 5.14 implements a command "IfRunning".
>
> > Well, it partly implements what its help says, anyway:
>
> > *ifrunning
> > Syntax: *IfRunning <task name> Then <command> [Else <command>]
>
> Doesn't give anything here except 'not found'! Think you may have a
> third-party module running.
After I posted, I realised that I hadn't searched for "IfRunning"
and "RISC OS"[1], so I did, and found Peter Dawsun's site, which
has an IfRunning app hosted there. However, I don't seem to have
it. I can't work out what else might implement it. Any ideas
gratefully accepted.
Btw I can't help thinking that an IfNotRunning command might
actually be more useful!
Dave
[1] Searching is an example where case doesn't matter :-)
>
> After I posted, I realised that I hadn't searched for "IfRunning"
> and "RISC OS"[1], so I did, and found Peter Dawsun's site, which
> has an IfRunning app hosted there. However, I don't seem to have
> it. I can't work out what else might implement it. Any ideas
> gratefully accepted.
>
> Btw I can't help thinking that an IfNotRunning command might
> actually be more useful!
>
> Dave
>
> [1] Searching is an example where case doesn't matter :-)
*Help commands
should probably show you which module is providing it.
Alex.
> In message <50bac680...@tiscali.co.uk>
> "John Williams (News)" <UCE...@tiscali.co.uk> wrote:
>
> > In article <3587c5ba50...@dsl.pipex.com>,
> > Dave Higton <daveh...@dsl.pipex.com> wrote:
> >
> > > I notice that RISC OS 5.14 implements a command "IfRunning".
> >
> > > Well, it partly implements what its help says, anyway:
> >
> > > *ifrunning
> > > Syntax: *IfRunning <task name> Then <command> [Else <command>]
> >
> > Doesn't give anything here except 'not found'! Think you may have a
> > third-party module running.
>
> After I posted, I realised that I hadn't searched for "IfRunning"
> and "RISC OS"[1], so I did, and found Peter Dawsun's site, which
> has an IfRunning app hosted there. However, I don't seem to have
> it. I can't work out what else might implement it. Any ideas
> gratefully accepted.
Rats. Should've looked further down the search results.
It's the ObeySupport module (filename ObeySpt) which is part of
!Zap.
Anyway, one of the original questions remains: has anyone managed
to get the Else clause if IfRunning to work?
Dave
> > I notice that RISC OS 5.14 implements a command "IfRunning".
> > Well, it partly implements what its help says, anyway:
> > *ifrunning
> > Syntax: *IfRunning <task name> Then <command> [Else <command>]
> Doesn't give anything here except 'not found'! Think you may have a
> third-party module running.
I get the same in RISC OS 5.15, and I am pretty sure I haven't
(intentionally) got a third party module installed.
--
Chris Johnson
> In message <3cf9cbba50...@dsl.pipex.com>
> Dave Higton <daveh...@dsl.pipex.com> wrote:
>
> > In message <50bac680...@tiscali.co.uk>
> > "John Williams (News)" <UCE...@tiscali.co.uk> wrote:
> >
> > > In article <3587c5ba50...@dsl.pipex.com>,
> > > Dave Higton <daveh...@dsl.pipex.com> wrote:
> > >
> > > > I notice that RISC OS 5.14 implements a command "IfRunning".
> > >
> > > > Well, it partly implements what its help says, anyway:
> > >
> > > > *ifrunning Syntax: *IfRunning <task name> Then <command> [Else
> > > > <command>]
> > >
> > > Doesn't give anything here except 'not found'! Think you may have a
> > > third-party module running.
> >
> > After I posted, I realised that I hadn't searched for "IfRunning" and
> > "RISC OS"[1], so I did, and found Peter Dawsun's site, which has an
> > IfRunning app hosted there. However, I don't seem to have it. I can't
> > work out what else might implement it. Any ideas gratefully accepted.
The Dawsun ifrunning is 26bit which did not work here on OS4.04, stopped by
a 'Window Manager in use' error.
>
> Rats. Should've looked further down the search results.ifrunning
>
> It's the ObeySupport module (filename ObeySpt) which is part of !Zap.
*which is a utility to find the source of * commands :-
http://www.duncan.moore.freeuk.com/riscos/
> Anyway, one of the original questions remains: has anyone managed to get
> the Else clause if IfRunning to work?
No.
--
David Pitt
Snow Leopard - MessengerPro
> *which is a utility to find the source of * commands :-
> http://www.duncan.moore.freeuk.com/riscos/
Ah, that is very clever. The other "which" ports I have seen only
perform the core function of finding executables on the path. This one
really looks at modules that provide the given command first. Very
useful.
Martin
--
---------------------------------------------------------------------
Martin Wuerthner MW Software http://www.mw-software.com/
ArtWorks 2 -- Designing stunning graphics has never been easier
spam...@mw-software.com [replace "spamtrap" by "info" to reply]
> I notice that RISC OS 5.14 implements a command "IfRunning".
>
> Well, it partly implements what its help says, anyway:
>
> *ifrunning
> Syntax: *IfRunning <task name> Then <command> [Else <command>]
>
> However, I can't get the Else clause to run, no matter what I try.
> (The Then part works OK.) Has anyone else got it to work?
Here's a not altogether helpful reply ;-)
I recall looking at the source of some other *Ifvariant command (possibly
IfThere) at some point and seeing that it seemed to work by evaluating the
condition then plugging 'true' or 'false' or 1/0 or something like that into
the condition, so the command buffer
*ifsubtle somethingsomplicated then blah else blah
became internally either
*if true then blah else blah
or
*if false then blah else blah
which was then executed by the OS. That meant the then/else part of the
process was down to how the OS handled the basic *IF command.
If 'Ifrunning' does the same one would expect it to work. But maybe it
parses the whole command line itself and gets that wrong?
On my RO systems I frequently used a small basic program which when run
populated a set of system variables with the names (and counts) of the
running wimp tasks. That made it easy to achieve the same sort of thing as
well as cope with rare occasions when more than one instance of a particular
task might be running. And, because I always has !Reporter running, the
logic setting the sysvars would cause a list of their values to be placed in
the reporter log, which could be useful. Indeed sometimes I ran it just to
achieve that.
From the basic program's initial comments:
Set flags to show what tasks are active in the system:
a) unset TaskCount-*
b) scan list of active tasks. Translate each name we find
into lowercase & replace any embedded spaces with "_"s.
Scan TaskName$(): if the name is a new one, add it with
a count of 1, otherwise increment the count.
c) Set <TaskCount-0000> to number of unique tasknames
d) Scan the task name/counter arrays and for each taskname
found, set two system symbols. One is the translated
name of the n'th task, eg:
<TaskCount-0017> might be set to: paint
while the other shows how many active tasks were found
with that translated name, so eg if three !Paint tasks
were active:
<TaskCount--paint> would be set to: 3
Note the way that the system symbols are named. Even if a
task is started with name "0000" or "0017", we would have:
<TaskCount-0000> number of unique task names
<TaskCount-0017> 17th unique task name
<TaskCount--0000> number of active '0000' tasks
<TaskCount--0017> number of active '0017' tasks
<TaskCount--edit> number of active 'edit' tasks
--
Jeremy C B Nicoll - my opinions are my own.
Email sent to my from-address will be deleted. Instead, please reply
to newsre...@wingsandbeaks.org.uk replacing "nnn" by "284".
> Dave
The module FilerHRun implements IfTask and IfNTask amongst others.
http://www.zen22994.zen.co.uk/musus/miscfw.htm
--
------------------------------------------------------------------
Richard Torrens. News email address is valid - for a limited time only.
http://www.Torrens.org.uk for genealogy, natural history, wild food, walks, cats
and more!
> In article <3587c5ba50...@dsl.pipex.com>,
> Dave Higton <daveh...@dsl.pipex.com> wrote:
> > I notice that RISC OS 5.14 implements a command "IfRunning".
>
> > Well, it partly implements what its help says, anyway:
>
> > *ifrunning
> > Syntax: *IfRunning <task name> Then <command> [Else <command>]
>
> > However, I can't get the Else clause to run, no matter what I try.
> > (The Then part works OK.) Has anyone else got it to work?
>
> > Also, I can't find documentation for it, so does anyone know which
> > version of RISC OS was the first to implement it? And has the
> > Else clause ever worked?
>
> > What part of RISC OS implements it?
>
> > Dave
>
> The module FilerHRun implements IfTask and IfNTask amongst others.
> http://www.zen22994.zen.co.uk/musus/miscfw.htm
Just the job, Richard - many thanks. Works a treat.
Now I have an Obey file that starts the LanMan98 Filer iff not
already running, then calls Connect98 on my NAS drive.
Dave