Source language: Translate to:

tmPing Conflict

Questions about NeoBook PlugIns

Moderator: Neosoft Support

tmPing Conflict

Postby ajhunt » Wed May 18, 2016 2:14 am

Hi all, I have a problem with tmPing as it conflicts with another plugin and neobook app hangs on sartup. I need to check that there is an actual internet connection out to the world, not just that an internet connection is ok. I want to Ping an address so know for certain that the www is available. I can't use the Windows Ping command and search for results in the text as app will be used in various countries and therefore different text language to scan to check. Any suggections guys. Many thanks as always for any help.
ajhunt
 
Posts: 222
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom

Re: tmPing Conflict

Postby dpayer » Wed May 18, 2016 7:04 am

ajhunt wrote:Hi all, I have a problem with tmPing as it conflicts with another plugin and neobook app hangs on sartup. I need to check that there is an actual internet connection out to the world, not just that an internet connection is ok. I want to Ping an address so know for certain that the www is available. I can't use the Windows Ping command and search for results in the text as app will be used in various countries and therefore different text language to scan to check. Any suggections guys. Many thanks as always for any help.


Honestly, aren't you a bit worried about using unsupported plugins for something that will go out to the world? Alberto Meyer has been a great friend to us Neobookers but his work is no longer supported and I doubt it ever will be passed on to another to continue. You may get it to work in this moment but another revision of your program could go dead if you rely on it.

For hobby purposes, is see no problem but I don't think you can rely on unsupported plugins for anything done professionally.
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1382
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: tmPing Conflict

Postby ajhunt » Wed May 18, 2016 9:13 am

Hi David, thanks for your reply. Listened to your advice and have decided to do it a different way by downloading and existing file and testing if downloaded successfully. Many thanks.
ajhunt
 
Posts: 222
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom

Re: tmPing Conflict

Postby Gaev » Wed May 18, 2016 11:13 am

ajhunt:

I need to check that there is an actual internet connection out to the world, not just that an internet connection is ok. I want to Ping an address so know for certain that the www is available. I can't use the Windows Ping command and search for results in the text as app will be used in various countries and therefore different text language to scan to check.

For a successful ping, you get a response like this ...
Pinging fd-fp3.wg1.b.yahoo.com [98.139.180.149] with 32 bytes of data:
Reply from 98.139.180.149: bytes=32 time=32ms TTL=54
Reply from 98.139.180.149: bytes=32 time=60ms TTL=54
Reply from 98.139.180.149: bytes=32 time=42ms TTL=54
Reply from 98.139.180.149: bytes=32 time=33ms TTL=54

Ping statistics for 98.139.180.149:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 32ms, Maximum = 60ms, Average = 41ms

... and for a non existent one, you get ...
Ping request could not find host http://www.yahoox.com. Please check the name and try again.


I do not know of the response in Spanish (or Swahili) ... but it looks like you could determine the success/error situation just from the number of lines of response ... what text would you be looking for in your determination ?
User avatar
Gaev
 
Posts: 3728
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: tmPing Conflict

Postby ajhunt » Wed May 18, 2016 10:55 pm

Hi Gaev, what a great idea. No wonder your an expert as you think outside the box. Many many thanks a super way of doing it. Best regards Anthony.
ajhunt
 
Posts: 222
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom

Re: tmPing Conflict

Postby ajhunt » Wed May 18, 2016 11:52 pm

Hi again Gaev, can you please please help. When using FileWrite to write a batch file (Ping.bat) to write the command "Ping -n2 63.247.87.242 > Ping.txt" and then using the Run command to run the Ping.bat file it produces the file Ping.txt but with a blank line and then "C:\EasyBooth>Ping -n2 63.247.87.242 1>Ping.txt " and not the result of the Ping.bat file. For some reason it adds a 1 before the output direction >. I've always used .bat files to run external commands. I'm on Windows 10, could this be the problem or am I doing something wrong in writing the file and running it? Any help really appreciated Gaev.
ajhunt
 
Posts: 222
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom

Re: tmPing Conflict

Postby Gaev » Thu May 19, 2016 6:21 am

ajhunt:

When using FileWrite to write a batch file (Ping.bat) to write the command "Ping -n2 63.247.87.242 > Ping.txt" and then using the Run command to run the Ping.bat file it produces the file Ping.txt but with a blank line and then "C:\EasyBooth>Ping -n2 63.247.87.242 1>Ping.txt " and not the result of the Ping.bat file. For some reason it adds a 1 before the output direction >.


1) I tried using your values in a DOS session (on my Windows 10 machine)

a) Ping -n2 63.247.87.242 > Ping.txt resulted in an error message "IP address must be specified."

b) Ping -n 2 63.247.87.242 > Ping.txt (note the space after -n) resulted in this ...

Pinging 63.247.87.242 with 32 bytes of data:
Reply from 63.247.87.242: bytes=32 time=39ms TTL=55
Reply from 63.247.87.242: bytes=32 time=42ms TTL=55

Ping statistics for 63.247.87.242:
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 39ms, Maximum = 42ms, Average = 40ms

1) Please copy/paste your exact NeoBook commands.

2) if you have a text editor (other than notepad), use it to view both files ... then copy/paste here ... otherwise, use notepad.

3) when doing your FileWrite, did you remember to use the ! character before the "Ping -n 2 63.247.87.242 > Ping.txt" ?
User avatar
Gaev
 
Posts: 3728
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: tmPing Conflict

Postby ajhunt » Thu May 19, 2016 9:36 am

Hi again Gaev,

This is what gets written to the Ping.bat file when writing file: FileWrite "C:\EasyBooth\Ping.bat" "All"

Ping -n 2 63.247.87.242 > Ping.txt" (which is all correct)

But when running the Ping.bat file with Run command: Run "!C:\EasyBooth\Ping.bat" "" "Normal" "" ""

It displays the Windows cmd screen window with the command:

"Ping -n 2 63.247.87.242 1> Ping.txt

with a blank line first. No idea where the 1 is comming from. Any ideas Gaev?

Thanks for your help. Could I run this straight from the Action Command instead of creating the .bat file and running that ?
ajhunt
 
Posts: 222
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom

Re: tmPing Conflict

Postby Gaev » Thu May 19, 2016 1:03 pm

ajhunt:

But when running the Ping.bat file with Run command: Run "!C:\EasyBooth\Ping.bat" "" "Normal" "" ""
It displays the Windows cmd screen window with the command:
"Ping -n 2 63.247.87.242 1> Ping.txt
No idea where the 1 is comming from.

Take a look at the article on this page ... http://blog.crankybit.com/redirecting-o ... h-scripts/

In DOS, the stdout stream is referenced by 1 and stderr is referenced by 2 ... when you do not specify the stream number, it defaults to 1 ... looks like (when you run the command from the bat file) it is automatically inserting the stream number.

with a blank line first.

if you run the ping command (with the redirection) from a command prompt ... and then do TYPE Ping.txt ... you will notice the blank line before the others ... however, if you specify an invalid ip address (e.g. http://www.yahoo999.com), the error message does NOT contain a blank line ... just another quirk in the way dos/ping operate ... at least, it is consistent.
User avatar
Gaev
 
Posts: 3728
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: tmPing Conflict

Postby ajhunt » Thu May 19, 2016 11:00 pm

Thankyou Gaev, very helpfull and solved. Thankyou again for your time and help.
ajhunt
 
Posts: 222
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom


Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 1 guest