cd Desktop
cd "OS!2 System"
icon
where icon.cmd is the Rexx program below (I use
Classic Rexx and haven't tested it on Object Rexx).
This won't fix your problem but will indicate
if the System object can be opened.
- Peter
_____
ICON.CMD FOLLOWS (first line *must* be the "/*" one):
/* -----------------------------------------------------------------------
/ The Icon command file opens a Workplace Shell folder for the current
/ or a specified directory.
/ "Opens a folder from the command line. Neat!" - The Duck.
/ Syntax is ICON [FOLDERPATH]
/ where FOLDERPATH is optional and is the full path to the directory.
/ Examples: ICON
/ ICON C:\TEMP
/ Written by Peter Skye. Original concept by Rick Curry.
/ NOTE: Tested on Classic Rexx. Not tested on Object Rexx.
/---------------------------------------------------------------------- */
"@echo off"
if RxFuncQuery( "SysOpenObject" ) then do
rc = RxFuncAdd( "SysOpenObject", "RexxUtil", "SysOpenObject" )
if rc \= 0 then do
say "REXX SETUP ERROR - RxFuncAdd(SysOpenObject) failed"
"pause"
exit
end
end
/* Get command line parameter, if any. Full path required (c:\path). */
parse arg dir TooMuch
if TooMuch \= "" then do
say "ERROR - too many parameters, cannot have" TooMuch
"pause"
exit
end
/* If no parameter, default to current directory. */
if dir = "" then do
tfDefaultDirectory = 1
dir = directory()
end
else tfDefaultDirectory = 0
/* Open the window as an icon view. */
view = "ICON"
/* Open the object.
/ - The first call opens the folder.
/ - The second call gives it the focus ("pops it to the foreground"). */
rc = SysOpenObject( dir, view, 1)
if rc \= 1 then do
say "ERROR on first SysOpenObject (rc="rc")"
if tfDefaultDirectory = 0 then do
say "Make sure the path you specified is:"
say " - complete (including drive letter)"
say " - valid"
end
"pause"
exit
end
rc = SysOpenObject( dir, view, 1)
if rc \= 1 then do
say "Error on second SysOpenObject (rc="rc")"
"pause"
exit
end
exit
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-help".
For problems, contact the list owner at
"rollin@scoug.com".
=====================================================
<< Previous Message <<
>> Next Message >>
Return to [ 16 |
December |
2001 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.