lah@raybed2.UUCP (LANCE HOLMES) (12/16/87)
I've written a simple program that has a simular purpose to PD programs
called "XICON" and "ICONEXEC". It would allow a user to double click
on a project icon who's file contains a series of CLI commands and execute
them. After double clicking on it workbench would start the program
listed in the icon's Default tool. It would then run the program and
send a WBenchMsg to the program which would contain the name of the file
who's icon had been clicked on. The program would then take the filname
string and concatinate it with the string "Newcli FROM " to look like
strcat("Newcli FROM ",filename) . This string would next be the argument
for the dos function Execute. The program utilizing the new capablities
of the Newcli program would then open a cli window and start executing
the commands in the file.
I am sure that I have declared every thing correctly such as WBenchMsg.
I used the technique with respect to workbench args found in
the PD program Viewilbm. FF#44
I am getting the name of the file correctly.
I even went to the trouble of trying to copy the file to ram and then
using the ram filename to execute it.
I have hard coded the name of the file into the program and it works
like a charm, so the Newcli function will work even though a cli window
isn't open.
I'm at wits end and would appreciate any useful suggestions.
I'ts a simple program and would, if it worked, have great power in that
any executable command file could be run from the work bench.
I hoped to open a cli window and start Steve Drew's Shell program from
the work bench . A friend was going to use it to run DiskChange DF1:.lah@raybed2.UUCP (LANCE HOLMES) (12/16/87)
I'm sorry to have troubled you. I in a last ditch effort decided to download the patches for v 3.10 of Lattice. Now it Works like a charm. P.S. I am waiting for v 4.0 upgrade
cjp@antique.UUCP (Charles Poirier) (12/17/87)
In article <1084@raybed2.UUCP> lah@raybed2.UUCP (LANCE HOLMES) writes: >who's icon had been clicked on. The program would then take the filname >string and concatinate it with the string "Newcli FROM " to look like >strcat("Newcli FROM ",filename) . This string would next be the argument Simple. You can't just strcat onto the end of a string constant; there is no storage out at the string's end to put the filename in. You want something like char buf[100]; sprintf(buf, "%s%s", "Newcli FROM ", filename); Hope this helps. -- Charles Poirier (decvax,ihnp4,attmail)!vax135!cjp "Docking complete... Docking complete... Docking complete..."
peter@sugar.UUCP (Peter da Silva) (12/19/87)
You have to put the tool's own name in sm_ArgList[0]. I discovered this through trial and error when I was playing around with writing a high-zoot disk utility. I quit it because it was beginning to founder under the weight of its code... started a rewrite and then accidentally reused the disk I was working on the new version on. When I recover from this loss I may get back to it. Sometimes it just doesn't pay to copy Fish Disks. [a moment of silence] Anyway, sm_SargList[0] has to contain the tool's own lock and name. -- -- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter -- Disclaimer: These U aren't mere opinions... these are *values*.