What I want:
When I move my mouse fully to the left side of the screen, I want it to switch to my Virtual Desktop to the left. (CTRL+WIN+LEFT)
When I move my mouse fully to the right side of the screen, I want it to switch to my Virtual Desktop to the right. (CTRL+WIN+RIGHT)
I got this code already, but only leftside works, and it only works once.
(Parts of it are from code I found from other programs that kind of work the same. So I don't know a lot of the code)
(Inspired by "AltEdge" by "Skrommel's One Hour Software")
=========================================================================================================================================
Code: Select all
#NoEnv
#Persistent,On
#SingleInstance,Force
#WinActivateForce
SetBatchLines,-1
SetWinDelay,0
SetKeyDelay,0
CoordMode,Mouse,Screen
applicationname=WinTab
Loop
{
MouseGetPos,mx,my
If (mx=0)
{
; #LCtrl:: ; switch to previous desktop with Windows key + Left CTRL key
SendInput #^{Left}
Return
}
Sleep,50
}
Loop
{
MouseGetPos,mx,my
If (mx=1920)
{
; #LCtrl:: ; switch to previous desktop with Windows key + Left CTRL key
SendInput #^{Right}
}
Sleep,50
}
; TAB:
; Send,{LWin Down}{Tab}
; Return
WM_MOUSEMOVE(wParam,lParam)
{
Global hCurs
MouseGetPos,,,,ctrl
If ctrl in Static8,Static12,Static16
DllCall("SetCursor","UInt",hCurs)
Return
}
Return
EXIT:
ExitApp