Jump to content

Xfire change name program


Recommended Posts

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.9.1 [04/07/2019]

s!mpL3 LAN Messenger.zip

s!mpL3

Link to comment
Share on other sites

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.9.1 [04/07/2019]

s!mpL3 LAN Messenger.zip

s!mpL3

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...