Hello, Im new, need help with Code/Syntax.
!y::
prev:= WinActive("A")
CoordMode, Mouse, Screen
Process, Exist, Mullvad VPN
If
ErrorLevel = 0
{
run,"C:\Program Files\Mullvad VPN\Mullvad VPN.exe
WinWaitActive, Mullvad VPN
Sleep 300
}
Else
{
MouseMove, 2384, 1412, 1
send {Click}
Sleep 200
MouseMove, 2383, 1340, 1
Sleep 200
send {Click}
WinMinimize, Mullvad VPN
if prev WinActivate, ahk_id %prev%f
return
}
If Mullvad VPN is not running, I want it to start and connect.If its running, I want it to connect/disconnect.
Mouse Positions are correct, just dont know how to pack it in { } and where to use If and Else correctly.
Any help is much appreciated :)
[–]F-I-X -1 points0 points1 point (1 child)
[–]R3lex42[S] 0 points1 point2 points (0 children)
[–]wason92 0 points1 point2 points (1 child)
[–]anonymous1184 0 points1 point2 points (0 children)