Mouse Move doesnt work properly in windowed silkscreen games

Ask gaming related questions (AHK v1.1 and older)
Tactical Shrimp
Posts: 31
Joined: 11 Nov 2015, 22:29

Mouse Move doesnt work properly in windowed silkscreen games

09 Jul 2016, 10:37

so i have this script its meant for planetside 2 which is made in forgelight the same engin as h1z1 so if you have experience in ether that would be helpful

Code: Select all

Gui, Add, DropDownList, w370 vDDL_Text gDDL_Changed, none|Solstice|Pulsar C|Orion
Gui, Show, x356 y116 h452 w373, New GUI Window
Return
#SingleInstance, Force
 
 
GuiClose:
ExitApp
 
 
DDL_Changed:
Gui,Submit,Nohide
{
	if (DDL_Text = "Solstice")
	{
		Hotkey,~LButton,Solstice,On
		
	}
	else if((DDL_Text = "Pulsar C"))
	{
		
	
	
	}
	else if((DDL_Text = "Orion"))
	{
		
		
		
	}
	else
	Hotkey,~LButton,Solstice,Off
	return
	
	Solstice:
	while(GetKeyState("LButton"))
	{
		MouseMove,10,10,,R
	}
	
	return
	
	
so i have seen scripts like this work in this game however that script isn't specific enough so i am making my own yes i have looked through that script however it is very unpolished in my opinion and i cant make sense of it i have the groundwork except for the mouse doesn't move when im not in a menu the mouse does however work in ingame menus and on my desktop is there another way to move the mouse relative to its position
User avatar
YoucefHam
Posts: 372
Joined: 24 Aug 2015, 12:56
Location: Algeria
Contact:

Re: Mouse Move doesnt work properly in windowed silkscreen games

09 Jul 2016, 12:16

Tactical Shrimp wrote:so i have this script its meant for planetside 2 which is made in forgelight the same engin as h1z1 so if you have experience in ether that would be helpful

Code: Select all

Gui, Add, DropDownList, w370 vDDL_Text gDDL_Changed, none|Solstice|Pulsar C|Orion
Gui, Show, x356 y116 h452 w373, New GUI Window
Return
#SingleInstance, Force
 
 
GuiClose:
ExitApp
 
 
DDL_Changed:
Gui,Submit,Nohide
{
	if (DDL_Text = "Solstice")
	{
		Hotkey,~LButton,Solstice,On
		
	}
	else if((DDL_Text = "Pulsar C"))
	{
		
	
	
	}
	else if((DDL_Text = "Orion"))
	{
		
		
		
	}
	else
	Hotkey,~LButton,Solstice,Off
	return
	
	Solstice:
	while(GetKeyState("LButton"))
	{
		MouseMove,10,10,,R
	}
	
	return
	
	
so i have seen scripts like this work in this game however that script isn't specific enough so i am making my own yes i have looked through that script however it is very unpolished in my opinion and i cant make sense of it i have the groundwork except for the mouse doesn't move when im not in a menu the mouse does however work in ingame menus and on my desktop is there another way to move the mouse relative to its position

try this:

Code: Select all

$F2::
Loop, 3
	;                                    ↓ Left or Right (Negative or Positive)
	DllCall("mouse_event", uint, 1, int, 2, int, 2, uint, 0, int, 0)
	;                                            ↑ Up or Down (Negative or Positive)
return
:wave: There is always more than one way to solve a problem. ;)
Tactical Shrimp
Posts: 31
Joined: 11 Nov 2015, 22:29

Re: Mouse Move doesnt work properly in windowed silkscreen games

09 Jul 2016, 13:45

the my problem i have with this is that it is too fast at 1 and it wont work if i set it lower then 1 is there another variable in there for the speed
User avatar
evilC
Posts: 4824
Joined: 27 Feb 2014, 12:30

Re: Mouse Move doesnt work properly in windowed silkscreen games

11 Jul 2016, 08:53

When using mouse_event with a value of 1, it is the SPEED at which you send them (ie the time delay between each mouse_event call) that dictates the speed of movement.
With a real mouse, these would typically happen at a very fast rate (eg one every 1ms)
Unfortunately with AHK, the lowest value that will work with Sleep is 10

So chuck a Sleep 10 in the loop.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 79 guests