ColdDeath Posted November 23, 2008 Share Posted November 23, 2008 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_exploreThe 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 ExitCan I enhance the scipt so it will be able to read the 4 numbers?Greetz,ColdDeath Link to comment Share on other sites More sharing options...
Valuater Posted November 23, 2008 Share Posted November 23, 2008 Like this.. $string = "http://gc.gamestotal.com/i.cfm?&1895&f=com_explore" $Split = StringSplit($string, "&") MsgBox(0x0,"", $Split[2]) 8) Link to comment Share on other sites More sharing options...
ColdDeath Posted November 23, 2008 Author Share Posted November 23, 2008 (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 November 23, 2008 by ColdDeath Link to comment Share on other sites More sharing options...
toonboon Posted November 23, 2008 Share Posted November 23, 2008 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] Link to comment Share on other sites More sharing options...
ColdDeath Posted November 23, 2008 Author Share Posted November 23, 2008 where exactly in the script do you want to add this? what do you need to do with these numbers?Read above plz Link to comment Share on other sites More sharing options...
toonboon Posted November 23, 2008 Share Posted November 23, 2008 (edited) I think having the window handle is enough for statusbargettext. StatusBarGetText($hWnd,'') Edited November 23, 2008 by toonboon [right]~What can I say, I'm a Simplistic person[/right] Link to comment Share on other sites More sharing options...
furrycow Posted November 23, 2008 Share Posted November 23, 2008 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 Link to comment Share on other sites More sharing options...
ColdDeath Posted November 23, 2008 Author Share Posted November 23, 2008 (edited) I think having the window handle is enough for statusbargettext. StatusBarGetText($hWnd,'')oÝ÷ Ûú®¢×ë"¶æâ°%É(©î®[azêå«-çèZ0x%y.® Edited November 23, 2008 by ColdDeath Link to comment Share on other sites More sharing options...
ColdDeath Posted November 23, 2008 Author Share Posted November 23, 2008 What does StatusBarGetText($hWnd,'') do btw? And plz reply to the script above! Link to comment Share on other sites More sharing options...
furrycow Posted November 23, 2008 Share Posted November 23, 2008 (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 November 23, 2008 by furrycow Instant Lockerz Invite - www.instantlockerzinvite.co.uk 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