Yoko

All sides of Injection
It is currently 2025-12-02 08:37:41

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Функция right()
PostPosted: 2007-11-07 11:10:46 
Offline

Joined: 2004-07-14 22:56:46
Posts: 82
Location: Украина, Одесса
Что это за функция Right() такая, за что она отвечает?
while Right(uo.LastGump('command', 7+2*index), 1) <> '2'
Я как бы понимаю что это не sub, но и одновременно встречаю ее уже неоднократно, соответственно она имеет смысловое значение... какое?

Code:
sub Solve()

   var index = 0
   while Right(uo.LastGump('command', 7+2*index), 1) <> '2'
      index = index+1
   wend
   return index

end sub

sub antimacro()

   while  not uo.Dead()
      if uo.LastGump('replyed') == 0 then
         if uo.LastGump('text', 2) == 'Я тута!' then
            uo.LClick(uo.LastGump('x')+20, uo.LastGump('y')+72+40*Solve())
            wait(1000)
         end if
      end if
      wait(100)
   wend
   
end sub

_________________
ХХДЕНТОНХХ: Холодостойкий Хронометрирующий Дроид с Единым Наступательным Трансмутатором для Ограниченного Нападения и Хронометрированного Хищения
http://uokings.ru/news.php


Top
   
 Post subject:
PostPosted: 2007-11-07 19:47:43 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Это строковая функция. Функция возвращает N символов отрезанных от переданной строки.. отрезает справа.. :)

Code:
var string = "123"
uo.print( right( string, 1 ) ) ; shows 3
uo.print( right( string, 2 ) ) ; shows 23
uo.print( right( string, 3 ) ) ; shows 123


Теперь понятнее?)

PS: Всегда умел неправильно объяснять :roll:

_________________
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.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2007-11-07 21:19:01 
Offline

Joined: 2006-11-25 17:44:44
Posts: 258
Да уж куда понятне й то:)


Top
   
 Post subject:
PostPosted: 2007-11-08 10:31:12 
Offline

Joined: 2004-07-14 22:56:46
Posts: 82
Location: Украина, Одесса
О, неплохо, спасибо, понятно.

Вижу есть аналогичная функция Left которая действует таким же образом, но считает слева.

Спасибо за объяснение, Destruction.

_________________
ХХДЕНТОНХХ: Холодостойкий Хронометрирующий Дроид с Единым Наступательным Трансмутатором для Ограниченного Нападения и Хронометрированного Хищения

http://uokings.ru/news.php


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: Bing [Bot] and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited