Help with Button

Ask for help

Moderators: Murderator+, Murderator

Post Reply
DRST
Posts: 7
Joined: 2009-10-13 21:45:21

Help with Button

Post 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
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post 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...
DRST
Posts: 7
Joined: 2009-10-13 21:45:21

Post by DRST »

any idea how to use ,ongump
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post 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

viewtopic.php?p=60104#60104
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post 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 много надежнее.
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
markku
Posts: 2
Joined: 2009-10-26 11:00:50

Post by markku »

mm its not working :cry:
Post Reply