ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: kaiserguilherme on December 21, 2010, 05:43:06 AM

Title: click command question
Post by: kaiserguilherme on December 21, 2010, 05:43:06 AM
Hello guys!

Ok, im just starting at Scripting, so it can be a stupid question. I decided to make something that clicks the make last button in the item creation menu, just for test.
i wrote:

Code: [Select]
click 308 499 f
wait 1s

the mouse is moving correctly but it dont click.  :'( it just move the mouse to the button. what im doing of wrong? im using windows vista and my client version is 7.0.11.1, EUO version 1.5(182). i tested in Legends OSI shard.
======
EDIT
======
Updated EUO and client. still dont working... also, i tried other scripts with the same command and they dont work too.
Title: Re: click command question
Post by: 12TimesOver on December 21, 2010, 09:45:19 AM
Don't forget that the click command is based on GAME coordinates, not MENU coordinates. You need to take into account the location of your menu (gump) in the context of the screen and add those numbers to your click numbers. Your click line above will only work if the x/y coordinates of the top, left-hand corner of the menu is at 0/0.

You need to set your click locations as #contposx and #contposy + the 308/499, such as:

Code: [Select]
set %clickx #contposx + 308
set %clicky #contposy + 499
click %clickx %clicky

Take a look in my library and check out my "Standard Subs" thread. You'll find similar in a number of coder libraries here, we all have our own way of including these things in our scripts.

Hope this helps.

X
Title: Re: click command question
Post by: kaiserguilherme on December 21, 2010, 11:16:38 AM
Oh, thank you... But the problem persists. the cursos, qhen i use the MC, moves to the right place, the make last button. the action of "clicking" isnt happening. the cursor moves, stay at the right place but dont click. I tested the exactly same sintax you pasted here in a computer running on windows XP and it worked. Can it be a problem with windows vista?
Title: Re: click command question
Post by: _C2_ on December 21, 2010, 11:29:59 AM
Oh, thank you... But the problem persists. the cursos, qhen i use the MC, moves to the right place, the make last button. the action of "clicking" isnt happening. the cursor moves, stay at the right place but dont click. I tested the exactly same sintax you pasted here in a computer running on windows XP and it worked. Can it be a problem with windows vista?

never heard of that problem from anyone else.  are you runing your programs in administrator mode?  that would be the only issue I can think of
Title: Re: click command question
Post by: manwinc on December 22, 2010, 05:39:15 PM
Try taking out the f at the end. Don't see how that could be causing an issue, but it might.
Title: Re: click command question
Post by: kaiserguilherme on December 23, 2010, 04:53:09 AM
Ok. Runned as admininstrator and the problem persists.
took of the f and the problem stills... gosh!

I triend turning of the touchpad and pluged a USB mouse. dont worked too. :(

Using the "Oracle VM Virtualbox" Software, i emulated a windows XP and the command works fine. Im sure its some problem with vista, but cant define what it can be.