TIP: Click on subject to list as thread! ANSI
echo: os2user-l
to: All
from: Mike O`Connor
date: 2005-02-19 23:23:02
subject: Re: Program object - parameters help needed

Julian Thomas wrote:

>I've forgotten the syntax for the parameter field of a program object when
>you want to prompt for the parameters - with an explanatory message - and
>the help swamp doesn't easily give this up.
> 
>  
>

Hi Julian,

You're obviously not looking in the correct place! ;-)
Drag a new program object from the Templates folder, if you don't have a 
shadow on the desktop already.
Click in the parameters field first - then click HELP button or press F1!

Working through
"Parameters|About parameters|Typing Parameters to Start a Program"
you'll find the following: 

     If you want to type parameters each time you start
     a program, type a left bracket character, a space,
     and a right bracket character in the Parameters
     field, as follows:

       [ ]
     
     When you start the program object, you are then
     prompted to type the parameters you want to use.

     If you want a special set of characters to be
     displayed or want to be prompted by a special set
     of characters each time you start a program, type a
     left bracket, followed by the characters, followed by
     a right bracket.  For example, if you want to be
     prompted by the words "This is my text editor,"
     type

       [This is my text editor]
     
     The %* parameter is provided by the operating
     system.  It sends the drive letter and path and file
     name of a data file object to the program when it is
     opened.  The %* parameter enables you to open a
     data-file object at the same time you open a
     program object, in one of two ways.  You can drag
     the data-file object to the program object and drop
     it.  Or, you can open a data-file object that you
     associated to a program.  For more information,
     double-click >> Associating program and data-file
     objects.

     When you type parameters in the Parameters field,
     the operating system sends those parameters to the
     program object when it is opened and then sends
     the %* parameter.

     Take note: Some programs require that a
     program-specific parameter be the last parameter
     sent to the program object when it starts.  In that
     case, you must type %* somewhere before the
     program-specific parameter.

     For example, assume you have an editor that has a
     program object named My Favorite Editor.  You
     always want to open the program object with the
     program parameter NOTABS.  The program requires
     that the NOTABS parameter be the last one sent to
     the program object.  Therefore, you would type the
     following in the Parameters field:

       %* /notabs
     
     Assume that you have created a data-file object
     named ABC.TXT.  If you drag the icon for ABC.TXT
     and drop it on the icon for My Favorite Editor, the
     program object for the editor is opened with the
     NOTABS option and ABC.TXT is displayed.

     If you open My Favorite Editor (the program object)
     without dropping a data-file object over it, the %* is
     ignored and My Favorite Editor is opened with the
     NOTABS parameter.  No data-file object is displayed
     in My Favorite Editor.

that's all!

-- 
Regards,
Mike

Failed the exam for
--------------------
MCSE - Minesweeper Consultant and Solitaire Expert
--------------------
[ISP blocks *.exe, *.cmd, *.com, *.bat, *.reg attachments]
[Please use zipped versions of above]



 
Yahoo! Groups Links

 To visit your group on the web, go to:
    http://groups.yahoo.com/group/os2user/

 To unsubscribe from this group, send an email to:
    os2user-unsubscribe{at}yahoogroups.com

 Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 




---
* Origin: Waldo's Place USA Internet Gateway (1:3634/1000)
SEEN-BY: 633/267 270 5030/786
@PATH: 3634/1000 12 106/2000 633/267

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™.