Jump to content

Window Text


 Share

Recommended Posts

Hi,

Got a small question:

Using script for a site, when it has clicked it will go to this page:

http://gc.gamestotal.com/i.cfm?&1895&f=com_explore

The number 1895 can vary from 0000 to 9999.

While Sleep (10)
If StatusBarGetText("(SFGC) Galactic Conquest - Windows Internet Explorer", "http://gc.gamestotal.com/i.cfm?f=com_explore" )="Gereed" Then
    
    MouseClick ( "left", 402, 392 )
    MouseMove (300,300)

        While Sleep (10)
        If StatusBarGetText("(SFGC) Galactic Conquest - Windows Internet Explorer", "http://gc.gamestotal.com/i.cfm?& 0000 - 9999 &f=com_explore")="Gereed" Then
                    
            MouseClick ( "left", 898, 395 )
            MouseMove (300,300)
            ExitLoop
        EndIf
        WEnd
EndIf
WEnd
Exit

Can I enhance the scipt so it will be able to read the 4 numbers?

Greetz,

ColdDeath

Link to comment
Share on other sites

Like this..

$string = "http://gc.gamestotal.com/i.cfm?&1895&f=com_explore"

$Split = StringSplit($string, "&")

MsgBox(0x0,"", $Split[2])

8)

Sorry, I've just read my post again, I asked it wrong.

The if statement has to wait until the url is activated, but the url has those 4 digits that can change.

Edited by ColdDeath
Link to comment
Share on other sites

I have no idea if this will work as ive never played Galactic Conquest (if it is even a game) and like everyone else has said...i dont know what you want to do with the number?? So currently the second if statement is pointless, but only because i dont actually know what you want from it. If this doesnt work, i hope there are enough ideas in it for you to get it to work. :)

#include <IE.au3> 

While Sleep (10)
    $oIEURL1=_IEPropertyGet ($hwnd,"locationurl" )
    $oIEStatus1=_IEPropertyGet ($hwnd,"statustext")
    
If $oIEURL1="http://gc.gamestotal.com/i.cfm?f=com_explore" And $oIEStatus1="Gereed" Then
   
    MouseClick ( "left", 402, 392 )
    MouseMove (300,300)

        While Sleep (10)
            _IELoadWait ($hwnd)
            $oIEURL2=_IEPropertyGet ($hwnd,"locationurl" )
            $oIEStatus2=_IEPropertyGet ($hwnd,"statustext")
            $Number=StringMid($oIEURL2,33,4)

            If $oIEURL2="http://gc.gamestotal.com/i.cfm?&"&$Number&"&f=com_explore" And $oIEStatus2="Gereed" Then 
                   MouseClick ( "left", 898, 395 )

                   MouseMove (300,300)
                   ExitLoop
            EndIf

         WEnd
EndIf
WEnd
Exit
Edited by furrycow
Instant Lockerz Invite - www.instantlockerzinvite.co.uk
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...