Skip to content

Commit

Permalink
- moveXorY() tooltips will no longer flicker
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomshiii committed Sep 27, 2022
1 parent 0ae402b commit b9010ed
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 21 deletions.
50 changes: 29 additions & 21 deletions Functions/Windows.ahk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
;\\CURRENT SCRIPT VERSION\\This is a "script" local version and doesn't relate to the Release Version
;\\v2.13.3
;\\v2.13.4
#Include General.ahk

; ===========================================================================================================================================
Expand Down Expand Up @@ -357,51 +357,55 @@ moveXorY()
start:
oneAxis(sc)
{
if GetKeyState(sc, "P") ;move on X axis
while GetKeyState(sc, "P")
{
MouseMove(x,y)
loop {
SetTimer(tools, 15)
tools() {
MouseGetPos(&xx, &yy)
static toolx := xx
static tooly := yy
if A_TimeIdleMouse < 500
{
if sc = "XButton2"
ToolTip("Your mouse will now only move along the x axis")
else if sc = "XButton1"
ToolTip("Your mouse will now only move along the y axis")
}
MouseGetPos(&newX, &newY)
if sc = "XButton2"
MouseMove(newX, y)
else if sc = "XButton1"
MouseMove(x, newY)
if not GetKeyState(sc, "P")
{
ToolTip("")
return
}
if A_TimeIdleMouse > 500
{
MouseGetPos(&newX, &newY)
if sc = "XButton2"
{
if newY = y
ToolTip("Your mouse will now only move along the x axis`nYou are currently level on the y axis")
if newY = y && newX != toolx
{
ToolTip("Your mouse will now only move along the x axis`nYou are currently level on the y axis")
toolx := newX
}
}
else if sc = "XButton1"
{
if newX = x
ToolTip("Your mouse will now only move along the y axis`nYou are currently level on the x axis")
if newX = x && newY != tooly
{
ToolTip("Your mouse will now only move along the y axis`nYou are currently level on the x axis")
tooly := newY
}
}
}
}
MouseGetPos(&newX, &newY)
if sc = "XButton2"
MouseMove(newX, y)
else if sc = "XButton1"
MouseMove(x, newY)
}
SetTimer(tools, 0)
ToolTip("")
}
oneAxis(sc)
if sc != "XButton1" || sc != "XButton2"
return
if GetKeyState(fr, "P")
goto start
else
return
}

/**
Expand Down Expand Up @@ -686,7 +690,11 @@ vscode(script)
coordw()
blockOn()
MouseGetPos(&x, &y)
if ImageSearch(&xex, &yex, 0, 0, 460, 1390, "*2 " VSCodeImage "explorer.png") || ImageSearch(&xex, &yex, 0, 0, 460, 1390, "*2 " VSCodeImage "explorer2.png") ;this imagesearch is checking to ensure you're in the explorer tab
if (
ImageSearch(&xex, &yex, 0, 0, 460, 1390, "*2 " VSCodeImage "explorer.png") ||
ImageSearch(&xex, &yex, 0, 0, 460, 1390, "*2 " VSCodeImage "explorer2.png") ||
ImageSearch(&xex, &yex, 0, 0, 460, 1390, "*2 " VSCodeImage "explorer3.png")
) ;this imagesearch is checking to ensure you're in the explorer tab
{
MouseMove(xex, yex)
SendInput("{Click}")
Expand Down
Binary file added Support Files/ImageSearch/VSCode/explorer3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Support Files/ImageSearch/VSCode/folderDrop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Alongside those two scripts, this update brings along a dark theme to certain GU
- `getMouseMonitor()` now returns a function object and passes back all information
- `toolCust()` can now take custom `x` & `y` coordinates. They are unset by default and can be omitted. It can also accept the `WhichToolTip` parameter from the actual `ToolTip` function
- `zoom()` now resets toggle values after 10 seconds
- `moveXorY()` tooltips will no longer flicker

`settingsGUI()`
- Minor GUI tweaks
Expand Down

0 comments on commit b9010ed

Please sign in to comment.