n00bster Posted November 16, 2007 Share Posted November 16, 2007 (edited) CODEFunc FightAgain() $oButton = _IEGetObjByName($oIE, "Fightbutton") _IEAction($oButton, "click")sleep(4000)EndFuncfunc Cast() $oButton = _IEGetObjByName($oIE, "castbutton") ;;;;;;;i want to loop this part here;;;;;;;;;;;;;_IEAction($oButton, "click")sleep(4000)EndFuncwhile 1FightAgain()Cast()WEndi would like to loop just that part only until the button disapears then go back to the fightagain Func i am new to this so don't be harsh Edited November 17, 2007 by n00bster Link to comment Share on other sites More sharing options...
Nahuel Posted November 16, 2007 Share Posted November 16, 2007 You want to loop this line $oButton = _IEGetObjByName($oIE, "castbutton");;;;;;;i want to loop this part here;;;;;;;;;;;;; untl the button "castbutton" doesn't exist anymore? If that's so, how do you want to click on it later? Link to comment Share on other sites More sharing options...
n00bster Posted November 16, 2007 Author Share Posted November 16, 2007 You want to loop this line $oButton = _IEGetObjByName($oIE, "castbutton");;;;;;;i want to loop this part here;;;;;;;;;;;;; untl the button "castbutton" doesn't exist anymore? If that's so, how do you want to click on it later?ok i guess i wasn't specific lol ok basically i want to to loop the whole thing just that button i want it to click till it disapears then go back to the fightfunc Link to comment Share on other sites More sharing options...
Nahuel Posted November 16, 2007 Share Posted November 16, 2007 IsObj() will be useful then. While 1 $oButton = _IEGetObjByName($oIE, "castbutton") If Not IsObj($oButton) Then ExitLoop _IEAction($oButton, "click") Sleep(100) WEnd Link to comment Share on other sites More sharing options...
n00bster Posted November 16, 2007 Author Share Posted November 16, 2007 CODEFunc FightAgain()$oButton = _IEGetObjByName($oIE, "Fightbutton")_IEAction($oButton, "click")sleep(4000)EndFuncfunc Cast()$oButton = _IEGetObjByName($oIE, "castbutton") _IEAction($oButton, "click")sleep(4000)EndFunci want it to loop all of it like it is doing atm but to keep clicking the func cast() till there isn't a button and go back to the fightagain() func Link to comment Share on other sites More sharing options...
Nahuel Posted November 16, 2007 Share Posted November 16, 2007 My last try. While 1 FightAgain() Cast() WEnd Func FightAgain() $oButton = _IEGetObjByName($oIE, "Fightbutton") _IEAction($oButton, "click") Sleep(4000) EndFunc ;==>FightAgain Func Cast() While 1 $oButton = _IEGetObjByName($oIE, "castbutton") If Not IsObj($oButton) Then ExitLoop _IEAction($oButton, "click") Sleep(4000) WEnd EndFunc ;==>Cast Link to comment Share on other sites More sharing options...
n00bster Posted November 16, 2007 Author Share Posted November 16, 2007 ty that worked great ) Link to comment Share on other sites More sharing options...
Neoflaros Posted November 16, 2007 Share Posted November 16, 2007 We'll see how great it works after I ban you from the game. //Data33 - Gevalum admin. Link to comment Share on other sites More sharing options...
Incognito Posted November 16, 2007 Share Posted November 16, 2007 Idiot. You won't last long. -Silwar, the other Admin of Gevalum Link to comment Share on other sites More sharing options...
n00bster Posted November 16, 2007 Author Share Posted November 16, 2007 as said before this is not a chat forum go there if you wanna moan and complain and ban me if you will if you know who i am Link to comment Share on other sites More sharing options...
TheButcher Posted November 16, 2007 Share Posted November 16, 2007 wow, the noobster has a fast tounge... Why do you try to cheat on a game that says no cheating? it is like playing poker... and you hold the cards and pick the ones you want... Do you think that you could get away with it in the game of poker? no So why would you try to do it? Read the Rules... IF ya CHEAT you might Lose more then Gold... you might lose your Avatars Life. Link to comment Share on other sites More sharing options...
mikehunt114 Posted November 17, 2007 Share Posted November 17, 2007 Looks like the n00bs are trying to follow in someone's footsteps. Give it up already. IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
n00bster Posted November 17, 2007 Author Share Posted November 17, 2007 i do recall when Silwar got banned for scripting on shimlar Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 17, 2007 Moderators Share Posted November 17, 2007 i do recall when Silwar got banned for scripting on shimlar I don't care if you do belong to this forum and feel protected by it... I'll only ask once to quit posting on issues of such nature. You aren't learning anything, you're getting the information handed to you, which is more irritating to me than whatever you are using it for. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Recommended Posts