Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

0
Seeking assistance for creating a Z-key toggle of Lclick-hold by changing it to an Mclick hold of the MMB
Post Flair (click to view more posts with a particular flair)
Post Body

Sup folks. I'm a simple guy, with simple tastes.

I already have a similar AHK script for that I use for Minecraft:

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


*z::Send % "{Click " . ( GetKeyState("LButton") ? "Up}" : "Down}" )

*x::Send % "{Click " . ( GetKeyState("RButton") ? "Up r}" : "Down r}" )

*y::Send % "{Shift" . ( GetKeyState("LShift") ? "Up}" : "Down}" )

(Honestly unsure what lines 1-4 are for as I copied them from another source, but for whatever reason I decided to keep them because I dimly recall that omitting them caused an undesired behavior.)

TLDR: In my existing script, I can toggle Lclick-hold on and off with the Z-key. In a different game title, my interest is to Mclick-hold instead, but just changing the reference to <"Mbutton"> seems to cause the Lclick to be held instead of the Mclick that I'm looking for. I'd appreciate any help on this, thanks!

Pompous windbag version:

When I press the Z-key in my sample, it toggles Lclick-hold, which I can toggle off either with the Z-key again, or my actually Lclicking with the mouse. The X-key does the same, but with Rclick. The Y-key performs the same function with Lshift-hold.

I have no shame in admitting that the first few lines I got were from another source, and I'm only vaguely aware of what it does, but I do recall that omitting it entirely resulted in some unwanted behavior (years ago, I don't recall details, sorry) and so I decided to include it.

I know that it's possible to leave it always-on and simply code it to work in Minecraft and in no other context, but until my current efforts just now, there's never been any reason to worry about that. I simply turn it on before entering the game client, and I use my mouse in the systray to turn it off when I'm done. (And it's been almost 6 months since I last entered Minecraft anyway.)

~~~

My new goal is in the context of playing Farming Simulator 19 (stop judging me.) I'm attempting to design a new game map, and the landscaping and terrain-editing tools are clunky. Specifically, the "smoothe" function is performed by click-holding the MiddleMouseButton. My problem is that if I have extended periods were I need to perform a lot of terrain smoothing, every additional second of manual click-holding the MMB is another second where I risk accidentally scrolling a single notch on the wheel, or accidentally Lclick or Rclick. Additionally, the map design GUI makes it to that any terrain that exhibits grown-grass is a way for me to know that it was present when I loaded into the map to continue working on it, or when I actually use the terrain paintbrush to actually place already-grown-grass. Once an active toolbrush passes over it, including the smoothing tool, the grass growth is removed and only the bare "green carpet" texture appears on the terrain. And since the smooth-tool makes essentially no changes to previously-contoured terrain, I find that one way to keep track of where I've worked and what parts I skipped would be to keep the MMB click-hold active, and it turns into a single-session trail of breadcrumbs for me to retrace my steps as I doodle and tweak between points of interest that I'm working on.

Author
Account Strength
100%
Account Age
7 years
Verified Email
Yes
Verified Flair
No
Total Karma
94,028
Link Karma
5,016
Comment Karma
86,126
Profile updated: 6 days ago
Posts updated: 4 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago