Page 1 of 1

Help with Button

Posted: 2009-10-18 13:01:20
by DRST

Code: Select all

_____infogump_______ 
serial   0x0000954e 
gumpid   0x000af869 
X   0 
Y   0 
292   packet size 
0   reply packet size 
Buttons: ________ 
 page 0 
    1 [    1] image=0x0993 at 158:416 
Checks&Radios: __ 
Entryes: ________ 
All commands: ____ 
    1] noclose 1 
    2] page 0 
    3] nodispose 1 
    4] resizepic 118 192 5170 250 300 
    5] gumppic 143 227 92 
    6] gumppic 188 228 94 
    7] text 193 233 48 0 
    8] text 148 270 1001 1 
    9] button 158 416 2450 2451 1 0 1 
Text: ____________ 
    0] Macro Check 
    1] Click the 'okay' button: 
Is it Possible to find the coord of the okay button which is 9] button 158 416 2450 2451 1 0 1 the button place is random everytime the gump opens.

Image

Posted: 2009-10-18 13:23:44
by Nmy
Hi there!
I'm really bad with anti-macros but I have an idea. If the anti-macro window opens every time at the same place, you could just click everywhere. Its like 6-8 clicks per row and about 10 rows... nothing much i think...

Posted: 2009-10-18 13:44:20
by DRST
any idea how to use ,ongump

Posted: 2009-10-18 17:38:55
by Nmy
Hmm... is i'm correct it's uo.ongump('withtext','Click the 'okay' button:')
I'll check it later

withtext or with text I'm not sure

https://yoko.uokit.com/viewtopic.php?p=60104#60104

Posted: 2009-10-26 15:27:27
by Destruction
Try this

Code: Select all

sub antimacro() 
	var x, y 
	repeat 
		if uo.lastgump( 'replyed' ) == 0 and uo.lastgump( 'text', 0 ) == 'Macro Check' then 
			x = explode( uo.lastgump( 'command', 9 ), ' ', 1 )
			y = explode( uo.lastgump( 'command', 9 ), ' ', 2 )
			uo.lclick( x, y ) 
			while uo.lastgump( 'replyed' ) == 0 
				wait( 100 ) 
			wend
		endif 
		wait( 100 ) 
	until false 
endsub

Sub explode( string, pattern, num ) 
	var i, counter = 0, entry = 0 
	for i=0 to strlen( string ) -strlen( pattern ) 
		if mid( string, i, strlen( pattern ) ) == pattern then 
			counter = counter + 1 
			if num == counter-1 then 
				return mid( string, entry, i-entry ) 
			endif 
			entry = i + strlen( pattern ) 
		endif 
	next 
	if entry == 0 then 
		return false 
	endif 
	return mid( string, entry, strlen(string)-entry ) 
endsub
Nmy, сколько бы я онгамп не защищал - он глючная сволочь. uo.lclick много надежнее.

Posted: 2009-10-26 16:32:31
by markku
mm its not working :cry: