[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Shell syntex & Dial-up monitoring

Posted on 1998-06-16
6
Medium Priority
?
259 Views
Last Modified: 2013-11-13
Two Questions: 1) Is it possible with the Shell command to allow command line
arguments to be taken from a Textbox? Example: Shell("App.exe "Text1", 1)
Text1 being user input data to be added to the Shell command line. I noticed
that Shell command won't read it?

2) I like a reliable method for dialing & monitoring the winsock connection 98/NT
and if lost, redial any number of times till the connection is re-established. While
the connection is active, ping every 5 mins incase of inactivity to prevent premature disconnection.

Looking forward to a wonderful reply from one of you VB guru's.
0
Comment
Question by:Capital1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 

Author Comment

by:Capital1
ID: 1463374
Edited text of question
0
 

Author Comment

by:Capital1
ID: 1463375
Edited text of question
0
 
LVL 18

Expert Comment

by:deighton
ID: 1463376
Shell("App.exe " +  Text1, 1)
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 2

Expert Comment

by:Biffo
ID: 1463377
Proper syntax for what you want is to predfine the commands outside of the shell command line or VB will trip out and puke:

'Besure to add a extra space with last  " to space the Text1 input out
EX = "App.exe " & Text1
'Then go ahead and Shell as:

Shell(EX, 1)

0
 
LVL 2

Accepted Solution

by:
Biffo earned 400 total points
ID: 1463378
I'm sorry, I should had answered your questioned when I commented earlier on your Shell question.  I'll cover your question #2 since internet programming is one of specialities.

There is a number of ways of accomplishing what you want, some more involved than others. I'll direct you to perhaps the most straight forward way and by far the most easiest and best documented. Go to Catalyst Developement home web site at: www.catalyst.com and download
their SocketWrench kit. Note: SocketWrench, not their SocketTool kit since that cost $$ to use whereas SocketWrench is FREE and you can do whatever you want with it.

Install. It comes with CSRAS32.OCX and CSPING32.OCX. Load the sample VB5 Stdialer form, you can work off that as your project. Essentially you can follow your nose with developing it with the help topics that come with it to your needs. Example to have it reconnect automatically when disconneted you could add this to the form:


Private Sub Dialer1_Disconnect()
   
    If Dialer1.Connected = False Then
    Call ActionButton_Click
    End if

If you have AutoUpdate in properties set to True, then as soon as it loses connection it will immediately redial. AutoUpdate monitors the connection every second I beleive with the default interval setting.  You can then drop in the CSPING32.OCX  and set the interval to whater you like, say ping every 2 or 5 minutes with some code like:

Private Sub PingHostAddress()
    'Start up the Ping control on a host

    Ping1.hostaddress = hostaddress
    Ping1.Blocking = True
    Ping1.Interval = 1000
    Ping1.Enabled = True

End Sub

See the Netcheck sample project for ping info and usage.  This will do it, you will be able to build a dialer and have it do whatever you want using SocketWrench.

 -Jim

0
 

Author Comment

by:Capital1
ID: 1463379
Great !!!!!!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question