Re: how to Open notepad with a command-line argument



On May 19, 10:12 pm, "ekkehard.horner" <ekkehard.hor...@xxxxxxxx>
wrote:
Daz schrieb:

I would like to keep this as simple as i can and so if I can work with
the format below it would be very helpful.  I am very new to VBscript
and am finding my way as i go.

 If WScript.Arguments.Named.Exists( "e" ) Then
      CreateObject( "WScript.Shell" ).Run "notepad"
   Else
      WScript.Echo "no no"
   End If

Cheers!

As the options you want to work with

   <yourscript>.vbs /c:"something else here" /u:"a reference here"

aren't simple boolean (yes/no) switches like in

   <yourscript>.vbs /e

you can't just check whether the user entered an option name (e.g. /c) but
you have to read/store/work with the option value (e.g. "something else here").

I C - well basically with both the /c:"something else here" /u:"a
reference here" i want to set a variable if they are used...
Suggestions?
.



Relevant Pages

  • Re: date field as sql table key
    ... >>> Using VBscript. ... I would like to use a date field with the format ... Private Declare Sub GetLocalTime Lib "kernel32" (lpSystemTime As SYSTEMTIME) ... Public Function GetTimeAsString() As String ...
    (microsoft.public.vb.general.discussion)
  • Re: Problem in the data of the file in the FTP after the saving of ex
    ... format to General? ...     Widen the column or change the font size of that cell. ... The application when it copies the abcd.xls Sheet1 data to app.xls ...
    (microsoft.public.excel.misc)
  • Re: How format scsi HDD... help!
    ... allowing to format this disc in this compilation. ... disc HDD, without this tool? ... Save the hdd descriptor to disk. ...   to include formattable descriptors in the bootfile but most ...
    (comp.os.os9)
  • Re: Problem in the data of the file in the FTP after the saving of ex
    ... then excel will treat the value as a date and change the number format. ... helps with the FTP upload. ...     numberformat to General. ... Sheet1, Sheet2 of abcd.xls to the application excel file ideally ...
    (microsoft.public.excel.misc)
  • Re: UK Date format
    ...     International Date Formats in Access ... I'm not clear what dFindSite and FindSite are in your code. ... help Access understands the data type. ... Format$() outputs), and then back to a date value again is unproductive, ...
    (comp.databases.ms-access)