"Funny". Yesterday a different test app killed and restarted SM (replace existing WPProgram object), or moved the previous session to the foreground (update existing WPProgram object). The last parameter of SysOpenObject() made no difference. Perhaps the cause was running out of memory!?
At least the test code below still doesn't open a new tab here. If I open a local HTML file with another WPProgram object, then it opens a new tab per opened HTML file.
Save TEST.CMD in the directory of SEAMONKEY.EXE, and execute TEST.CMD twice. Do not execute the created object Test 1. Delete this object afterwards.
The attached images may save you the troubles. Executing TEST.CMD (SEAMONKEY.EXE -search "stupid question") twice, while typing this, results in 3 SM sessions. Executing OpenURLs (SEAMONKEY.EXE openurls.html" twice, while typing this, results in 2 new tabs.
So if the parameter of a SEAMONKEY.EXE WPProgram object is a HTML file, it opens a new tab. If the parameter is "-search something", then it doesn't. With the same SM setup.
/* Test.CMD */
CALL RxFuncAdd 'SysCreateObject','RexxUtil','SysCreateObject'
CALL RxFuncAdd 'SysOpenObject','RexxUtil','SysOpenObject'
dir=Translate(Directory())
IF Stream('SEAMONKEY.EXE','C','QUERY EXISTS')='' THEN DO
SAY 'Error: SEAMONKEY.EXE not found in' dir
EXIT
END
setup='STARTUPDIR='||dir
IF Right(dir,1)<>'\' THEN dir=dir||'\'
setup=setup||';EXENAME='dir||'SEAMONKEY.EXE;PARAMETERS='
setup=setup||'-search "\"hello world\";OBJECTID=<Am_I_Wrong>'
IF SysCreateObject('WPProgram','Test 1','<WP_DESKTOP>',setup,'R')>0 THEN DO
CALL SysOpenObject '<Am_I_Wrong>','DEFAULT','TRUE'
END
EXIT
Of course I've traditionally deleted the source code of the original search app, which killed and restarted SM...