EndFunc Posted September 6, 2007 Share Posted September 6, 2007 I can't figure out how you would compare an IPAddress of a machine to a range or subnet it belongs to. Maybe someone can shed some light? EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
Xenobiologist Posted September 6, 2007 Share Posted September 6, 2007 Hi, where is the problem? Just compare the numbers. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
EndFunc Posted September 6, 2007 Author Share Posted September 6, 2007 Hi,where is the problem? Just compare the numbers.So long,MegaI guess I can do single IP's but wasn't sure how to do a range if it was possible. EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
methodclass Posted November 16, 2007 Share Posted November 16, 2007 (edited) I guess I can do single IP's but wasn't sure how to do a range if it was possible. im doing the exact same thing. without giving you my source (which is being used in a bigger project), the way i went about it was; 1) split @ipaddress1 into four different variables (i put them into an array) you can do this with a for..then loop and stringmid() 2) big 'if..then' or 'case..select' blocks to determine where the user is running the program from ie. if $octetarray[0]="10" then if $octetarray[1]="56" then if $octetarray[2]="62" then $location = "... Area Office" and for subnetting where more than one network is on the one c class (ie. network 1 is 100.10.10.1-127, network 2 is 100.10.10.128-254) if $octetarray[3]=>96 AND $octetarray[3]=<126 then $location="... District" if $octetarray[3]=>160 AND $octetarray[3]=<174 then $location="... Campus" hope this helps.. Edited November 16, 2007 by logik Link to comment Share on other sites More sharing options...
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