aphesia Posted April 9, 2009 Share Posted April 9, 2009 (edited) #include <reducemem.au3>#include <Inet.au3>#RequireAdminOpt("WinTitleMatchMode", -2)$zeit = "08"$PublicIP = _GetIP()sleep(10000)run( "batch.bat" )WinWaitClose( "cmd.exe" )if FileExists("F:\misc\mybrute\hello.txt") Then FileDelete("F:\misc\mybrute\hello.txt")EndIfsleep(10000)$PublicIP2 = _GetIP()if $PublicIP = $PublicIP2 Then MsgBox(0, "AutoIt Example", "IP ERROR") ExitEndIfWinActivate( "vmware") WinSetState ( "vmware" , "", @SW_MAXIMIZE )MouseClick("left", 70, 63, 1)while 1_ReduceMemory() if @hour = $zeit Then if FileExists("F:\misc\mybrute\hello.txt") Then MouseClick("left", 21, 52, 1) FileDelete("F:\misc\mybrute\hello.txt") Shutdown(64) sleep(2000) Shutdown(1) Exit Else MouseClick("left", 21, 52, 1) Shutdown(64) sleep(2000) Shutdown(1) Exit EndIf EndIf if FileExists("F:\misc\mybrute\hello.txt") Then $PublicIP3 = _GetIP() FileDelete("F:\misc\mybrute\hello.txt") MouseClick("left", 21, 52, 1) sleep(5000) run( "batch.bat" ) WinWaitClose( "cmd.exe" ) sleep(10000) $PublicIP4 = _GetIP() if $PublicIP3 = $PublicIP4 Then sleep(10000) run( "batch.bat" ) WinWaitClose( "cmd.exe" ) $PublicIP5 = _GetIP() sleep(2000) if $PublicIP3 = $PublicIP5 Then sleep(10000) run( "batch.bat" ) WinWaitClose( "cmd.exe" ) $PublicIP6 = _GetIP() sleep(2000) if $PublicIP3 = $PublicIP6 Then sleep(10000) run( "batch.bat" ) WinWaitClose( "cmd.exe" ) EndIf EndIf EndIf MouseClick("left", 70, 63, 1) EndIfWEndso what does this script do?batch.bat = a script which reconnects my router and gets a new ip.the mouselicks run/stop a vmware which will do some stuff with a script in autostart.My problem is, that my router can only be restarted every 1-2 mins. But i want the maxiumum speed out of this script (so not waitng 2 mins if i could already start with a reconnect after1:10 but also dont make a reconnect after 1:30 which wont get a new ip , run my vmware which also wont work cause i need a new ip for succes).So i did 3 times a IF ip1 = ip2 then wait 10 secs + try reconnect again.But my problem is, that it doesnt even reconize the if ip = ip then (in the while loop).When the file exists (created by vmware so main program knows to stop vmware) , it will try to get a new ip. if its not new , wait 1 0secs and try again. The script gets after stopping the vmware no new ip but still runs the vmware (but i told the script to wait until the new ip is done.. well 3 if waits).anyone sees the problem? Edited April 9, 2009 by aphesia Link to comment Share on other sites More sharing options...
aphesia Posted April 9, 2009 Author Share Posted April 9, 2009 dont get it.. this must work if FileExists("F:\misc\mybrute\hello.txt") Then $PublicIP3 = _GetIP() FileDelete("F:\misc\mybrute\hello.txt") MouseClick("left", 21, 52, 1) sleep(5000) run( "batch.bat" ) WinWaitClose( "cmd.exe" ) sleep(10000) $PublicIP4 = _GetIP() if $PublicIP3 = $PublicIP4 Then sleep(10000) run( "batch.bat" ) WinWaitClose( "cmd.exe" ) $PublicIP5 = _GetIP() sleep(2000) if $PublicIP3 = $PublicIP5 Then sleep(10000) run( "batch.bat" ) WinWaitClose( "cmd.exe" ) $PublicIP6 = _GetIP() sleep(2000) if $PublicIP3 = $PublicIP6 Then sleep(10000) run( "batch.bat" ) WinWaitClose( "cmd.exe" ) EndIf EndIf EndIf MouseClick("left", 70, 63, 1) EndIfbut he handles it like the $publicip3 is not $publicip4.. but it is Link to comment Share on other sites More sharing options...
aphesia Posted April 9, 2009 Author Share Posted April 9, 2009 plz isnt there anyone who could help me to fix this problem? 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