Mouse control

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

Likwid_E
decaying skeleton
decaying skeleton
Posts: 3
Joined: Thu Jan 20, 2005 11:47 am

Mouse control

Post by Likwid_E » Thu Jan 20, 2005 11:58 am

I'm having a problem locating information on sending mouse commands to a specific screen loc. Specifically, I'm looking for information on how to do determine what the current position of the mouse pointer is on the screen. I've read the manual and figure I need to use either the /mouseto or /click left commands, but how do I figure out the screen location I need to click?
Perhaps it would help to explain what I'm doing. I have a macro that runs in forgotten halls. Periodically, I get dumped from the zone for no apparent reason (at least according to my /spew data.) Figure it must be a timer on instance zones or something. I can detect when I'm kicked from the zone, so I want to tweak my macro so if I do get kicked, my character just requests a new zone instance and zones back in. I can get the adventure window up on screen, but cannot figure out what loc I need to click to accept the adventure. Also, it's a 2-box macro, so I need to add another char to the adventure. I've done alot of searching and rtfm'ing to get it to this point, hoping someone can point me towards a solution or some post I may have missed that explains how to do this

Thanks

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Thu Jan 20, 2005 12:14 pm

You designate the object you want to click.

Code: Select all

/itemnotify myballsack rightmouseup
In your case you want to be clicking one of the Adventure window objects. I have no idea which though, so happy experimenting.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Thu Jan 20, 2005 12:39 pm

An example of a line that presses the give button when giving things to an NPC.

Code: Select all

        /notify GiveWnd GVW_Give_Button leftmouseup
Right out of the handin mac.

There is a list stickied in this forum or the MacroDepot(3) forum that gives window names and button names, which should help some.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

Zeus
a hill giant
a hill giant
Posts: 180
Joined: Wed Feb 19, 2003 10:03 am
Contact:

Post by Zeus » Thu Jan 20, 2005 12:52 pm

And you can always play with the /window command to see the names etc

Likwid_E
decaying skeleton
decaying skeleton
Posts: 3
Joined: Thu Jan 20, 2005 11:47 am

Post by Likwid_E » Thu Jan 20, 2005 2:34 pm

aChallenged1 - thanks. I'd previously looked at the handin mac, but had disregarded it because i wasn't trying to hand anything in to the adventure guy, just trying to obtain the adventure and add a character to it. Also managed to track down the window using the sticky you mentioned (EQUI_DynamicZoneWnd).
Zeus - had forgotten about the /windows command to track the window, now to hone in on the button I need (think it's DZ_Leader_Add). Will play around with it when I get home from work and post the results.

I was initially thinking I would have to do something like /click left MouseX MouseY, and was looking for how to figure out the X and Y coords of the button, but this should yield a better solution. For my own knowledge, can you determine your current mouse position (something like /echo ${Mouse.X} ${Mouse.Y})?

I know there is no MQ2 Data type of Mouse, just curious how you would track down screen coords
Last edited by Likwid_E on Thu Jan 20, 2005 2:44 pm, edited 1 time in total.

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Thu Jan 20, 2005 2:42 pm

Since I know that Xylobot has a function in it to tell you your mouse x and y location on screen, I know it has to be possible. You'd have to look in the manual. I think I've seen things about the mouse in there, not just button pushes.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

Likwid_E
decaying skeleton
decaying skeleton
Posts: 3
Joined: Thu Jan 20, 2005 11:47 am

Answering my own questions

Post by Likwid_E » Thu Jan 20, 2005 3:02 pm

Got it

MQ2 Data Type: macroquest

int MouseX
int MouseY

I have gotten better at searching (1).