Jump to content

AU3Win_Spy


Guest BL@(K-R34P3R

Recommended Posts

Guest BL@(K-R34P3R

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
Link to post
Share on other sites
Guest BL@(K-R34P3R

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.

Link to post
Share on other sites

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
Link to post
Share on other sites
Guest BL@(K-R34P3R

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.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...