Jump to content

Recommended Posts

Posted (edited)

CODE
Func FightAgain()

$oButton = _IEGetObjByName($oIE, "Fightbutton")

_IEAction($oButton, "click")

sleep(4000)

EndFunc

func Cast()

$oButton = _IEGetObjByName($oIE, "castbutton") ;;;;;;;i want to loop this part here;;;;;;;;;;;;;

_IEAction($oButton, "click")

sleep(4000)

EndFunc

while 1

FightAgain()

Cast()

WEnd

i 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 by n00bster
Posted

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?

Posted

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

Posted

IsObj() will be useful then.

While 1
    $oButton = _IEGetObjByName($oIE, "castbutton")
    If Not IsObj($oButton) Then ExitLoop
    _IEAction($oButton, "click")
    Sleep(100)
WEnd
Posted

CODE
Func FightAgain()

$oButton = _IEGetObjByName($oIE, "Fightbutton")

_IEAction($oButton, "click")

sleep(4000)

EndFunc

func Cast()

$oButton = _IEGetObjByName($oIE, "castbutton")

_IEAction($oButton, "click")

sleep(4000)

EndFunc

i 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

Posted

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
Posted

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.

Posted

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]
  • Moderators
Posted

i do recall when Silwar got banned for scripting on shimlar :P

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.

Guest
This topic is now closed to further replies.
×
×
  • Create New...