1790Re: [jasspa] Client-Server
- Feb 9, 2006Gadrin,
When playing around with these things I try to start off small, so I started a
new cmd prompt and typed:
me32 -m "C:ME:ml-write hello"
What happened was a bit of a surprise, my server ME printed:
on the message line. Having played around a bit I think that the -m server
option is working but there are 2 serious problems:
1) To successfully send a command the message must end with a new-line char
(i.e. a \n char). This is pretty easy on unix but in a windows cmd prompt...
(I'm sure there must be a way but I haven't found one yet).
2) Every -m message has the string 'C:ME:2 popup-window\n' appended to make
the server ME popup the current frame if it is minimized. So the above call to
me32 actually sent 'C:ME:ml-write helloC:ME:2 popup-window\n' to the server
(see that hidden *server* buffer) - this additional command makes sense when
using the -o option to open a file in the server ME, but I do not think this
should be sent when only the -m option is used.
So I think the -m option could be improved by:
1) 'parsing' the message using the macro parser, this would allow the user to
sent the message:
C:ME:find-file "my-path\\my-file"\nC:ME:ml-write "hello\tworld"\n
as one message (i.e. '\\' -> '\', '\n' -> new-line char etc).
2) If the last char of the <message> is not a \n then add one.
3) Only send the popup-window command when -o option is used.
We are looking to create another development release soon, if no one objects
to the above changes I will try to get them into this release.
> Subject: [jasspa] Client-Server
> From: Gadrin <gadrin@...>
> Date: Thursday, February 9, 2006, 4:26:11 PM
> To: firstname.lastname@example.org
> I'm experimenting with the Client-Server functions in ME on Windows.
> I'm using a scripting language to send the commands via a DOS window,
> which auto-closes once the command finishes.
> cd = dirscript()
> comspec = environment("COMSPEC")
> dirchange("C:\Program Files\JASSPA\MicroEmacs")
> cmd = `/c me32.exe -m "C:ME:find-file \"C:/Program
> ;cmd = `/c me32.exe -m "C:ME:ml-write \"Hello world\"`
> run(comspec, cmd)
> unfortunately the commands above don't find-file or ml-write. In both
> instances ME responds (the icon flashes and gets focus) but I get a
> new file called ME:1.
> the ml-write lines opens a new file called "Hello".
> anyone with more experience can give me a hint?
> This is an unmoderated list. JASSPA is not responsible for the content of
> any material posted to this list.
> To unsubscribe, send a mail message to
> or visit http://groups.yahoo.com/group/jasspa and
> modify your account settings manually.
> Yahoo! Groups Links
- << Previous post in topic Next post in topic >>