SetFocus with no title?!

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Tue Oct 12, 2004 4:33 pm

Hi Link,

Missing window titles is hardly critical as far as SetFocus> is concerned. From the menu bar of the main Macro Scheduler window, choose Tools | View System Windows. Now you can find out exactly the window titles (names) which Macro Scheduler would recognized.

Link
Newbie
Posts: 3
Joined: Tue Oct 12, 2004 4:12 pm

What to look for

Post by Link » Tue Oct 12, 2004 4:46 pm

I could see no obvious windows relevant to DR but there were some curious ones, could it be one of these:

132112 - #43 "MCI command handling window" (a few of these wiv different numbers at the start)

197470 - {4F19F9EE-D526-4ffe-BEE2-C471C6B5A154} "{4F19F9EE-D526-4ffe-BEE2-C471C6B5A154}" (two of these just with different numbers at the start)

131860 - Static "MPWnd_Hooker"
65808 - wwBYAwnd "windWWAA"
65792 - ATL:0043C7D8 "AXWIN Frame Window"

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Oct 12, 2004 6:58 pm

Thanks for name of game. Unfortunately I am not familiar with it and have no interest in learning it, but the following comments are generic enougnt that they should apply to any application.

Sorry if I am repeating something that was covered already. just glancing through the script you provided it appears that once a=6 you will loop forever, there is nothing to change the value of a in that "Macro" loop.
--------------------
Even if you are in the correct window, when you Send>1 do you need to have the cursor in any specific position? Or can you just type in "1" from the keyboard at any time?
-------------------
Still do not understand LDown without LUp or the use of LClick instead.
-------------------
I put my mouse over the relevant place
.AHA! Depending on how you start your macro, you have probably lost focus. And if you are positioning the mouse for the results of the Send> command that will be a problem. You probably do want to be using LClick vs. LDown. But you want to regain the focus after the macro starts, not before. Probably need something like the following three lines before the rest of your script:

SetFocus>%WindowTitle%.......................Sets focus in correct window
MouseMove>x,y........................................Moves mouse to correct position
LClick.........................................................Sets focus in correct position for Send>values
Run rest of macro routine
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Link
Newbie
Posts: 3
Joined: Tue Oct 12, 2004 4:12 pm

Post by Link » Tue Oct 12, 2004 10:29 pm

Thanks for your reply but in the end I decided to just rely solely on mouse. So instead of using the ingame hotkey of using an item (1) i used a complicated set of mouse movements to just use the item like you would if you was there.. alot more lines of code but it dont make a difference...

It all worked well.. Yea if a=6 then it loops foreva thats because theres only 5 quick items slots :P but about 5 hours of doin my rpg job it would be enough.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts