i need help with 'wscript.run' 
Author Message
 i need help with 'wscript.run'

i have an external executable that will do paging.  
it is 'nvpage.exe'.  
the cmd line looks like this:

i'm trying to use it in a .vbs.  the pager number will be a variable
and the message will be a variable.  the wscript syntax looks like
this:

this will work perfect.  but when i try using variables i can't get it
right to make it work. example:

space=chr(32)
pager="1234567"
msg="This is my text message."
ending=chr(34) + chr(41) ' this is the ending characters= ")


anybody know how to handle this so i can use variables?

tia



Wed, 29 May 2002 03:00:00 GMT  
 i need help with 'wscript.run'
Try:

Regards

G. Born

Check out the WSH Bazaar at:

http://ourworld.compuserve.com/homepages/Guenter_Born/index0.htm

No Email schrieb in Nachricht

Quote:
>i have an external executable that will do paging.
>it is 'nvpage.exe'.
>the cmd line looks like this:

>i'm trying to use it in a .vbs.  the pager number will be a variable
>and the message will be a variable.  the wscript syntax looks like
>this:

>this will work perfect.  but when i try using variables i can't get it
>right to make it work. example:

>space=chr(32)
>pager="1234567"
>msg="This is my text message."
>ending=chr(34) + chr(41) ' this is the ending characters= ")


>anybody know how to handle this so i can use variables?

>tia



Wed, 29 May 2002 03:00:00 GMT  
 i need help with 'wscript.run'
Try this:

Dim sCommand, sPager, sMsg, sProgram, sDomain

sProgram = "nvpage.exe"
sPager = "1234567"

sMsg=""This is my text message.""    ' Please note double quotes!

sCommand = sProgram & " " & sPager & sDomain & " " & sMsg
wscript.run( sCommand )

I didn't test it, but it should work.

Fernando


Quote:
> i have an external executable that will do paging.
> it is 'nvpage.exe'.
> the cmd line looks like this:

> i'm trying to use it in a .vbs.  the pager number will be a variable
> and the message will be a variable.  the wscript syntax looks like
> this:

> this will work perfect.  but when i try using variables i can't get it
> right to make it work. example:

> space=chr(32)
> pager="1234567"
> msg="This is my text message."
> ending=chr(34) + chr(41) ' this is the ending characters= ")


> anybody know how to handle this so i can use variables?

> tia



Wed, 29 May 2002 03:00:00 GMT  
 i need help with 'wscript.run'

Space is a function and can't be used as a variable name.


: i have an external executable that will do paging.
: it is 'nvpage.exe'.
: the cmd line looks like this:

:
: i'm trying to use it in a .vbs.  the pager number will be a variable
: and the message will be a variable.  the wscript syntax looks like
: this:

:
: this will work perfect.  but when i try using variables i can't get
it
: right to make it work. example:
:
: space=chr(32)
: pager="1234567"
: msg="This is my text message."
: ending=chr(34) + chr(41) ' this is the ending characters= ")
:

:
: anybody know how to handle this so i can use variables?
:
: tia



Wed, 29 May 2002 03:00:00 GMT  
 i need help with 'wscript.run'
wscript.run?  What is that?

--
Bill James

Free Win9x VBScript Utilities
http://home.earthlink.net/~wgjames/vbspage/


Quote:
> i have an external executable that will do paging.
> it is 'nvpage.exe'.
> the cmd line looks like this:

> i'm trying to use it in a .vbs.  the pager number will be a variable
> and the message will be a variable.  the wscript syntax looks like
> this:

> this will work perfect.  but when i try using variables i can't get it
> right to make it work. example:

> space=chr(32)
> pager="1234567"
> msg="This is my text message."
> ending=chr(34) + chr(41) ' this is the ending characters= ")


> anybody know how to handle this so i can use variables?

> tia



Wed, 29 May 2002 03:00:00 GMT  
 i need help with 'wscript.run'

I asked the same thing on the copy of this question posted over in the vbscript ng...

I _do_ wish people would learn to cross-post (reasonably of course ;-)...

--
Michael Harris


  wscript.run?  What is that?

  --
  Bill James

  Free Win9x VBScript Utilities
  http://home.earthlink.net/~wgjames/vbspage/



  > i have an external executable that will do paging.
  > it is 'nvpage.exe'.
  > the cmd line looks like this:

  >
  > i'm trying to use it in a .vbs.  the pager number will be a variable
  > and the message will be a variable.  the wscript syntax looks like
  > this:

  >
  > this will work perfect.  but when i try using variables i can't get it
  > right to make it work. example:
  >
  > space=chr(32)
  > pager="1234567"
  > msg="This is my text message."
  > ending=chr(34) + chr(41) ' this is the ending characters= ")
  >

  >
  > anybody know how to handle this so i can use variables?
  >
  > tia



Wed, 29 May 2002 03:00:00 GMT  
 i need help with 'wscript.run'
it creates a new process that executes 'strCommand'

Example
The following example runs Microsoft Notepad and opens the currently
running script:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run ("%windir%\notepad" & WScript.ScriptFullName)
The following example returns the error code from the executed
application:
Set WshShell = WScript.CreateObject("WScript.Shell")
Return = WshShell.Run("notepad " & WScript.ScriptFullName, 1, TRUE)

i use it mostly for Windows NT 'NET SEND', 'MAILTO', and 'NVPAGE,
which are messaging programs on my local area network.

On Sat, 11 Dec 1999 13:27:00 -0700, "Bill James"

Quote:

>wscript.run?  What is that?



Thu, 30 May 2002 03:00:00 GMT  
 i need help with 'wscript.run'

So it was a typo in your original post that had "wscript.run(...)"...

--
Michael Harris

  it creates a new process that executes 'strCommand'

  Example
  The following example runs Microsoft Notepad and opens the currently
  running script:
  Set WshShell = WScript.CreateObject("WScript.Shell")
  WshShell.Run ("%windir%\notepad" & WScript.ScriptFullName)
  The following example returns the error code from the executed
  application:
  Set WshShell = WScript.CreateObject("WScript.Shell")
  Return = WshShell.Run("notepad " & WScript.ScriptFullName, 1, TRUE)

  i use it mostly for Windows NT 'NET SEND', 'MAILTO', and 'NVPAGE,
  which are messaging programs on my local area network.

  On Sat, 11 Dec 1999 13:27:00 -0700, "Bill James"

  >wscript.run?  What is that?



Fri, 31 May 2002 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. i need help with 'wscript.run'

2. Run-time error '91' - HELP

3. HELP needed with 'eoclip' error message

4. WScript.GetObject doesn't get running Word App

5. WScript don't run under Win95 ???

6. WScript.Shell Run Doesn't Work???

7. Wscript.shell Run doesn't work

8. Script won't run with WSCRIPT/CSCRIPT

9. WScript don't run under Win95 ???

10. WScript.GetObject doesn't get running Word App

11. Run-time error '429': ActiveX component can't create object

12. Error: object required: 'WScript'

 

 
Powered by phpBB® Forum Software