prompting user

General Injection issues

Moderators: Murderator+, Murderator

Post Reply
hunt3r
Posts: 18
Joined: 2004-04-16 19:24:29

prompting user

Post by hunt3r »

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
Lord Ruslan Nightmare
Expert!
Posts: 359
Joined: 2004-04-25 11:11:07
Contact:

Post by Lord Ruslan Nightmare »

Here is my solution. Works fine, i think...

Code: Select all

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
Без труда не выловишь и рыбку из пруда,
А без пруда не выловишь её и с трудом...
dodo
Posts: 6
Joined: 2004-04-10 10:58:34

Post by dodo »

Бля! Спасибо!!! :-)
Ай да я! ай да тормоз !
hunt3r
Posts: 18
Joined: 2004-04-16 19:24:29

Genious!

Post by hunt3r »

Man! Youuuuu, youuuuuu :) u're a genoius....
I have to made some changes, but its exactly what i need!

Code: Select all

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
Post Reply