Guest BL@(K-R34P3R Posted September 25, 2004 Share Posted September 25, 2004 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 comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted September 25, 2004 Share Posted September 25, 2004 I wish there was an easier way then clicking... Is it possible to just detect the text then Send enter or something? Link to comment Share on other sites More sharing options...
KnowledgeSponge Posted September 25, 2004 Share Posted September 25, 2004 (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 September 25, 2004 by KnowledgeSponge Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted September 25, 2004 Share Posted September 25, 2004 Actually the game is running a slightly different resolution... Hmm.... I'll make them the same then try again! Thanks. Link to comment Share on other sites More sharing options...
ifthenhelpme Posted September 25, 2004 Share Posted September 25, 2004 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... Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted September 25, 2004 Share Posted September 25, 2004 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 comment Share on other sites More sharing options...
ifthenhelpme Posted September 25, 2004 Share Posted September 25, 2004 doubt it...double check the script ur use for anything that isnt supposed to be there or do that... Link to comment Share on other sites More sharing options...
this-is-me Posted September 26, 2004 Share Posted September 26, 2004 When you hit ctrl+alt+f while in the game, does the au3_spy say paused in the titlebar? Who else would I be? Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted September 26, 2004 Share Posted September 26, 2004 I don't know, I'll go check it out right now. Link to comment Share on other sites More sharing options...
Konan--M Posted September 26, 2004 Share Posted September 26, 2004 (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 work1. 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 it3. mouselogger with hotkeys alt+3 (for left) and alt+4 for right click4. logs strg+1(-5) at press and 1-5 too5. alt+5 to exit It not a very good Scriptwriter, but it worked fine for me and it was all that i neededu need the file pixelfunc.au3 in the same folder to use the scripthttp://www.autoitscript.com/fileman/users/public/Konan/pixelfunc.au3http://www.autoitscript.com/fileman/users/public/Konan/gamelogger.au3Edit: wrong url Edited September 26, 2004 by Konan--M Link to comment Share on other sites More sharing options...
KnowledgeSponge Posted September 26, 2004 Share Posted September 26, 2004 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. Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted September 27, 2004 Share Posted September 27, 2004 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 comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now