home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 6767 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.7 KB

  1. Path: sunsite.doc.ic.ac.uk!qmw!odin
  2. From: odin@dcs.qmw.ac.uk (Andrew George Elia)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Executing like Workbench
  5. Date: 2 Apr 1996 14:10:51 GMT
  6. Organization: Queen Mary & Westfield College, London, UK
  7. Message-ID: <4jrchb$s7l@epsilon.qmw.ac.uk>
  8. NNTP-Posting-Host: dannii-main.dcs.qmw.ac.uk
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. Hi,
  12.     Here's a teaser for you. I've recently had the idea of developing 
  13. a tool that would be runnable from CLI, and would convert all command 
  14. line arguments into a Workbench arguments list to execute as if it had 
  15. been run from Workbench. Basically, the conversion bit seems OK, I just 
  16. need to know how to make a program behave as if it had been called from 
  17. Workbench rather than the CLI. This would mean calling CreateProc, and 
  18. providing a message for the program to answer etc.
  19.  
  20.     You may ask why I'd like to write a program like this. Well, some 
  21. time ago I wrote a program called AutoAppMenu (it's in util/app on the 
  22. Aminet, as well as an Amiga Format subs disc). It just does a WBStartUp 
  23. type thing of reading the contents of the directory, and then using 
  24. AddAppMenuItemA to add them to the Tools menu so that you can run your 
  25. programs straight away. I use it myself quite regularly, although there 
  26. is something rather annoying about it. It deals with everything solely 
  27. through the command line. So what will happen is that if you were to run 
  28. Devpac, after clicking on three items of source code, Devpac would have 
  29. those programs (full paths) passed to it through the command line which 
  30. is fair enough. On the other hand, it does have some disadvantages. 
  31. Programs such as Wordworth will look in the current directory (which will 
  32. default to WBStartUp with AutoAppMenu) and thus not find anything. Deluxe 
  33. Paint will not parse it's tool types, and therefore will shut down the 
  34. Workbench whenever I load it. My idea is to write a program that will 
  35. take a series of command line arguments (namely icons that have been 
  36. clicked) and then convert that lot to make it look like a program has 
  37. been double-clicked with all those icons. It would also have tool types 
  38. specifying the default directory to point to. All that should be easy... 
  39. I hope.
  40.  
  41.     By the way, if you feel like sending me some source code, 
  42. I'll accept assembly language, C, C++, or AMOS. Thanks!
  43.  
  44. Andy E.
  45. --
  46. ------------------------------------------------------------------------
  47.     //
  48.    // What they conquer through ignorance, we conquer through knowledge
  49.  \X/
  50. ------------------------------------------------------------------------
  51.    E-Mail: odin@dcs.qmw.ac.uk  |  Web: http://www.dcs.qmw.ac.uk/~odin
  52. ------------------------------------------------------------------------
  53.