Discussion:
How to send message to another application
(too old to reply)
Alan Adams
2020-02-12 15:41:24 UTC
Permalink
Hi

i'm trying to work around a limitation of Pipedream.

Briefly I want to create a csv file and have Pipedream open it
automatically.

If I double-click the file when Pipedream isn't running, it works. If I
double-click when Pipedream is running, the banner appears again, then
nothing more happens. I think Pipedreasm is trying to open a second copy
of itself, and quitting when it discovers this.

Instead I want my application to ensure PipeDream is running, then use
DataSava and DataLoad messages to simulate draging a file to its iconbar
icon. This requires me, as far as I can see from the manuals, to know the
icon number and window handle. The window handle should be -2 I believe,
but how do I find the icon number.

I can find the task handle using Task_EnumerateTasks looking for the name.

The message protocol has an option to send the message to the task handle.
Do I need the icon number in this case? If not, what do I put in message
block fields 20 amnd 24 (and indeed 28 and 32 as well)?
--
Alan Adams, from Northamptonshire
***@adamshome.org.uk
http://www.nckc.org.uk/
Martin
2020-02-12 18:01:44 UTC
Permalink
Post by Alan Adams
Hi
i'm trying to work around a limitation of Pipedream.
Briefly I want to create a csv file and have Pipedream open it
automatically.
If I double-click the file when Pipedream isn't running, it works.
If I double-click when Pipedream is running, the banner appears
again, then nothing more happens. I think Pipedreasm is trying to
open a second copy of itself, and quitting when it discovers this.
Instead I want my application to ensure PipeDream is running, then
use DataSava and DataLoad messages to simulate draging a file to
its iconbar icon. This requires me, as far as I can see from the
manuals, to know the icon number and window handle. The window
handle should be -2 I believe, but how do I find the icon number.
I can find the task handle using Task_EnumerateTasks looking for the name.
The message protocol has an option to send the message to the task
handle. Do I need the icon number in this case? If not, what do I
put in message block fields 20 amnd 24 (and indeed 28 and 32 as
well)?
Before you start on a program to bypass a 'limitation' (or even bug)
or Pipedream, have you asked on the pipedream mailing list about this?

Stuart is usually around, and if it is a bug may fix it, or confirm
it is a limitation.
--
Martin Avison
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received.
Alan Adams
2020-02-12 21:35:11 UTC
Permalink
Post by Martin
Post by Alan Adams
Hi
i'm trying to work around a limitation of Pipedream.
Briefly I want to create a csv file and have Pipedream open it
automatically.
If I double-click the file when Pipedream isn't running, it works.
If I double-click when Pipedream is running, the banner appears
again, then nothing more happens. I think Pipedreasm is trying to
open a second copy of itself, and quitting when it discovers this.
Instead I want my application to ensure PipeDream is running, then
use DataSava and DataLoad messages to simulate draging a file to
its iconbar icon. This requires me, as far as I can see from the
manuals, to know the icon number and window handle. The window
handle should be -2 I believe, but how do I find the icon number.
I can find the task handle using Task_EnumerateTasks looking for the name.
The message protocol has an option to send the message to the task
handle. Do I need the icon number in this case? If not, what do I
put in message block fields 20 amnd 24 (and indeed 28 and 32 as
well)?
Before you start on a program to bypass a 'limitation' (or even bug)
or Pipedream, have you asked on the pipedream mailing list about this?
Is that the same list as Fireworkz, on google groups? If so, I've applied
to join it so I can ask a question, but haven't yet been accepted. As my
copy of Fireworkz is unregistererd, bundled with the ARMX6, it may be they
won't accept me.
Post by Martin
Stuart is usually around, and if it is a bug may fix it, or confirm
it is a limitation.
--
Alan Adams, from Northamptonshire
***@adamshome.org.uk
http://www.nckc.org.uk/
Martin
2020-02-12 23:19:48 UTC
Permalink
Post by Alan Adams
On 12 Feb in article
Post by Alan Adams
i'm trying to work around a limitation of Pipedream.
[Snip]
Post by Alan Adams
Before you start on a program to bypass a 'limitation' (or even
bug) or Pipedream, have you asked on the pipedream mailing list
about this?
Is that the same list as Fireworkz, on google groups? If so, I've
applied to join it so I can ask a question, but haven't yet been
accepted. As my copy of Fireworkz is unregistererd, bundled with
the ARMX6, it may be they won't accept me.
As Fireworkz is now freely available, anyone should be able to join.
Perhaps Stuart needs to accept you.

The PipeDream list is different - see
http://croftnuisk.co.uk/coltsoft/pipedream/

If you have problems with them, I could post to the FW list for you,
but I am not a member of the PD one.

Martin
--
Martin Avison
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received.
Alan Adams
2020-02-13 11:03:41 UTC
Permalink
Hi

Thanks to everyone who has replied.

I'll start with WindOpen as it's an easy test to try.

I have low expectations of Matthew's suggestions, because it relies on
Pipedream's internal workings, and the reason for this post in the first
place is that ther's something suspicious about thew way Pipedream works.

I'll alos try joining the pipedream list as I use that a lot more than
Fireworkz. I only use the latter to format Pipedream sheets for pretty
printing.

I'll update when I have more results.

Alan
Post by Martin
Post by Alan Adams
On 12 Feb in article
Post by Alan Adams
i'm trying to work around a limitation of Pipedream.
[Snip]
Post by Alan Adams
Before you start on a program to bypass a 'limitation' (or even
bug) or Pipedream, have you asked on the pipedream mailing list
about this?
Is that the same list as Fireworkz, on google groups? If so, I've
applied to join it so I can ask a question, but haven't yet been
accepted. As my copy of Fireworkz is unregistererd, bundled with
the ARMX6, it may be they won't accept me.
As Fireworkz is now freely available, anyone should be able to join.
Perhaps Stuart needs to accept you.
The PipeDream list is different - see
http://croftnuisk.co.uk/coltsoft/pipedream/
If you have problems with them, I could post to the FW list for you,
but I am not a member of the PD one.
Martin
--
Alan Adams, from Northamptonshire
***@adamshome.org.uk
http://www.nckc.org.uk/
Matthew Phillips
2020-02-13 21:06:32 UTC
Permalink
Post by Alan Adams
I'll start with WindOpen as it's an easy test to try.
Good idea.
Post by Alan Adams
I have low expectations of Matthew's suggestions, because it relies on
Pipedream's internal workings, and the reason for this post in the first
place is that ther's something suspicious about thew way Pipedream works.
It doesn't rely much on Pipedream's internals.

The odd behaviour you describe certainly has nothing to do with how
Pipedream responds to Message_DataLoad.

If Pipedream is running and you double-click the CSV field, Pipedream will
receive Message_DataOpen. It clearly does not respond to this, because you
get the Pipedream loading banner. That shows that the Alias$@RunType for CSV
files has been invoked, and (probably) Pipedream has been run with the CSV
filename passed to it as part of the command line. Message_DataOpen is not
used in the DataSave/DataLoad sequence, and nor is the Alias$@RunType used so
my suggestion won't trigger the same behaviour.

It sounds to me like Pipedream has code to check if it is already running
when it starts up, and if it is already running, the new copy quits without
inspecting its command line. In the few applications I have written that do
this sort of check, I ensure that the new task sends a message to the old
task to pass the filename across so that the copy which is already running
can handle the file. That's probably how Pipedream needs to be modified.
--
Matthew Phillips
Durham
Alan Adams
2020-02-13 15:04:59 UTC
Permalink
Post by Martin
Post by Alan Adams
On 12 Feb in article
Post by Alan Adams
i'm trying to work around a limitation of Pipedream.
[Snip]
Post by Alan Adams
Before you start on a program to bypass a 'limitation' (or even
bug) or Pipedream, have you asked on the pipedream mailing list
about this?
Is that the same list as Fireworkz, on google groups? If so, I've
applied to join it so I can ask a question, but haven't yet been
accepted. As my copy of Fireworkz is unregistererd, bundled with
the ARMX6, it may be they won't accept me.
As Fireworkz is now freely available, anyone should be able to join.
Perhaps Stuart needs to accept you.
The PipeDream list is different - see
http://croftnuisk.co.uk/coltsoft/pipedream/
I've tried that, but it needs me to have an existing google account.

I'm fussy about how much personal information I give to Google, and I'm
not going to create an account there.

I've got this working via Druck's WindOpen module, so I'll leave it there.
Post by Martin
If you have problems with them, I could post to the FW list for you,
but I am not a member of the PD one.
Martin
--
Alan Adams, from Northamptonshire
***@adamshome.org.uk
http://www.nckc.org.uk/
Martin
2020-02-13 17:45:58 UTC
Permalink
Post by Alan Adams
Post by Martin
As Fireworkz is now freely available, anyone should be able to
join. Perhaps Stuart needs to accept you.
The PipeDream list is different - see
http://croftnuisk.co.uk/coltsoft/pipedream/
I've tried that, but it needs me to have an existing google account.
Does it? My email for the FW one is one of my addresses, not one of
google's.
Post by Alan Adams
I'm fussy about how much personal information I give to Google, and
I'm not going to create an account there.
Don't blame you!
Post by Alan Adams
I've got this working via Druck's WindOpen module, so I'll leave it there.
Yes, WindOpen can be very useful.
--
Martin Avison
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received.
Alan Adams
2020-02-13 18:40:18 UTC
Permalink
Post by Martin
Post by Alan Adams
Post by Martin
As Fireworkz is now freely available, anyone should be able to
join. Perhaps Stuart needs to accept you.
The PipeDream list is different - see
http://croftnuisk.co.uk/coltsoft/pipedream/
I've tried that, but it needs me to have an existing google account.
Does it? My email for the FW one is one of my addresses, not one of
google's.
It comes about because you go to the group, and request to join. You get
accepted, and then when you visit are asked for an email address and
password. No password has been issued.

You then go through the steps to "recover your account" and at the end are
told "we can't verify that you own that email address".

Verifying it requires providing information previously recorded against a
Google account.
Post by Martin
Post by Alan Adams
I'm fussy about how much personal information I give to Google, and
I'm not going to create an account there.
Don't blame you!
Post by Alan Adams
I've got this working via Druck's WindOpen module, so I'll leave it there.
Yes, WindOpen can be very useful.
--
Alan Adams, from Northamptonshire
***@adamshome.org.uk
http://www.nckc.org.uk/
Martin
2020-02-13 23:26:00 UTC
Permalink
Post by Alan Adams
Post by Martin
Post by Alan Adams
Post by Martin
As Fireworkz is now freely available, anyone should be able to
join. Perhaps Stuart needs to accept you.
The PipeDream list is different - see
http://croftnuisk.co.uk/coltsoft/pipedream/
I've tried that, but it needs me to have an existing google
account.
Does it? My email for the FW one is one of my addresses, not one
of google's.
It comes about because you go to the group, and request to join.
You get accepted, and then when you visit are asked for an email
address and password. No password has been issued.
You then go through the steps to "recover your account" and at the
end are told "we can't verify that you own that email address".
Verifying it requires providing information previously recorded
against a Google account.
Ahah! Did you go to https://groups.google.com/forum/ ?

Perhaps you should try...
To subscribe to this restricted group e-mail:
colton-software-pipedream+***@googlegroups.com
--
Martin Avison
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received.
Alan Adams
2020-02-14 09:30:49 UTC
Permalink
Post by Martin
Post by Alan Adams
Post by Martin
Post by Alan Adams
Post by Martin
As Fireworkz is now freely available, anyone should be able to
join. Perhaps Stuart needs to accept you.
The PipeDream list is different - see
http://croftnuisk.co.uk/coltsoft/pipedream/
I've tried that, but it needs me to have an existing google
account.
Does it? My email for the FW one is one of my addresses, not one
of google's.
It comes about because you go to the group, and request to join.
You get accepted, and then when you visit are asked for an email
address and password. No password has been issued.
You then go through the steps to "recover your account" and at the
end are told "we can't verify that you own that email address".
Verifying it requires providing information previously recorded
against a Google account.
Ahah! Did you go to https://groups.google.com/forum/ ?
Perhaps you should try...
I emailed that. I got back:

Hello ***@adamshome.org.uk,

We have received a request to join the group Colton Software PipeDream.
colton-software-pipedream requires owner approval for join requests. If
you would like to continue with your join request, reply to this email or
visit the following confirmation URL:

https://groups.google.com/group/colton-software-pipedream/subscribe

I went there, and filled in the details to make a join request

I got back an email accepting the request.

Then I tried to log in ...
--
Alan Adams, from Northamptonshire
***@adamshome.org.uk
http://www.nckc.org.uk/
Steve Fryatt
2020-02-14 15:41:14 UTC
Permalink
On 14 Feb, Alan Adams wrote in message
Post by Alan Adams
I got back an email accepting the request.
Then I tried to log in ...
Log in to what? It's an email list, isn't it?
--
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/
Alan Adams
2020-02-14 16:56:05 UTC
Permalink
Post by Steve Fryatt
On 14 Feb, Alan Adams wrote in message
Post by Alan Adams
I got back an email accepting the request.
Then I tried to log in ...
Log in to what? It's an email list, isn't it?
No, it seems to have moved to google Groups. That's where you get directed
after mailing the list with a Subscribe request.
--
Alan Adams, from Northamptonshire
***@adamshome.org.uk
http://www.nckc.org.uk/
druck
2020-02-12 20:08:17 UTC
Permalink
Post by Alan Adams
Briefly I want to create a csv file and have Pipedream open it
automatically.
If I double-click the file when Pipedream isn't running, it works. If I
double-click when Pipedream is running, the banner appears again, then
nothing more happens. I think Pipedreasm is trying to open a second copy
of itself, and quitting when it discovers this.
Instead I want my application to ensure PipeDream is running, then use
DataSava and DataLoad messages to simulate draging a file to its iconbar
icon. This requires me, as far as I can see from the manuals, to know the
icon number and window handle. The window handle should be -2 I believe,
but how do I find the icon number.
I can find the task handle using Task_EnumerateTasks looking for the name.
The message protocol has an option to send the message to the task handle.
Do I need the icon number in this case? If not, what do I put in message
block fields 20 amnd 24 (and indeed 28 and 32 as well)?
Try my WindOpen module from http://www.armclub.org.uk/free as this does
exacly what you describe, using a *command. You should be able to do a:-

*WO_OpenWind PipeDream $.Path.CSVFile

(Check the app name in Task manager, and give the correct path to the file)

If you want the window to open at a fixed location on screen, supply the
bottom left and top right coordinates as the next 4 parameters. If using
a program you can execute the command via OSCLI.

---druck
Matthew Phillips
2020-02-13 09:00:08 UTC
Permalink
Post by Alan Adams
Instead I want my application to ensure PipeDream is running, then use
DataSava and DataLoad messages to simulate draging a file to its iconbar
icon. This requires me, as far as I can see from the manuals, to know the
icon number and window handle. The window handle should be -2 I believe,
but how do I find the icon number.
I can find the task handle using Task_EnumerateTasks looking for the name.
The message protocol has an option to send the message to the task handle.
Do I need the icon number in this case? If not, what do I put in message
block fields 20 and 24 (and indeed 28 and 32 as well)?
I agree with the other replies suggesting you should seek an improvement in
PipeDream, or use the WindOpen module as suggested by druck, but in case
neither of these works out here are some otehr thoughts.

If you use Wimp_SendMessage with R2 set to PipeDream's task number then the
Message_DataLoad will reach PipeDream. The question is, what it will do with
it. (You don't need to start with Message_DataSave if you are loading a file
from disc. The Filer doesn't.)

The registers R2 and R3 in Wimp_SendMessage are used simply to determine
which tasks will receive the message. The contents of the message is
independent pf this. So you could fill in +20 with the window handle -2 as
though the file had been dropped on the icon bar. If you are lucky, that's
the only thing PipeDream will check -- unless it has two icons on the iconbar
it is not going to be bothered about the value in +24, and probably will not
examine +28 or +32 either.

Whether that would work entirely depends on PipeDream's implementation
details, and you cannot rely on this working for every application.

If you are wanting to find out the icon number of an application on the
iconbar, there is a trick you can use. This is employed within Impact. It's
code I inherited from John Skingley: I do not know whether it was his
original idea or whether this was a generally known technique.

First of all, determine how many icons there are on the iconbar by calling
Wimp_GetWindowInfo for the iconbar window, handle -2. Call the result n.

Then loop through the icon numbers (let i range from 0 to n-1) and for each
icon call Wimp_SendMessage with R0=19, R2=-2 and R3=i. Doesn't matter what
is in the message block but R1 had probably better be valid. As documented
in the PRM, using R0=19 when you're not actually acknowledging a message
allows the task handle to be found as on returning from Wimp_SendMessage the
value of R2 will be the task handle. For the iconbar this, unusually, will
vary from one icon to the next.

You can then use TaskManager_TaskNameFromHandle to look up the task name for
the icon, and if it's PipeDream, break out of the loop.
--
Matthew Phillips
Durham
Loading...