Sign in to follow this  
Followers 0
Guest BL@(K-R34P3R

AU3Win_Spy

12 posts in this topic

I am still working on my game script... Anyways, here's the new problem. I got it to load fine, but now I am trying to get it to mouseclick the "Play" button. I open the game, (Maximized), then I start up WinSpy, then I put the mouse over the "Play" button, then I alt tab back to the win spy, it says the position on the desktop and in the window, both of them are the same. I put those coordinates into my mouse click, then I run the script, and it clicks the side of the screen somewhere.... It should be clicking the play button... Part of the problem is, every time I start the game, I put the cursor to the same place, over the "Play" button, and everytime I alt tab out of them program, and look at the x,y coordinates in the WinSpy, they are different, and I mean a LOT different... Like 500 from each of them. Either WinSpy has let me down, or I need to do something.... Help?

;Trains your Heavy Armor skill, which allows you to raise your Endurance.
;Works best if Heavy Armor is a Major or Minor Skill. (This will let you actually level up.)

;Starts up Morrowind, and continues a previously saved character. 
ContinueGameFunc()
Func ContinueGameFunc()
   Run('"C:\Program Files\Bethesda Softworks\Morrowind\Morrowind.exe"', "C:\Program Files\Bethesda Softworks\Morrowind")
   WinWaitActive("Morrowind")
   WinSetState("Morrowind", "", @SW_MAXIMIZE)
   Sleep(3000)
   Send("{ESC}")
   Sleep("10000")
   Send("{ESC}")
   WinActivate("Morrowind")
   Sleep(2000)
   MouseClick("left", 160, 557, 1)
EndFunc

Share this post


Link to post
Share on other sites



I wish there was an easier way then clicking... Is it possible to just detect the text then Send enter or something?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Couple things. Is the game running in the same resolution as your desktop? Personally, I would take a screenshot with Fraps, open it in paint or something and get the coords from there.

Edited by KnowledgeSponge

Share this post


Link to post
Share on other sites

Actually the game is running a slightly different resolution... Hmm.... I'll make them the same then try again! Thanks.

Share this post


Link to post
Share on other sites

try using the "In Window: x:### y:###"

and before u alt+tab out press Ctrl+alt+f over the play button to freeze the au3 swindow spy with the play button coords....yea ive done thins b4 too...except to logon to diablo...

Share this post


Link to post
Share on other sites

The thing is, the In Window, and In Desktop coords. are the same. I tried the ctrl alt f thing but it's still not working. Maybe morrowind has some 3rd party program stopper or something.

Share this post


Link to post
Share on other sites

doubt it...double check the script ur use for anything that isnt supposed to be there or do that...

Share this post


Link to post
Share on other sites

When you hit ctrl+alt+f while in the game, does the au3_spy say paused in the titlebar?


Who else would I be?

Share this post


Link to post
Share on other sites

I don't know, I'll go check it out right now.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

i had the same problem and wrote a scriptwriter to solve it ( "MouseGetPos()" )

U can test my scriptwriter for games ... i got a funktion, that other scriptwriters doesn't have: the function to avoid sleep() that isn't allways running proper, cause sometimes the delays are larger and then the script doesn't work

1. u take 2 Positions from the screen with hotkeys (alt+1 then alt+2) and the written script waits for the same pixelfield to show up and then continues ( the pixels must be taken from upleft to downright)

2. simple keylogger with alt+key to log the key and send it

3. mouselogger with hotkeys alt+3 (for left) and alt+4 for right click

4. logs strg+1(-5) at press and 1-5 too

5. alt+5 to exit :ph34r:

It not a very good Scriptwriter, but it worked fine for me and it was all that i needed

u need the file pixelfunc.au3 in the same folder to use the script

http://www.autoitscript.com/fileman/users/public/Konan/pixelfunc.au3

http://www.autoitscript.com/fileman/users/public/Konan/gamelogger.au3

Edit: wrong url

Edited by Konan--M

Share this post


Link to post
Share on other sites

Seriously man, I really strongly suggest you dl Fraps and use it to take a screenshot. If you work with games this is pretty much a *must* have. You will solve your problems if you follow this advice.

Share this post


Link to post
Share on other sites

I downloaded fraps, I'll go try it now. OO. I just thought it would work normally, because I wrote a similar script for my starcraft winbot, and it worked fine with just Alt +Tab to retrieve coordinates.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0