TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: ED BLACKMAN
from: PHIL PATTENGALE
date: 1995-12-24 15:29:12
subject: Rexx & Program Objects...

-> That treats the symptoms, by loading VX00 in _every_ DOS shell.
-> There is a way to do what you asked: loading the program object for
-> your mailer from REXX.

Thank you for reading my question correctly! 8-)

-> In the RexxUtil function package that comes with OS/2, there's a
-> function called SysOpenObject() (assuming that you're using Warp -
-> if you're using OS/2 2.x, you can use SysSetObjectData()) that will
-> open a program object given its object ID.

Do you mean REXX?  Or is there a seperate program to run called
"RexxUtil" ???  Sorry for the lack of knowledge on my part in this
regard. (Yes, using warp, btw).

-> So what you need to do is create an object with an ID (OS/2
-> unfortunately doesn't supply one by default), and copy the settings
-> of your current object into the new object.

Do I use your code snippet to create this or is there something in
templates?

-> The following REXX script will create an object with the ID
->  if you run it with the parameter
"/CREATE", and will
-> open a default view of that object otherwise.

Does that answer my question above?

-> ---Begin MYMAILER.CMD-----don't-cut-here---you'll-ruin-your-monitor--
-> /* rexx */
->
-> objID = ''       /* Change to whatever you want */
->
-> /* load RexxUtil library - not necessary if loaded already -- I load
-> mine in STARTUP.CMD */
->
-> call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
-> call SysLoadFuncs
->
-> parse upper arg create rest
-> if create = '/CREATE' then
-> rc = SysCreateObject('WPProgram',, /* create a program object */
-> 'My Mailer',,          /* with this title */
-> '',,       /* on the desktop */
-> 'OBJECTID='objID,,     /* assign an object ID */
-> 'fail')                /* fail if the object exists */
-> else
-> rc = SysOpenObject(objID, default, 1)
-> ---End   MYMAILER.CMD-----don't-cut-here---you'll-ruin-your-monitor--

Ok, I think I understand this, but please confirm with answers to
questions above.

Next question then, do I just use the rc=SysOpenObject(objID, default,1)
line in my rexx code to reopen this?  Am I correct that I need to copy
my settings from the existing object (with no objID) to the newly
created object (with objID) and use the newly created on (I also have it
on the lauchpad)?

Many thanks!

Phil

--- GOMail v2.0 [94-0279]
* Origin: The Graphics Shop - Graphics & DOOM (v.34) (1:2201/23)
SEEN-BY: 270/101 620/243 711/401 409 410 413 430 808 809 934 955 712/407 515
SEEN-BY: 712/517 628 713/888 800/1 7877/2809
@PATH: 2201/23 200 3615/50 396/1 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.