Sign in to follow this  
Followers 0
AoRaToS

Xfire change name program

4 posts in this topic

#1 ·  Posted (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 by AoRaToS

s!mpL3 LAN Messenger

Current version 2.9.8.8 [30/09/2015]

Download Here

s!mpL3

Share this post


Link to post
Share on other sites



#4 ·  Posted (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 by AoRaToS

s!mpL3 LAN Messenger

Current version 2.9.8.8 [30/09/2015]

Download Here

s!mpL3

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0