Sign in to follow this  
Followers 0
ColdDeath

Window Text

10 posts in this topic

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

Share this post


Link to post
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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

where exactly in the script do you want to add this? what do you need to do with these numbers?


[right]~What can I say, I'm a Simplistic person[/right]

Share this post


Link to post
Share on other sites

where exactly in the script do you want to add this? what do you need to do with these numbers?

Read above plz :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I think having the window handle is enough for statusbargettext.

StatusBarGetText($hWnd,'')
Edited by toonboon

[right]~What can I say, I'm a Simplistic person[/right]

Share this post


Link to post
Share on other sites

Also, im pretty sure its...

StatusBarGetText("title","text")

therefore i dont think its going to pick up what page youre on, unless the actually URL is on the webpage itself?


Instant Lockerz Invite - www.instantlockerzinvite.co.uk

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I think having the window handle is enough for statusbargettext.

StatusBarGetText($hWnd,'')oÝ÷ Ûú®¢×ë"¶æ­â°%É(©î®[azêå«-çèZ0x%y.®
Edited by ColdDeath

Share this post


Link to post
Share on other sites

What does StatusBarGetText($hWnd,'') do btw? And plz reply to the script above!

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

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

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