Page 1 of 1

LClick lastgum

Posted: 2009-07-16 23:37:35
by Injectioner
How can I do a LClick on the lastgump that appear on the screen?

Ex:

Code: Select all

_____infogump_______
serial   0x00a9874e
gumpid   0x001224f1
X   0
Y   0
108   packet size
0   reply packet size
Buttons: ________
 page 0
    1 [    1] image=0x1582 at 3:510
Checks&Radios: __
Entryes: ________
All commands: ____
    1] NoClose
    2] button 3 510 5505 5506 1 0 1
    3] text 0 570 38 0
Text: ____________
    0] Anti Macro


I Know that this gump is located at X3 Y510, but I want a script that take the cordenates automaticaly.

Thanks.

[]'s

Posted: 2009-08-09 13:34:43
by Destruction

Code: Select all

sub antimacro()
    var coord = ""
    repeat
        if uo.lastgump( 'replyed' ) == 0 and uo.lastgump( 'text', 0 ) == 'Anti Macro' then
            coord = uo.lastgump( 'command', 0 )
            coord = explode( ' ', coord )
            uo.lclick( val( coord[1] ), val( coord[2] ) )
            while uo.lastgump( 'replyed' ) == 0
                wait( 100 )
            wait( 100 )
        endif
        wait( 100 )
    until false
endsub

Not tested, written in reply window after long rest from the scripts.

sub explode can be found on this forum.