AoRaToS Posted August 20, 2008 Share Posted August 20, 2008 (edited) Ok, I have a game server running on a pc but my IP is dynamic, it changes everytime I disconnect or it does it by the ISP or connection problems and stuff...The way I use to notify my friends of the server address is to have an xfire on that server pc with the ip as it's name (cause i don't have a site and I only want a good few to know my ip and join the server) The thing is i want a program to check my ip every 10 minutes or so and if it's different than before change the Xfire name, what I've done so far is, check the IP, if the ip is different than the one I have saved it runs xfire,opens the options and.... Well It doesn't tab to the edit box, I can't select the editbox with the commands I can remember and I searched for it, If it's not possible then if I canset focus to General (Options) it's 2 tabs away... Here is the code #include <Inet.au3> #NoTrayIcon Global $OldIP Xfire() Func Xfire() Sleep(60000) $PublicIP = _GetIP() If $PublicIP <> $OldIP ShellExecute("Xfire.exe","","") WinWaitActive("Xfire") Sleep(100) Send ("!T") Sleep(100) Send("o") WinWaitActive("Options") Sleep(100) ;setfocus and change name Else EndIf Call("Xfire") EndFunc while 1 Sleep(100) WEnd Edited August 20, 2008 by AoRaToS s!mpL3 LAN Messenger Current version 2.9.9.1 [04/07/2019] s!mpL3 LAN Messenger.zip s!mpL3 Link to comment Share on other sites More sharing options...
AoRaToS Posted August 21, 2008 Author Share Posted August 21, 2008 Bump... Anyone that can help???How to give focus to the editbox??? s!mpL3 LAN Messenger Current version 2.9.9.1 [04/07/2019] s!mpL3 LAN Messenger.zip s!mpL3 Link to comment Share on other sites More sharing options...
dbzfanatic Posted August 21, 2008 Share Posted August 21, 2008 Try ControlFocus() Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
AoRaToS Posted August 21, 2008 Author Share Posted August 21, 2008 (edited) Ok I fixed it anoher way, thanks anyway... This is it... #include <Inet.au3> #NoTrayIcon Global $OldIP Xfire() Func Xfire() $PublicIP = _GetIP() If $PublicIP <> $OldIP Then ShellExecute("Xfire.exe","","") $handle = WinGetHandle("Xfire") WinWaitActive("Xfire") Sleep(100) Send ("!T") Sleep(100) Send("o") WinWaitActive("Options") Sleep(100) ControlSetText("Options","","[CLASS:Edit; INSTANCE:16]",$PublicIP) Sleep(100) ControlClick ( "Options","","[CLASS:Button; INSTANCE:89]") Sleep(100) WinSetState("Xfire","",@SW_MINIMIZE) $OldIP = $PublicIP Sleep(30000) Call("Xfire") Else Sleep(30000) Call("Xfire") EndIf EndFunc Edited August 21, 2008 by AoRaToS s!mpL3 LAN Messenger Current version 2.9.9.1 [04/07/2019] s!mpL3 LAN Messenger.zip s!mpL3 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