Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Sending a DOS Ping Command with variables

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sending a DOS Ping Command with variables

    HI
    I use A5 Ver 9 to track customers for our Wireless Internet Company. One of the first things we do when a customer calls and says his internet is not working is open an IP browse table that has Customer_Name, Radio_IP, Static_IP and a few other fields. When the browse table opens we have it sort by last name so all we have to do is "find by key" and type the last name. We then open up a DOS window and send a ping command to the customers Radio IP address and or his Static Ip address. My plan is make a custom toolbar that has a tool button to run an action script that opens up a DOS window and and automatically inputs the ping command and the IP Address. I've tried using the Get Field Value for the Radio_IP field and saving it as a variable and using the Send Keys to an external Program window(CMD) but am not having any luck getting this to work.

    Does any one have any suggestions as a simple way to do this?
    Ben

  • #2
    Re: Sending a DOS Ping Command with variables

    You can copy anything to the clipboard.. BUT.. DOS?
    I don't believe you could paste in DOS!

    You could use the SYS_SEND_KEYS(), but that means yo have to parse the IP to it's component digits. Not difficult. Perhaps best accomplish with a function. But I gotta ask: DOS?

    Comment


    • #3
      Re: Sending a DOS Ping Command with variables

      DOS is the quickest way to see if a network device is alive. Do you have a better way?

      Comment


      • #4
        Re: Sending a DOS Ping Command with variables

        No.. I really don't since I don't tinker with wireless phones, but alpha does have functions to test if a connection is open albeit there were some issues with that. There was a thread few month back dealing with this issue and some work-around.

        Comment


        • #5
          Re: Sending a DOS Ping Command with variables

          I said earlier "I don't believe you can paste in DOS"..
          Let me take that back.. I think you could use F3 to paste in DOS.

          Comment


          • #6
            Re: Sending a DOS Ping Command with variables

            Originally posted by benwirch View Post
            HI
            I use A5 Ver 9 to track customers for our Wireless Internet Company. One of the first things we do when a customer calls and says his internet is not working is open an IP browse table that has Customer_Name, Radio_IP, Static_IP and a few other fields. When the browse table opens we have it sort by last name so all we have to do is "find by key" and type the last name. We then open up a DOS window and send a ping command to the customers Radio IP address and or his Static Ip address. My plan is make a custom toolbar that has a tool button to run an action script that opens up a DOS window and and automatically inputs the ping command and the IP Address. I've tried using the Get Field Value for the Radio_IP field and saving it as a variable and using the Send Keys to an external Program window(CMD) but am not having any luck getting this to work.

            Does any one have any suggestions as a simple way to do this?
            Ben
            Write to a bat file(it's a simple text file) with A5 so the commands that you want are in the bat file and have A5 execute the bat file with a sys_shell_wait(). The results can be directed from the bat file into another file. A5 can read the results file.
            Al Buchholz
            Bookwood Systems, LTD
            Weekly QReportBuilder Webinars Thursday 1 pm CST

            Occam's Razor - KISS
            Normalize till it hurts - De-normalize till it works.
            Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
            When we triage a problem it is much easier to read sample systems than to read a mind.
            "Make it as simple as possible, but not simpler."
            Albert Einstein

            http://www.iadn.com/images/media/iadn_member.png

            Comment


            • #7
              Re: Sending a DOS Ping Command with variables

              Ben, have a look at this.

              I did a search on Windows based ping commands and found fping which can take a file for hosts and can output a log file.

              You'll need to change the paths in the OnPush event of the button in the form but generally it may get you to what you need.

              Comment


              • #8
                Re: Sending a DOS Ping Command with variables

                Actually Yes, You can copy to DOS.
                Highlight any word in Windows, Run CMD and at the dos window, click on the little C:\ at the top frame bar and select edit then paste.
                You will see you copy pasted.
                It works with lots of programs within the frame.

                Comment


                • #9
                  Re: Sending a DOS Ping Command with variables

                  Originally posted by Davidk View Post
                  Ben, have a look at this.

                  I did a search on Windows based ping commands and found fping which can take a file for hosts and can output a log file.

                  You'll need to change the paths in the OnPush event of the button in the form but generally it may get you to what you need.
                  David

                  Thanks for the code and program.

                  Replacing this code in the 'Ping' button's onpush event works in any directory and may make it easier for someone to test..

                  Code:
                  save_to_file(varPing, a5.get_path()+chr(92)+"TryPing.txt")
                  CMD=a5.get_path()+chr(92)+"fping.exe -H "+ a5.get_path()+chr(92)+"TryPing.txt -L "+a5.get_path()+chr(92)+"logping.txt"
                  x = sys_shell_wait(CMD,.t.)
                  CMD="c:\windows\notepad.exe " + a5.get_path()+chr(92)+"logping.txt"
                  x = sys_shell_wait(CMD, .t.)
                  Al Buchholz
                  Bookwood Systems, LTD
                  Weekly QReportBuilder Webinars Thursday 1 pm CST

                  Occam's Razor - KISS
                  Normalize till it hurts - De-normalize till it works.
                  Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                  When we triage a problem it is much easier to read sample systems than to read a mind.
                  "Make it as simple as possible, but not simpler."
                  Albert Einstein

                  http://www.iadn.com/images/media/iadn_member.png

                  Comment


                  • #10
                    Re: Sending a DOS Ping Command with variables

                    You beat me to it Al... was just going to look at that... nice - that makes it much easier. I was working fast last night, just wanted to hit the sack after 3 long days at a fitness conference.

                    Comment


                    • #11
                      Re: Sending a DOS Ping Command with variables

                      Originally posted by Davidk View Post
                      You beat me to it Al... was just going to look at that... nice - that makes it much easier. I was working fast last night, just wanted to hit the sack after 3 long days at a fitness conference.
                      np - I'll leave it to the next guy (or you) to make it a function with parameters... ;)
                      Al Buchholz
                      Bookwood Systems, LTD
                      Weekly QReportBuilder Webinars Thursday 1 pm CST

                      Occam's Razor - KISS
                      Normalize till it hurts - De-normalize till it works.
                      Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                      When we triage a problem it is much easier to read sample systems than to read a mind.
                      "Make it as simple as possible, but not simpler."
                      Albert Einstein

                      http://www.iadn.com/images/media/iadn_member.png

                      Comment


                      • #12
                        Re: Sending a DOS Ping Command with variables

                        Co-operative coding... excellent!

                        Comment


                        • #13
                          Re: Sending a DOS Ping Command with variables

                          Forget DOS commands, this can be done within Alpha Five Version 8 and up;

                          Code:
                          dim ptr as p
                          ?ping("www.csda1.com",ptr)
                          = .T.
                          ?ptr
                          = Bytes = 32
                          StatusCode = 0
                          StatusText = "Success"
                          Text = "www.csda1.com (68.178.254.95) is responding"
                          Time = 106
                          TTL = 110
                          
                          dim ptr as p
                          ?ping("www.junkaddress.com",ptr)
                          = .F.
                          ?ptr
                          = Bytes = 0
                          StatusCode = 11010
                          StatusText = "Request Timed Out"
                          Text = "www.junkaddress.com is not responding"
                          Time = 0
                          TTL = 0
                          Regards,

                          Ira J. Perlow
                          Computer Systems Design


                          CSDA A5 Products
                          New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
                          CSDA Barcode Functions

                          CSDA Code Utility
                          CSDA Screen Capture


                          Comment


                          • #14
                            Re: Sending a DOS Ping Command with variables

                            Ira

                            Good catch. So the first thing I do is try it and no joy.... (ole automation error)

                            Then I remember I'm on an older computer running W2000 - move to an XP computer and it works as advertised...

                            I do like all of the switches on the ping and the even more switches on the jping...
                            Al Buchholz
                            Bookwood Systems, LTD
                            Weekly QReportBuilder Webinars Thursday 1 pm CST

                            Occam's Razor - KISS
                            Normalize till it hurts - De-normalize till it works.
                            Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                            When we triage a problem it is much easier to read sample systems than to read a mind.
                            "Make it as simple as possible, but not simpler."
                            Albert Einstein

                            http://www.iadn.com/images/media/iadn_member.png

                            Comment

                            Working...
                            X