My code so far(it's not very good!):
Code: Select all
#include ;file location
#If WinActive("ahk_exe chrome.exe")
#If InStr(GetActiveBrowserURL(),"cad.onshape.com/documents/")
MButton::!MButton
#If
#If
Code: Select all
#include ;file location
#If WinActive("ahk_exe chrome.exe")
#If InStr(GetActiveBrowserURL(),"cad.onshape.com/documents/")
MButton::!MButton
#If
#If
Code: Select all
Key::
If (GetActiveBrowserURL()!="something")
Send, key
; ...
return
Code: Select all
#Include PATH TO FILE WITH FUNCTION ;file location
#If WinActive("ahk_exe chrome.exe")
MButton::
IF( InStr(GetActiveBrowserURL(),"cad.onshape.com/documents/") )
Send, !{MButton}
Else
Send, {MButton}
Return
#If
Code: Select all
MButton::
IF( InStr(GetActiveBrowserURL(),"cad.onshape.com/documents/") ) {
Send, !{MButton Down}
While GetKeyState("MButton", "P")
Continue
Send {MButton Up}
}
Else {
Send, {MButton Down}
While GetKeyState("MButton", "P")
Continue
Send {MButton Up}
}
Return
Code: Select all
#include C:\Program Files\AutoHotkey\My Scripts\geturl.ahk
#If WinActive("ahk_exe chrome.exe")
~MButton::
IF( InStr(GetActiveBrowserURL(),"cad.onshape.com/documents/") ) {
while GetKeyState("MButton", "P")==1
Sendevent, {Alt down}{MButton Down}
sendevent,{Alt up}{Mbutton up}
}
sendevent,{alt up}
Return
#If
Code: Select all
Sendevent, {Alt down} ; Push the button down only once
while (GetKeyState("MButton", "P")) ; No need to test if it equals 1, since it does that behaviour by default.
Continue
sendevent,{Alt up}
Users browsing this forum: Mannaia666 and 138 guests