🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

4 total messages Started by Keith Bennett Fri, 14 Jun 1996 00:00
How to Open Object from a Command Line?
#4920
Author: Keith Bennett
Date: Fri, 14 Jun 1996 00:00
19 lines
1210 bytes
A while back I remember seeing a Rexx command that would open a
desktop object from the command line.

I think it was only one or two lines of code.

Can anyone point me to it or let me know what should be in it?

Also, if I have a desktop object, how do I get the object's name for
the function call?  Is it the caption for the object or something else?

Thanks for any help.
- Keith

-- 
--------------------------------------------------------------------------
Keith Bennett                             Bennett Business Solutions, Inc.
Silver Spring, MD USA                     OS/2 & DOS Software Development
kbennett@cpcug.org                        (301) 871-7696
Re: How to Open Object from a Command Line?
#4918
Author: Dave Rupp
Date: Mon, 17 Jun 1996 00:00
81 lines
2769 bytes
In <4ps11a$ffd@cpcug.org>, kbennett@cpcug.org (Keith Bennett) writes:
>A while back I remember seeing a Rexx command that would open a
>desktop object from the command line.
>[snip]
>--------------------------------------------------------------------------
>Keith Bennett                             Bennett Business Solutions, Inc.
>kbennett@cpcug.org                        (301) 871-7696

Keith,
This may not be exactly what you were talking about, but here is some REXX code
I got from this newsgroup a while back.


/* REXX  */
/* Open folder on desktop from command-line */
/* (c) Copyright 1994 Scott Maxwell.        */
/* Note: If you installed this with WUZ, this file */
/*       may have also been created as OD.CMD      */
/*       In that case, you can easily open folders */
/*       on your desktop by typing something like  */
/*       'od c:\os2'                               */
 
arg Name Options
 
if (Left(Name,1) = '/') | (Left(Name,1) = '-') then do
  swap = Name
  Name = Options
  Options = swap
  end
 
if Options \= '' then
  if (Options \= '/C') & (Options \= '-C') then do
    say "USAGE: Open-Dir [-c] [directory-name]"
    say "  Opens the specified directory as a folder on the desktop"
    say "  If no directory-name is specified, the current directory is opened"
    say "  If -c option is specified, the current directory is changed"
    exit(0)
    end
 
Dir.1 = DIRECTORY()
Dir.2 = ''
if Name \= '' then
  if SubStr(Name,2,1) = ':' then do
    Dir.2 = DIRECTORY(Left(Name,2))
    Name = SubStr(Name,3)
    end
 
Name = Directory(Name)
 
CALL RxFuncAdd 'SysSetObjectData','RexxUtil','SysSetObjectData'
CALL SysSetObjectData Name,"OPEN=ICON"
if Options = '' then do
  if Dir.2 \= '' then call Directory(Dir.2)
  call Directory(Dir.1)
  end
 
exit(0)
 
 
Directory: procedure
  arg Name
  if Length(Name) > 3 then
    if Right(Name,1) = '\' then
      Name = Left(Name,LENGTH(Name)-1)
 
  n = 'DIRECTORY'(Name)
  return n




Dave Rupp
Texas Instruments
Distributed Network Services
Dallas, Texas  USA
(214)575-4277
(214)575-5522 FAX
/ADMD=MCI/PRMD=TI/C=US/G=DAVID/I=M/S=RUPP
drupp@ti.com
http://www.ti.com/
Re: How to Open Object from a Command Line?
#4919
Author: Jeremy Mathers
Date: Mon, 17 Jun 1996 00:00
30 lines
1923 bytes
In article <4ps11a$ffd@cpcug.org>, Keith Bennett <kbennett@cpcug.org> wrote:
>A while back I remember seeing a Rexx command that would open a
>desktop object from the command line.
>
>I think it was only one or two lines of code.
>
>Can anyone point me to it or let me know what should be in it?
>
>Also, if I have a desktop object, how do I get the object's name for
>the function call?  Is it the caption for the object or something else?

	1) I just did the following and it worked splendidly:

		rexxtry say syssetobjectdata('^<IAK_WEB^>','OPEN=DEFAULT;')

	   It gave 1 as the result and opened up the Web Ex as a side effect.
	   (The ^'s are to protect the <>'s from the shell)

	2) No, its kinda black magic (getting the ObjectID).  The
	   easiest way to do it is to install and run WPS2Rexx, and then
	   persue the output it creates.  That's how I found <IAK_WEB>.

************************************************************************
To be intoxicated is to feel sophisticated but not be able to say it.

	- pynq@quads.uchicago.edu, who is still costing the net
	  hundreds, if not thousands, of dollars, every time he posts -
************************************************************************
rwvpf wpnrrj ibf ijrfer
Re: How to Open Object from a Command Line?
#4917
Author: bentley
Date: Wed, 19 Jun 1996 00:00
33 lines
1684 bytes
> In <4ps11a$ffd@cpcug.org>, kbennett@cpcug.org (Keith Bennett) writes:
> >A while back I remember seeing a Rexx command that would open a
> >desktop object from the command line.
> >[snip]
> >--------------------------------------------------------------------------
> >Keith Bennett                             Bennett Business Solutions, Inc.
> >kbennett@cpcug.org                        (301) 871-7696


Keith,

Here is the script that I use to oopen the startup folder.  I then have 
the script referenced in my menu section of the desktop settings.  I also do
the same for the templates folder.

-----

/*  Same as double clicking the object                  */
'@ECHO OFF'
call RxFuncAdd 'SysSetObjectData', 'RexxUtil', 'SysSetObjectData'

rc = SysSetObjectData('<WP_START>','OPEN=DEFAULT');
if rc then rc = SysSetObjectData('<WP_START>','OPEN=DEFAULT');
if rc then say opening Startup Folder

exit 0

-----

// Eric Bentley
// OS/2 Certified Engineer
// bentley@hcgl.eng.ohio-state.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads