Yoko

All sides of Injection
It is currently 2024-03-29 16:31:37

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: prompting user
PostPosted: 2004-04-27 20:48:50 
Offline

Joined: 2004-04-16 19:24:29
Posts: 18
Heloo, how can i prompt a user or get that he clicks on an specific object?
lemme explain
1- prompt
something like, appears a message to user "Say the number of times you want to loop the macro".... and the user writes the number and i get into
a var :D

2- I wanna get some serial, like a prompt "click on the three you wanto to shop"
and put the targeted's id into a var like this

var tree_id=uo.exec("info") //ficticious, this doesnt work...

sorry my bad english and thank u very much :D


Top
   
 Post subject:
PostPosted: 2004-04-28 00:25:54 
Offline
Expert!

Joined: 2004-04-25 11:11:07
Posts: 359
Here is my solution. Works fine, i think...
Code:
sub PromptObject(s)
  var last
  uo.Info("self")
  last = uo.getserial("lasttarget")
  uo.print(s)
  uo.canceltarget()
  uo.Info()
  while last == uo.getserial("lasttarget") and uo.targeting()
    wait(100)
  wend
  return uo.getserial("lasttarget")
end sub

Of course, this script will not allow you to target self

_________________
Без труда не выловишь и рыбку из пруда,
А без пруда не выловишь её и с трудом...


Top
   
 Post subject:
PostPosted: 2004-04-29 18:25:43 
Offline

Joined: 2004-04-10 10:58:34
Posts: 6
Бля! Спасибо!!! :-)
Ай да я! ай да тормоз !


Top
   
 Post subject: Genious!
PostPosted: 2004-04-30 13:51:23 
Offline

Joined: 2004-04-16 19:24:29
Posts: 18
Man! Youuuuu, youuuuuu :) u're a genoius....
I have to made some changes, but its exactly what i need!
Code:
sub main()
  var id_obj=PromptObject()
  uo.print(""+id_obj)
end sub
sub PromptObject()
  var last
  uo.Info()
  uo.exec("textclose")
  last = uo.getserial("lasttarget")
  uo.canceltarget()
  uo.Info()
  while last == uo.getserial("lasttarget") and uo.targeting()
    wait(100)
  wend
  uo.exec("textclear")
  uo.exec("textclose")
  return uo.getserial("lasttarget")
end sub


But I already have one doubt....
And what about a text prompt? or a Gump, with some choices, or a txtField to user write something?

Thanks VM


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: No registered users and 45 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