kforsey Posted February 24, 2005 Share Posted February 24, 2005 I am currently trying to create a program for a game called Nox which was made in the year 2000 so it is a bit out of date. If I attempt to use the function mousemove it will move my cursor to one corner of the screen and wont follow where i tell it to go. Say I told it to go to X 500 Y 500, it would jsut randomly go to a corner of the screen. Anyone know what could be causing this and how I could fix it. Thanks and any help would be appreciated. Link to comment Share on other sites More sharing options...
Insolence Posted February 24, 2005 Share Posted February 24, 2005 Can you post the code? It sends the EXACT messages your mouse would send if it were in game, so it's probably your code "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
kforsey Posted February 24, 2005 Author Share Posted February 24, 2005 (edited) MouseClick("left", 500, 500) is my code. Stll got any ideas. Oh ya, i dont know if it makes any difference but the game is running in 1024x768 and is in 16 bit. Edited February 24, 2005 by kforsey Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted February 24, 2005 Share Posted February 24, 2005 Im listening Ive made a script witch you can control a mouse on another computer on the LAN. It works all fine i windows, but Battlefield (the game) the mouse sense was WAY to high Both games had the same sense and same reloution in the game... Link to comment Share on other sites More sharing options...
kforsey Posted February 24, 2005 Author Share Posted February 24, 2005 So do you have any idea how to solve this problem? I would really appreciate ANY help or advice anyone could give me. Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted February 24, 2005 Share Posted February 24, 2005 hmm, can't really see the problem. The only problem could be the resolution of the game... Link to comment Share on other sites More sharing options...
upnorth Posted February 24, 2005 Share Posted February 24, 2005 (edited) i think some fullscreen games use a fake mouse... expandcollapse popup#include <GUIConstants.au3> HotKeySet("{ESC}","quit") Opt("GUIOnEventMode", 1) Global $size[3] , $mid[3] , $fake_mouse[3] $size[1] = @DesktopWidth $size[2] = @DesktopHeight $mid[1] = Int($size[1] / 2) $mid[2] = Int($size[2] / 2) $win = GUICreate( "", $size[1], $size[2], 0, 0, $WS_POPUPWINDOW ,$WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) $fake_mouse[0] = GUICtrlCreateButton("Fake mouse",0,0,75,25) GuiCtrlSetOnEvent($fake_mouse[0],"quit") GUISetState(@SW_SHOW) MouseMove($mid[1],$mid[2],0) While 1 Sleep(10) $pos = MouseGetPos() $fake_mouse[1] = $fake_mouse[1] - ($mid[1] - $pos[0]) $fake_mouse[2] = $fake_mouse[2] - ($mid[2] - $pos[1]) MouseMove($mid[1],$mid[2],0) If $fake_mouse[1] > $size[1] Then $fake_mouse[1] = $size[1] ElseIf $fake_mouse[1] < 0 Then $fake_mouse[1] = 0 EndIf If $fake_mouse[2] > $size[2] Then $fake_mouse[2] = $size[2] ElseIf $fake_mouse[2] < 0 Then $fake_mouse[2] = 0 EndIf GUICtrlSetPos($fake_mouse[0],$fake_mouse[1],$fake_mouse[2]) WEnd func quit() Exit EndFunc Edit:new scriptfake_mouse.au3 Edited July 7, 2005 by UP NORTH 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