Misha Posted March 19, 2007 Posted March 19, 2007 so I tried doing _RunDos with a rasdial to see..but how do I get the output of cmd? or maybe I could get _GetIp and if @error then its not connected.. anyone done it?
SadBunny Posted March 19, 2007 Posted March 19, 2007 so I tried doing _RunDos with a rasdial to see..but how do I get the output of cmd?or maybe I could get _GetIp and if @error then its not connected..anyone done it?Output in CMD is AFAIK easiest to catch with StdoutRead(). Check it's help. Also you can make it write to a file (like "dir c:\ > test.txt") and then reading in the file. There are multiple ways to reach your goal. Roses are FF0000, violets are 0000FF... All my base are belong to you.
jinxter Posted March 19, 2007 Posted March 19, 2007 you could try to Ping ( address or hostname [, timeout] ) to a known reliable host (router, gateway, dns or whatever). It's not foolproof, but close. If you get a pong you're connected. > there are 10 types of people in the world, those who understand binary and those who don't.
Misha Posted March 19, 2007 Author Posted March 19, 2007 well 4 seconds if no respond then shot down script and software..is there a big chance of people to lag for 4 seconds?
SadBunny Posted March 19, 2007 Posted March 19, 2007 well 4 seconds if no respond then shot down script and software..is there a big chance of people to lag for 4 seconds?Depends mostly on if the people in question are using dialup or broadband lines, if they are using a lot of connections at the time (read 9/10 times: are running P2P sharing software) and if they are using a firewall, router, proxy, whatever might fook with your connection Roses are FF0000, violets are 0000FF... All my base are belong to you.
Misha Posted March 19, 2007 Author Posted March 19, 2007 (edited) well alright maybe something that I could ping is 100% online? Edited March 19, 2007 by Misha
SadBunny Posted March 19, 2007 Posted March 19, 2007 well alright maybe something that I could ping is 100% online?Well, you could check Jinxter's post for some suggestions to reliable hosts, or use www.google.com (which I have never found to be offline, always found to respond fast, and often use for the same purpose ) Roses are FF0000, violets are 0000FF... All my base are belong to you.
Moderators SmOke_N Posted March 19, 2007 Moderators Posted March 19, 2007 There were a few ideas here:http://www.autoitscript.com/forum/index.php?showtopic=40666 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
realski Posted March 20, 2007 Posted March 20, 2007 if u connect to specifi port .. try change this code .. if this app have tcp connection and need all time alive connection ... $check = Run(@ComSpec & ' /c netstat -n', '', @SW_HIDE, 2) $aa = StringRegExp(StdoutRead ($check), '(\d+.\d+.\d+.\d+:5666\s*USTANOWIONO)', 3) IF IsArray($aa) Then call("do_something") endif USTANOWIONO is polish word .. like connected or somthing like that check netstat -n gl
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now