Focusjump.ahk: Difference between revisions

From Lucca's Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
Line 1: Line 1:
#Requires AutoHotkey v2.0
#Requires AutoHotkey v2.0
;Make a file in the script's folder called lefthanded.txt if you do want left handed keybinds
;Make a file in the script's folder called lefthanded.txt if you do want left handed keybinds
A_MaxHotkeysPerInterval := 20000
A_MaxHotkeysPerInterval := 20000




;CapsLock, Numlock, and ScrollLock state
;CapsLock, Numlock, and ScrollLock state
SetCapsLockState "AlwaysOff"
SetCapsLockState "AlwaysOff"
SetScrollLockState "AlwaysOff"
SetScrollLockState "AlwaysOff"
SetNumLockState "AlwaysOff"
SetNumLockState "AlwaysOff"


;Screenshot on PrintScreen Key & f14
;Screenshot on PrintScreen Key & f14
F14::
F14::
PrintScreen::Run "ms-screenclip:"
PrintScreen::Run "ms-screenclip:"


;ScreenConnect Only Hotkeys:
;ScreenConnect Only Hotkeys:
#HotIf WinActive("ahk_exe ScreenConnect.ClientService.exe") or WinActive("ahk_exe ScreenConnect.WindowsClient.exe")
#HotIf WinActive("ahk_exe ScreenConnect.ClientService.exe") or WinActive("ahk_exe ScreenConnect.WindowsClient.exe")
#HotIf
#HotIf


#h::Run "hudu_search\hudusearch.bat"
#h::Run "hudu_search\hudusearch.bat"


;Clipboard buffers
;Clipboard buffers
clipboardBufferArray := []
clipboardBufferArray := []
clipboardBufferArray.Length := 9
clipboardBufferArray.Length := 9
clipboardBufferArray.Default := "No value set for this clipboard buffer"
clipboardBufferArray.Default := "No value set for this clipboard buffer"


NumpadEnd::clipboardBufferArray[1] := clipboardBufferWriteIn(1)
NumpadEnd::clipboardBufferArray[1] := clipboardBufferWriteIn(1)
NumpadDown::clipboardBufferArray[2] := clipboardBufferWriteIn(2)
NumpadDown::clipboardBufferArray[2] := clipboardBufferWriteIn(2)
NumpadPgDn::clipboardBufferArray[3] := clipboardBufferWriteIn(3)
NumpadPgDn::clipboardBufferArray[3] := clipboardBufferWriteIn(3)
NumpadLeft::clipboardBufferArray[4] := clipboardBufferWriteIn(4)
NumpadLeft::clipboardBufferArray[4] := clipboardBufferWriteIn(4)
NumpadClear::clipboardBufferArray[5] := clipboardBufferWriteIn(5)
NumpadClear::clipboardBufferArray[5] := clipboardBufferWriteIn(5)
NumpadRight::clipboardBufferArray[6] := clipboardBufferWriteIn(6)
NumpadRight::clipboardBufferArray[6] := clipboardBufferWriteIn(6)
NumpadHome::clipboardBufferArray[7] := clipboardBufferWriteIn(7)
NumpadHome::clipboardBufferArray[7] := clipboardBufferWriteIn(7)
NumpadUp::clipboardBufferArray[8] := clipboardBufferWriteIn(8)
NumpadUp::clipboardBufferArray[8] := clipboardBufferWriteIn(8)
NumpadPgUp::clipboardBufferArray[9] := clipboardBufferWriteIn(9)
NumpadPgUp::clipboardBufferArray[9] := clipboardBufferWriteIn(9)




#+1::clipboardBufferArray[1] := clipboardBuffer(1)
#+1::clipboardBufferArray[1] := clipboardBuffer(1)
#+2::clipboardBufferArray[2] := clipboardBuffer(2)
#+2::clipboardBufferArray[2] := clipboardBuffer(2)
#+3::clipboardBufferArray[3] := clipboardBuffer(3)
#+3::clipboardBufferArray[3] := clipboardBuffer(3)
#+4::clipboardBufferArray[4] := clipboardBuffer(4)
#+4::clipboardBufferArray[4] := clipboardBuffer(4)
#+5::clipboardBufferArray[5] := clipboardBuffer(5)
#+5::clipboardBufferArray[5] := clipboardBuffer(5)
#+6::clipboardBufferArray[6] := clipboardBuffer(6)
#+6::clipboardBufferArray[6] := clipboardBuffer(6)
#+7::clipboardBufferArray[7] := clipboardBuffer(7)
#+7::clipboardBufferArray[7] := clipboardBuffer(7)
#+8::clipboardBufferArray[8] := clipboardBuffer(8)
#+8::clipboardBufferArray[8] := clipboardBuffer(8)
#+9::clipboardBufferArray[9] := clipboardBuffer(9)
#+9::clipboardBufferArray[9] := clipboardBuffer(9)
NumpadIns & NumpadEnd::send("{Raw}" clipboardBufferArray[1])
NumpadIns & NumpadEnd::send("{Raw}" clipboardBufferArray[1])
NumpadIns & NumpadDown::send("{Raw}" clipboardBufferArray[2])
NumpadIns & NumpadDown::send("{Raw}" clipboardBufferArray[2])
NumpadIns & NumpadPgDn::send("{Raw}" clipboardBufferArray[3])
NumpadIns & NumpadPgDn::send("{Raw}" clipboardBufferArray[3])
NumpadIns & NumpadLeft::send("{Raw}" clipboardBufferArray[4])
NumpadIns & NumpadLeft::send("{Raw}" clipboardBufferArray[4])
NumpadIns & NumpadClear::send("{Raw}" clipboardBufferArray[5])
NumpadIns & NumpadClear::send("{Raw}" clipboardBufferArray[5])
NumpadIns & NumpadRight::send("{Raw}" clipboardBufferArray[6])
NumpadIns & NumpadRight::send("{Raw}" clipboardBufferArray[6])
NumpadIns & NumpadHome::send("{Raw}" clipboardBufferArray[7])
NumpadIns & NumpadHome::send("{Raw}" clipboardBufferArray[7])
NumpadIns & NumpadUp::send("{Raw}" clipboardBufferArray[8])
NumpadIns & NumpadUp::send("{Raw}" clipboardBufferArray[8])
NumpadIns & NumpadPgUp::send("{Raw}" clipboardBufferArray[9])
NumpadIns & NumpadPgUp::send("{Raw}" clipboardBufferArray[9])




clipboardBuffer(bufferID){
clipboardBuffer(bufferID){
Send("^c")
Send("^c")
Sleep 100
Sleep 100
newClip := A_Clipboard
newClip := A_Clipboard
MsgBox "Stored to clip buffer " bufferID ":`n===============`n`n " newClip ,, "T0.3"
MsgBox "Stored to clip buffer " bufferID ":`n===============`n`n " newClip ,, "T0.3"
return(newClip)
return(newClip)
}
}
clipboardBufferWriteIn(bufferID){
clipboardBufferWriteIn(bufferID){
newClip := clipboardBufferArray[bufferID]
newClip := clipboardBufferArray[bufferID]
newClip := InputBox("Write into buffer",,, clipboardBufferArray[bufferID]).value
newClip := InputBox("Write into buffer",,, clipboardBufferArray[bufferID]).value
MsgBox "Stored to clip buffer " bufferID ":`n===============`n`n " newClip ,, "T0.3"
MsgBox "Stored to clip buffer " bufferID ":`n===============`n`n " newClip ,, "T0.3"
return(newClip)
return(newClip)
}
}


clipboardBufferAuto(bufferID){
clipboardBufferAuto(bufferID){
oldClip := A_Clipboard
oldClip := A_Clipboard
A_Clipboard := ""
A_Clipboard := ""
Send "^c"
Send "^c"
;if !ClipWait(2)
;if !ClipWait(2)
{
{
MsgBox "The attempt to copy text onto the clipboard failed."
  MsgBox "The attempt to copy text onto the clipboard failed."
return
  return
}
}
newClip := A_Clipboard
newClip := A_Clipboard
MsgBox "Stored to clip buffer " bufferID ":`n===============`n`n " newClip
MsgBox "Stored to clip buffer " bufferID ":`n===============`n`n " newClip
A_Clipboard := oldClip
A_Clipboard := oldClip
return(newClip)
return(newClip)
}
}


;quick hudu copy
;quick hudu copy
#Backspace::{
#Backspace::{
huduCopy(1)
huduCopy(1)
huduCopy(2)
huduCopy(2)
huduCopy(3)
huduCopy(3)
}
}
#+Backspace::{
#+Backspace::{
huduCopy(1)
huduCopy(1)
huduCopy(2)
huduCopy(2)
}
}
huduCopy(bufferID){
huduCopy(bufferID){
A_Clipboard := ""
A_Clipboard := ""
;KeyWait "LButton", "D"
;KeyWait "LButton", "D"
Click
Click
ClipWait
ClipWait
clipboardBufferArray[bufferID] := A_Clipboard
clipboardBufferArray[bufferID] := A_Clipboard
MouseMove 25, 0, 1000, "R"
MouseMove 25, 0, 1000, "R"
Sleep 50
Sleep 50
}
}




;Wiki Code block setup
;Wiki Code block setup
!+end::{
!+end::{
Send "{home}"
Send "{home}"
Sleep 50
Sleep 50
Send "+{end}"
Send "+{end}"
Sleep 50
Sleep 50
Send "^x"
Send "^x"
Sleep 50
Sleep 50
Send "<code>"
Send "<code>"
Sleep 50
Sleep 50
Send "^v"
Send "^v"
Sleep 50
Sleep 50
Send "</code>"
Send "</code>"
}
}


;Hotstrings:
;Hotstrings:
::smth::something
::smth::something
::wfh::working from home
::wfh::working from home
::pcn::PC Name:
::pcn::PC Name:
::i::I
::i::I
::cg2g::closing g2g
::cg2g::closing g2g
; ::lmk::let me know
; ::lmk::let me know
::atp::at this point
::atp::at this point
::btw::by the way
::btw::by the way
::idk::I don't know
::idk::I don't know
::ik::I know
::ik::I know
::ig::I guess
::ig::I guess
::mip::Marked ticket as "In Progress"
::mip::Marked ticket as "In Progress"
::ctt::Called to troubleshoot, `n`n
::ctt::Called to troubleshoot, `n`n
::w2vm::Called, went to voicemail.
::w2vm::Called, went to voicemail.
::cw2vm::Called, went to voicemail.
::cw2vm::Called, went to voicemail.
::clavm::Called, left a voicemail.
::clavm::Called, left a voicemail.
::iirc::if I recall correctly
::iirc::if I recall correctly
::afaik::as far as I know
::afaik::as far as I know
::wdym::what do you mean
::wdym::what do you mean
::myemail::gianlucca.pirovano@wheelhouseit.com
::myemail::gianlucca.pirovano@wheelhouseit.com
!+e::Send("gianlucca.pirovano@wheelhouseit.com")
!+e::Send("gianlucca.pirovano@wheelhouseit.com")
;!+p::Send("PC Name:")
;!+p::Send("PC Name:")
::todaysdate::{
::todaysdate::{
TimeString := FormatTime("ddd, MMM dd, yyyy hh:mm")
TimeString := FormatTime("ddd, MMM dd, yyyy hh:mm")
send(TimeString)
send(TimeString)
}
}
::tylp::{
::tylp::{
Send "{Raw}`n`nThank you and have a wonderful rest of your day!`nLucca P."
Send "{Raw}`n`nThank you and have a wonderful rest of your day!`nLucca P."
}
}
::nphawd::
::nphawd::
{
{
SendText "No problem! Have a wonderful rest of your day."
SendText "No problem! Have a wonderful rest of your day."
}
}
!g::SendText "Hello, this is Lucca with Wheelhouse IT."
!g::SendText "Hello, this is Lucca with Wheelhouse IT."
!+g::SendText "No problem! Have a wonderful rest of your day."
!+g::SendText "No problem! Have a wonderful rest of your day."
::acc::account
::acc::account
#+e::Run '"C:\Users\Gianlucca.Pirovano\OneDrive - Wheelhouse IT\Documents\Scripts\copyResponses.py" "8"'
#+e::Run '"C:\Users\Gianlucca.Pirovano\OneDrive - Wheelhouse IT\Documents\Scripts\copyResponses.py" "8"'






;RC Hotkeys
;RC Hotkeys
numpadDel::^!+#f1 ; Enter Number
numpadDel::^!+#f1 ; Enter Number
numpadDiv::^!+#f2 ; Mute
numpadDiv::^!+#f2 ; Mute
numpadMult::^!+#f3 ; Hold
numpadMult::^!+#f3 ; Hold
;numpadSub::endCall() ; End Call
;numpadSub::endCall() ; End Call
numpadAdd::^!+#f5 ; Transfer
numpadAdd::^!+#f5 ; Transfer
NumLock::rcFocus()
NumLock::rcFocus()


;Focus Apps
;Focus Apps
focusOutlook(){
focusOutlook(){
WinActivate("ahk_exe OUTLOOK.EXE")
WinActivate("ahk_exe OUTLOOK.EXE")
CenterMouseOnActiveWindow()
CenterMouseOnActiveWindow()
}
}
minimizeOutlook(){
minimizeOutlook(){
WinMinimize("ahk_exe OUTLOOK.EXE")
WinMinimize("ahk_exe OUTLOOK.EXE")
}
}
!o::focusOutlook()
!o::focusOutlook()
!+o::minimizeOutlook()
!+o::minimizeOutlook()


;Each Monitor's Center Coordinates (Relative to the primary monitor), change these as needed
;Each Monitor's Center Coordinates (Relative to the primary monitor), change these as needed
if !(FileExist(A_Desktop . "\luccaworkingfromhome.txt")){
if !(FileExist(A_Desktop . "\luccaworkingfromhome.txt")){
mon1x := -447
mon1x := -447
mon1y := 543
mon1y := 543
mon2x := 964
mon2x := 964
mon2y := 552
mon2y := 552
mon3x := 2479
mon3x := 2479
mon3y := 52
mon3y := 52
mon4x := 2032
mon4x := 2032
mon4y := 1488
mon4y := 1488
mon5x := 835
mon5x := 835
mon5y := 1511
mon5y := 1511
mon6x := 3462
mon6x := 3462
mon6y := 662
mon6y := 662
mon7x := 2278
mon7x := 2278
mon7y := 2434
mon7y := 2434
mon7leftx := 2042
mon7leftx := 2042
mon7rightx := 2516
mon7rightx := 2516
mon7topy := 2042
mon7topy := 2042
mon7bottomy := 2837
mon7bottomy := 2837
}
}
if (FileExist(A_Desktop . "\luccaworkingfromhome.txt")){
if (FileExist(A_Desktop . "\luccaworkingfromhome.txt")){
mon1x := -807
mon1x := -807
mon1y := -527
mon1y := -527
mon2x := 1215
mon2x := 1215
mon2y := -543
mon2y := -543
mon3x := 645
mon3x := 645
mon3y := 475
mon3y := 475
mon4x := -655
mon4x := -655
mon4y := 395
mon4y := 395
mon5x := 835
mon5x := 835
mon5y := 1511
mon5y := 1511
mon6x := 3462
mon6x := 3462
mon6y := 662
mon6y := 662
mon7x := 2278
mon7x := 2278
mon7y := 2434
mon7y := 2434
mon7leftx := 2042
mon7leftx := 2042
mon7rightx := 2516
mon7rightx := 2516
mon7topy := 2042
mon7topy := 2042
mon7bottomy := 2837
mon7bottomy := 2837
}
}


#HotIf (FileExist(A_Desktop . "\luccaworkingfromhome.txt"))
#HotIf (FileExist(A_Desktop . "\luccaworkingfromhome.txt"))
#HotIf
#HotIf


;RingCentral X and Y coordinate
;RingCentral X and Y coordinate
rcX := 1170
rcX := 1170
rcY := 1253
rcY := 1253


;reload this script with hotkey Alt+Shift+R to apply changes
;reload this script with hotkey Alt+Shift+R to apply changes
!+r::Reload
!+r::Reload


;open powershell on ctrl+alt+t
;open powershell on ctrl+alt+t
;^!t::Run "pwsh -Noexit"
;^!t::Run "pwsh -Noexit"






;Move Windows between monitors:
;Move Windows between monitors:
#HotIf !(FileExist("lefthanded.txt"))
#HotIf !(FileExist("lefthanded.txt"))
#+z::MoveWindowToMonitor(mon1x,mon1y)
#+z::MoveWindowToMonitor(mon1x,mon1y)
#+x::MoveWindowToMonitor(mon2x,mon2y)
#+x::MoveWindowToMonitor(mon2x,mon2y)
#+c::MoveWindowToMonitor(mon3x,mon3y)
#+c::MoveWindowToMonitor(mon3x,mon3y)
#+v::MoveWindowToMonitor(mon4x,mon4y)
#+v::MoveWindowToMonitor(mon4x,mon4y)
#HotIf
#HotIf


;Move focus between montiors:
;Move focus between montiors:
#HotIf !(FileExist("lefthanded.txt"))
#HotIf !(FileExist("lefthanded.txt"))
#v::FocusMonitor(mon4x,mon4y)
#v::FocusMonitor(mon4x,mon4y)
#z::FocusMonitor(mon1x,mon1y)
#z::FocusMonitor(mon1x,mon1y)
#x::FocusMonitor(mon2x,mon2y)
#x::FocusMonitor(mon2x,mon2y)
#c::FocusMonitor(mon3x,mon3y)
#c::FocusMonitor(mon3x,mon3y)
#HotIf
#HotIf


;Snap Windows to sides of screen:
;Snap Windows to sides of screen:
#HotIf !(FileExist("lefthanded.txt"))
#HotIf !(FileExist("lefthanded.txt"))
$#a::SnapLeft()
$#a::SnapLeft()
$#s::SnapDown()
$#s::SnapDown()
$#w::SnapUp()
$#w::SnapUp()
$#d::SnapRight()
$#d::SnapRight()
#HotIf
#HotIf


;Automatically request from chatgpt and copy to clipboard
;Automatically request from chatgpt and copy to clipboard
!Insert::{
!Insert::{
callername := InputBox("What is the caller's name?", "Caller Name Input",, "Mario")
callername := InputBox("What is the caller's name?", "Caller Name Input",, "Mario")
companyname := InputBox("What is the company's name?", "Caller Name Input",, "Company's name")
companyname := InputBox("What is the company's name?", "Caller Name Input",, "Company's name")
affectedusers := InputBox("Who are the affected users?", "Caller Name Input",, "everyone!!!!! HELP!")
affectedusers := InputBox("Who are the affected users?", "Caller Name Input",, "everyone!!!!! HELP!")
listofproblems := InputBox("What are all of the problems", "Caller Name Input",, "The cobblestone generator.")
listofproblems := InputBox("What are all of the problems", "Caller Name Input",, "The cobblestone generator.")
input := InputBox("What will you send to ChatGPT", "inputbox", "w1200 h300", "Summarize the following facts into a complete sentence (or sentences), reply only with the summary and begin your response with 'caller is calling in regarding', replace 'caller' with the caller's name if available. Always mention the client name if available. Mention the names of affected users if available and never speculate: The caller's name is " . callername . ", the client's name is " . companyname . ", The problem is affecting " . affectedusers . ". " . listofproblems . ".")
input := InputBox("What will you send to ChatGPT", "inputbox", "w1200 h300", "Summarize the following facts into a complete sentence (or sentences), reply only with the summary and begin your response with 'caller is calling in regarding', replace 'caller' with the caller's name if available. Always mention the client name if available. Mention the names of affected users if available and never speculate: The caller's name is " . callername . ", the client's name is " . companyname . ", The problem is affecting " . affectedusers . ". " . listofproblems . ".")


Run Format('"C:\Python312\python.exe" "C:\Users\Gianlucca.Pirovano\OneDrive - Wheelhouse IT\Documents\Scripts\ai.py" "{1}"', input.Value),,"Min"
Run Format('"C:\Python312\python.exe" "C:\Users\Gianlucca.Pirovano\OneDrive - Wheelhouse IT\Documents\Scripts\ai.py" "{1}"', input.Value),,"Min"
}
}


;Left Handed Keybinds!
;Left Handed Keybinds!
#HotIf (FileExist("lefthanded.txt"))
#HotIf (FileExist("lefthanded.txt"))
;Escape::Lwin
;Escape::Lwin
Capslock & a::Lwin
Capslock & a::Lwin
CapsLock & h::Left
CapsLock & h::Left
CapsLock & j::Down
CapsLock & j::Down
CapsLock & k::Up
CapsLock & k::Up
CapsLock & l::Right
CapsLock & l::Right
!+j::^+PgDn
!+j::^+PgDn
!+k::^+PgUp
!+k::^+PgUp
!j::^PgDn
!j::^PgDn
!k::^PgUp
!k::^PgUp
!h::!Left
!h::!Left
!l::!Right
!l::!Right
!+f::^+f
!+f::^+f
!x::^w
!x::^w
!+x::^+t
!+x::^+t


;#+r::Run Format('"C:\Python312\python.exe" "C:\Users\Gianlucca.Pirovano\OneDrive - Wheelhouse IT\Documents\Scripts\ai.py" "{1}"', input.Value),,"Min"
;#+r::Run Format('"C:\Python312\python.exe" "C:\Users\Gianlucca.Pirovano\OneDrive - Wheelhouse IT\Documents\Scripts\ai.py" "{1}"', input.Value),,"Min"
#+r::Run "C:\Users\Gianlucca.Pirovano\OneDrive - Wheelhouse IT\Documents\Scripts\copyResponses.py"
#+r::Run "C:\Users\Gianlucca.Pirovano\OneDrive - Wheelhouse IT\Documents\Scripts\copyResponses.py"
#^r::Run "C:\Users\Gianlucca.Pirovano\OneDrive - Wheelhouse IT\Documents\Scripts\copyResponses-lol.py"
#^r::Run "C:\Users\Gianlucca.Pirovano\OneDrive - Wheelhouse IT\Documents\Scripts\copyResponses-lol.py"
CapsLock::Escape
CapsLock::Escape
;AppsKey::RWin
;AppsKey::RWin
AppsKey & space::Send "shutdown /L"
AppsKey & space::Send "shutdown /L"
AppsKey & m::Send "mmsys.cpl"
AppsKey & m::Send "mmsys.cpl"
AppsKey & u::{
AppsKey & u::{
CoordMode "Mouse", "Screen"
CoordMode "Mouse", "Screen"
Click(926, 94)
Click(926, 94)
}
}
Appskey & p::Send "ms-settings:printers"
Appskey & p::Send "ms-settings:printers"
Appskey & c::Send "control /name Microsoft.Printers"
Appskey & c::Send "control /name Microsoft.Printers"
Appskey & d::Send "DISM /Online /Cleanup-Image /RestoreHealth"
Appskey & d::Send "DISM /Online /Cleanup-Image /RestoreHealth"
Appskey & s::Send "Start-ADSyncSyncCycle -PolicyType Delta"
Appskey & s::Send "Start-ADSyncSyncCycle -PolicyType Delta"
Appskey & n::Send "net user /add whitadminlocal"
Appskey & n::Send "net user /add whitadminlocal"
Appskey & a::Send "net localgroup administrators whitadminlocal /add"
Appskey & a::Send "net localgroup administrators whitadminlocal /add"
Appskey & r::Send "shutdown /r /t 0"
Appskey & r::Send "shutdown /r /t 0"
Appskey & k::Send "rundll32.exe user32.dll,LockWorkStation"
Appskey & k::Send "rundll32.exe user32.dll,LockWorkStation"
>!\::!Tab
>!\::!Tab
>+!|::!+Tab
>+!|::!+Tab
^AppsKey::^z
^AppsKey::^z
!AppsKey::{
!AppsKey::{
Send('{f3}')
Send('{f3}')
WinWait("Manage: Work - Microsoft Edge", , 1)
WinWait("Manage: Work - Microsoft Edge", , 1)
MoveWindowToMonitor(mon6x,mon6y)
MoveWindowToMonitor(mon6x,mon6y)
SnapUp()
SnapUp()
}
}
;CapsLock & Space::Click
;CapsLock & Space::Click
CapsLock & Space::CenterMouseOnActiveWindow()
CapsLock & Space::CenterMouseOnActiveWindow()
Capslock & m::AppsKey
Capslock & m::AppsKey
;Insert::{
;Insert::{
;Send "^a"
;Send "^a"
;Sleep 5
;Sleep 5
;Send "^c"
;Send "^c"
;}
;}
^+Insert::{
^+Insert::{
Send "^a"
Send "^a"
Sleep 5
Sleep 5
Send "^+v"
Send "^+v"
}
}
^/::^x
^/::^x
^.::^c
^.::^c
^,::^v
^,::^v
^'::^a
^'::^a
^o::^t
^o::^t
^;::^s
^;::^s
!+Enter::Run "cmd"
!+Enter::Run "cmd"
#m::Run "msedge.exe -inprivate https://admin.microsoft.com"
#m::Run "msedge.exe -inprivate https://admin.microsoft.com"
#space::Click
#space::Click
AppsKey & ,::^F3
AppsKey & ,::^F3
AppsKey & .::!F3
AppsKey & .::!F3
AppsKey & /::^!F3
AppsKey & /::^!F3
AppsKey & Enter::+F3
AppsKey & Enter::+F3
AppsKey & l::#+F4
AppsKey & l::#+F4
AppsKey & `;::^+F4
AppsKey & `;::^+F4
AppsKey & '::#F4
AppsKey & '::#F4
AppsKey::AppsKey
AppsKey::AppsKey
#+i::f7
#+i::f7
>!]::WinClose "A"
>!]::WinClose "A"
^\::^Tab
^\::^Tab
^+\::^+Tab
^+\::^+Tab
;Move Windows between monitors:
;Move Windows between monitors:
!+M::MoveWindowToMonitor(mon4x,mon4y)
!+M::MoveWindowToMonitor(mon4x,mon4y)
!+N::MoveWindowToMonitor(mon5x,mon5y)
!+N::MoveWindowToMonitor(mon5x,mon5y)
!+,::MoveWindowToMonitor(mon1x,mon1y)
!+,::MoveWindowToMonitor(mon1x,mon1y)
!+.::MoveWindowToMonitor(mon2x,mon2y)
!+.::MoveWindowToMonitor(mon2x,mon2y)
!+/::MoveWindowToMonitor(mon3x,mon3y)
!+/::MoveWindowToMonitor(mon3x,mon3y)
!+\::{
!+\::{
MoveWindowToMonitor(mon6x,mon6y)
MoveWindowToMonitor(mon6x,mon6y)
SnapUp()
SnapUp()
}
}
;Move focus between montiors:
;Move focus between montiors:
!M::FocusMonitor(mon4x,mon4y)
!M::FocusMonitor(mon4x,mon4y)
!N::FocusMonitor(mon5x,mon5y)
!N::FocusMonitor(mon5x,mon5y)
!,::FocusMonitor(mon1x,mon1y)
!,::FocusMonitor(mon1x,mon1y)
#,::FocusMonitor(mon1x-960,mon1y)
#,::FocusMonitor(mon1x-960,mon1y)
!.::FocusMonitor(mon2x,mon2y)
!.::FocusMonitor(mon2x,mon2y)
!/::FocusMonitor(mon3x,mon3y)
!/::FocusMonitor(mon3x,mon3y)
!\::FocusMonitor(mon6x,mon6y)
!\::FocusMonitor(mon6x,mon6y)
#\::FocusMonitor(mon6x+300,mon6y+700)
#\::FocusMonitor(mon6x+300,mon6y+700)
#HotIf
#HotIf




;Functions:
;Functions:


TileThirds(third){
TileThirds(third){
number := third
number := third
Send "#z"
Send "#z"
sleep 100
sleep 100
Send "6"
Send "6"
sleep 150
sleep 150
Send number
Send number
}
}


CenterWindow(WinTitle)
CenterWindow(WinTitle)
{
{
Send "{LWin up}"
Send "{LWin up}"
WinGetPos &X, &Y, &W, &H, "A" ; xcoord ycoord width height activewindow
WinGetPos &X, &Y, &W, &H, "A" ; xcoord ycoord width height activewindow
WinRestore "A"
WinRestore "A"
Sleep 20
Sleep 20
WinMove X, Y, 512, 512, "A"
WinMove X, Y, 512, 512, "A"
Sleep 50
Sleep 50
}
}


Maximize(){
Maximize(){
WinRestore "A"
WinRestore "A"
WinMaximize "A"
WinMaximize "A"
}
}


SnapLeft(){
SnapLeft(){
;CenterWindow("A")
;CenterWindow("A")
;Sleep 70
;Sleep 70
Send "{Blind}#{Left}"
Send "{Blind}#{Left}"
}
}


SnapRight(){
SnapRight(){
;CenterWindow("A")
;CenterWindow("A")
;Sleep 70
;Sleep 70
Send "{Blind}#{Right}"
Send "{Blind}#{Right}"
}
}


SnapUp(){
SnapUp(){
;CenterWindow("A")
;CenterWindow("A")
;Send "{Blind}#{Up}"
;Send "{Blind}#{Up}"
;Sleep 70
;Sleep 70
Send "{Blind}#{Up}"
Send "{Blind}#{Up}"
}
}


SnapDown(){
SnapDown(){
;SnapUp()
;SnapUp()
;Sleep 500
;Sleep 500
;WinGetPos &X, &Y, &W, &H, "A" ; xcoord ycoord width height activewindow
;WinGetPos &X, &Y, &W, &H, "A" ; xcoord ycoord width height activewindow
;Y := Y+H
;Y := Y+H
;WinMove X, Y, W, H, "A"
;WinMove X, Y, W, H, "A"
Send "{Blind}#{Down}"
Send "{Blind}#{Down}"
}
}


SnapDownTest(){
SnapDownTest(){
WinGetPos &X, &Y, &W, &H, "A" ; xcoord ycoord width height activewindow
WinGetPos &X, &Y, &W, &H, "A" ; xcoord ycoord width height activewindow
Y := Y+H
Y := Y+H
WinMove X, Y, W, H, "A"
WinMove X, Y, W, H, "A"
}
}


SnapDownLeft(){
SnapDownLeft(){
SnapLeft()
SnapLeft()
Sleep 70
Sleep 70
Send "{Blind}#{Down}"
Send "{Blind}#{Down}"
}
}
SnapUpLeft(){
SnapUpLeft(){
SnapLeft()
SnapLeft()
Sleep 70
Sleep 70
Send "{Blind}#{Up}"
Send "{Blind}#{Up}"
}
}


SnapDownRight(){
SnapDownRight(){
SnapRight()
SnapRight()
Sleep 70
Sleep 70
Send "{Blind}#{Down}"
Send "{Blind}#{Down}"
}
}
SnapUpRight(){
SnapUpRight(){
SnapRight()
SnapRight()
Sleep 70
Sleep 70
Send "{Blind}#{Up}"
Send "{Blind}#{Up}"
}
}


MoveWindowToMonitor(xcoord, ycoord){
MoveWindowToMonitor(xcoord, ycoord){
WinRestore "A"
WinRestore "A"
WinMove xcoord, ycoord, 512, 512, "A"
WinMove xcoord, ycoord, 512, 512, "A"
DllCall("SetCursorPos", "int", xcoord, "int", ycoord)
DllCall("SetCursorPos", "int", xcoord, "int", ycoord)
Sleep 50
Sleep 50
WinMaximize "A"
WinMaximize "A"
}
}


FocusMonitor(xcoord, ycoord){
FocusMonitor(xcoord, ycoord){
DllCall("SetCursorPos", "int", xcoord, "int", ycoord)
DllCall("SetCursorPos", "int", xcoord, "int", ycoord)
MouseGetPos(,, &WinUMID)
MouseGetPos(,, &WinUMID)
WinActivate(WinUMID)
WinActivate(WinUMID)
}
}


CenterMouseOnActiveWindow(){
CenterMouseOnActiveWindow(){
Sleep 01
  Sleep 01
CoordMode "Mouse", "Screen"
  CoordMode "Mouse", "Screen"
WinGetPos &winTopL_x, &winTopL_y, &width, &height, "A"
  WinGetPos &winTopL_x, &winTopL_y, &width, &height, "A"
winCenter_x := winTopL_x + width/2
  winCenter_x := winTopL_x + width/2
winCenter_y := winTopL_y + height/2
  winCenter_y := winTopL_y + height/2
DllCall("SetCursorPos", "Int", winCenter_x, "Int", winCenter_y)
  DllCall("SetCursorPos", "Int", winCenter_x, "Int", winCenter_y)
}
}


AltClip(action){
AltClip(action){


}
}




;RC Functions
;RC Functions
endCall(){
endCall(){
ib := InputBox("Type the numbers 987 to end the call")
ib := InputBox("Type the numbers 987 to end the call")
if (ib.value = "987" and ib.result = "OK"){
if (ib.value = "987" and ib.result = "OK"){
Send("^!+#{f4}")
Send("^!+#{f4}")
}
}
}
}


rcFocus(){
rcFocus(){
CoordMode "Mouse", "Window"
CoordMode "Mouse", "Window"
WinActivate("ahk_exe softphone.exe")
WinActivate("ahk_exe softphone.exe")
MouseMove 60, 45
MouseMove 60, 45
}
}
rcStatusScreen(){
rcStatusScreen(){
CoordMode "Mouse", "Window"
CoordMode "Mouse", "Window"
WinActivate("ahk_exe softphone.exe")
WinActivate("ahk_exe softphone.exe")
Click 60, 45
Click 60, 45
}
}
!Home::
!Home::
numpadIns & numpadSub::{
numpadIns & numpadSub::{
rcStatusScreen()
rcStatusScreen()
Sleep 50
Sleep 50
Click 60, 280
Click 60, 280
}
}
!End::
!End::
numpadIns & numpadAdd::{
numpadIns & numpadAdd::{
rcStatusScreen()
rcStatusScreen()
Sleep 50
Sleep 50
Click 60, 370
Click 60, 370
}
}
numpadIns & numpadEnter::{
numpadIns & numpadEnter::{
rcStatusScreen()
rcStatusScreen()
Sleep 50
Sleep 50
Click 290, 460
Click 290, 460
}
}

Latest revision as of 17:26, 10 December 2024

#Requires AutoHotkey v2.0
;Make a file in the script's folder called lefthanded.txt if you do want left handed keybinds
A_MaxHotkeysPerInterval := 20000


;CapsLock, Numlock, and ScrollLock state
SetCapsLockState "AlwaysOff"
SetScrollLockState "AlwaysOff"
SetNumLockState "AlwaysOff"
;Screenshot on PrintScreen Key & f14
F14::
PrintScreen::Run "ms-screenclip:"
;ScreenConnect Only Hotkeys:
#HotIf WinActive("ahk_exe ScreenConnect.ClientService.exe") or WinActive("ahk_exe ScreenConnect.WindowsClient.exe")
#HotIf
#h::Run "hudu_search\hudusearch.bat"
;Clipboard buffers
clipboardBufferArray := []
clipboardBufferArray.Length := 9
clipboardBufferArray.Default := "No value set for this clipboard buffer"
NumpadEnd::clipboardBufferArray[1] := clipboardBufferWriteIn(1)
NumpadDown::clipboardBufferArray[2] := clipboardBufferWriteIn(2)
NumpadPgDn::clipboardBufferArray[3] := clipboardBufferWriteIn(3)
NumpadLeft::clipboardBufferArray[4] := clipboardBufferWriteIn(4)
NumpadClear::clipboardBufferArray[5] := clipboardBufferWriteIn(5)
NumpadRight::clipboardBufferArray[6] := clipboardBufferWriteIn(6)
NumpadHome::clipboardBufferArray[7] := clipboardBufferWriteIn(7)
NumpadUp::clipboardBufferArray[8] := clipboardBufferWriteIn(8)
NumpadPgUp::clipboardBufferArray[9] := clipboardBufferWriteIn(9)


#+1::clipboardBufferArray[1] := clipboardBuffer(1)
#+2::clipboardBufferArray[2] := clipboardBuffer(2)
#+3::clipboardBufferArray[3] := clipboardBuffer(3)
#+4::clipboardBufferArray[4] := clipboardBuffer(4)
#+5::clipboardBufferArray[5] := clipboardBuffer(5)
#+6::clipboardBufferArray[6] := clipboardBuffer(6)
#+7::clipboardBufferArray[7] := clipboardBuffer(7)
#+8::clipboardBufferArray[8] := clipboardBuffer(8)
#+9::clipboardBufferArray[9] := clipboardBuffer(9)
NumpadIns & NumpadEnd::send("{Raw}" clipboardBufferArray[1])
NumpadIns & NumpadDown::send("{Raw}" clipboardBufferArray[2])
NumpadIns & NumpadPgDn::send("{Raw}" clipboardBufferArray[3])
NumpadIns & NumpadLeft::send("{Raw}" clipboardBufferArray[4])
NumpadIns & NumpadClear::send("{Raw}" clipboardBufferArray[5])
NumpadIns & NumpadRight::send("{Raw}" clipboardBufferArray[6])
NumpadIns & NumpadHome::send("{Raw}" clipboardBufferArray[7])
NumpadIns & NumpadUp::send("{Raw}" clipboardBufferArray[8])
NumpadIns & NumpadPgUp::send("{Raw}" clipboardBufferArray[9])


clipboardBuffer(bufferID){
Send("^c")
Sleep 100
newClip := A_Clipboard
MsgBox "Stored to clip buffer " bufferID ":`n===============`n`n " newClip ,, "T0.3"
return(newClip)
}
clipboardBufferWriteIn(bufferID){
newClip := clipboardBufferArray[bufferID]
newClip := InputBox("Write into buffer",,, clipboardBufferArray[bufferID]).value
MsgBox "Stored to clip buffer " bufferID ":`n===============`n`n " newClip ,, "T0.3"
return(newClip)
}
clipboardBufferAuto(bufferID){
oldClip := A_Clipboard
A_Clipboard := ""
Send "^c"
;if !ClipWait(2)
{
 MsgBox "The attempt to copy text onto the clipboard failed."
 return
}
newClip := A_Clipboard
MsgBox "Stored to clip buffer " bufferID ":`n===============`n`n " newClip
A_Clipboard := oldClip
return(newClip)
}
;quick hudu copy
#Backspace::{
huduCopy(1)
huduCopy(2)
huduCopy(3)
}
#+Backspace::{
huduCopy(1)
huduCopy(2)
}
huduCopy(bufferID){
A_Clipboard := ""
;KeyWait "LButton", "D"
Click
ClipWait
clipboardBufferArray[bufferID] := A_Clipboard
MouseMove 25, 0, 1000, "R"
Sleep 50
}


;Wiki Code block setup
!+end::{
Send "{home}"
Sleep 50
Send "+{end}"
Sleep 50
Send "^x"
Sleep 50
Send ""
Sleep 50
Send "^v"
Sleep 50
Send ""
}
;Hotstrings:
::smth::something
::wfh::working from home
::pcn::PC Name:
::i::I
::cg2g::closing g2g
; ::lmk::let me know
::atp::at this point
::btw::by the way
::idk::I don't know
::ik::I know
::ig::I guess
::mip::Marked ticket as "In Progress"
::ctt::Called to troubleshoot, `n`n
::w2vm::Called, went to voicemail.
::cw2vm::Called, went to voicemail.
::clavm::Called, left a voicemail.
::iirc::if I recall correctly
::afaik::as far as I know
::wdym::what do you mean
::myemail::gianlucca.pirovano@wheelhouseit.com
!+e::Send("gianlucca.pirovano@wheelhouseit.com")
;!+p::Send("PC Name:")
::todaysdate::{
TimeString := FormatTime("ddd, MMM dd, yyyy hh:mm")
send(TimeString)
}
::tylp::{
Send "{Raw}`n`nThank you and have a wonderful rest of your day!`nLucca P."
}
::nphawd::
{
SendText "No problem! Have a wonderful rest of your day."
}
!g::SendText "Hello, this is Lucca with Wheelhouse IT."
!+g::SendText "No problem! Have a wonderful rest of your day."
::acc::account
#+e::Run '"C:\Users\Gianlucca.Pirovano\OneDrive - Wheelhouse IT\Documents\Scripts\copyResponses.py" "8"'


;RC Hotkeys
numpadDel::^!+#f1 ; Enter Number
numpadDiv::^!+#f2 ; Mute
numpadMult::^!+#f3 ; Hold
;numpadSub::endCall() ; End Call
numpadAdd::^!+#f5 ; Transfer
NumLock::rcFocus()
;Focus Apps
focusOutlook(){
WinActivate("ahk_exe OUTLOOK.EXE")
CenterMouseOnActiveWindow()
}
minimizeOutlook(){
WinMinimize("ahk_exe OUTLOOK.EXE")
}
!o::focusOutlook()
!+o::minimizeOutlook()
;Each Monitor's Center Coordinates (Relative to the primary monitor), change these as needed
if !(FileExist(A_Desktop . "\luccaworkingfromhome.txt")){
mon1x := -447
mon1y := 543
mon2x := 964
mon2y := 552
mon3x := 2479
mon3y := 52
mon4x := 2032
mon4y := 1488
mon5x := 835
mon5y := 1511
mon6x := 3462
mon6y := 662
mon7x := 2278
mon7y := 2434
mon7leftx := 2042
mon7rightx := 2516
mon7topy := 2042
mon7bottomy := 2837
}
if (FileExist(A_Desktop . "\luccaworkingfromhome.txt")){
mon1x := -807
mon1y := -527
mon2x := 1215
mon2y := -543
mon3x := 645
mon3y := 475
mon4x := -655
mon4y := 395
mon5x := 835
mon5y := 1511
mon6x := 3462
mon6y := 662
mon7x := 2278
mon7y := 2434
mon7leftx := 2042
mon7rightx := 2516
mon7topy := 2042
mon7bottomy := 2837
}
#HotIf (FileExist(A_Desktop . "\luccaworkingfromhome.txt"))
#HotIf
;RingCentral X and Y coordinate
rcX := 1170
rcY := 1253
;reload this script with hotkey Alt+Shift+R to apply changes
!+r::Reload
;open powershell on ctrl+alt+t
;^!t::Run "pwsh -Noexit"


;Move Windows between monitors:
#HotIf !(FileExist("lefthanded.txt"))
#+z::MoveWindowToMonitor(mon1x,mon1y)
#+x::MoveWindowToMonitor(mon2x,mon2y)
#+c::MoveWindowToMonitor(mon3x,mon3y)
#+v::MoveWindowToMonitor(mon4x,mon4y)
#HotIf
;Move focus between montiors:
#HotIf !(FileExist("lefthanded.txt"))
#v::FocusMonitor(mon4x,mon4y)
#z::FocusMonitor(mon1x,mon1y)
#x::FocusMonitor(mon2x,mon2y)
#c::FocusMonitor(mon3x,mon3y)
#HotIf
;Snap Windows to sides of screen:
#HotIf !(FileExist("lefthanded.txt"))
$#a::SnapLeft()
$#s::SnapDown()
$#w::SnapUp()
$#d::SnapRight()
#HotIf
;Automatically request from chatgpt and copy to clipboard
!Insert::{
callername := InputBox("What is the caller's name?", "Caller Name Input",, "Mario")
companyname := InputBox("What is the company's name?", "Caller Name Input",, "Company's name")
affectedusers := InputBox("Who are the affected users?", "Caller Name Input",, "everyone!!!!! HELP!")
listofproblems := InputBox("What are all of the problems", "Caller Name Input",, "The cobblestone generator.")
input := InputBox("What will you send to ChatGPT", "inputbox", "w1200 h300", "Summarize the following facts into a complete sentence (or sentences), reply only with the summary and begin your response with 'caller is calling in regarding', replace 'caller' with the caller's name if available. Always mention the client name if available. Mention the names of affected users if available and never speculate: The caller's name is " . callername . ", the client's name is " . companyname . ", The problem is affecting " . affectedusers . ". " . listofproblems . ".")
Run Format('"C:\Python312\python.exe" "C:\Users\Gianlucca.Pirovano\OneDrive - Wheelhouse IT\Documents\Scripts\ai.py" "{1}"', input.Value),,"Min"
}
;Left Handed Keybinds!
#HotIf (FileExist("lefthanded.txt"))
;Escape::Lwin
Capslock & a::Lwin
CapsLock & h::Left
CapsLock & j::Down
CapsLock & k::Up
CapsLock & l::Right
!+j::^+PgDn
!+k::^+PgUp
!j::^PgDn
!k::^PgUp
!h::!Left
!l::!Right
!+f::^+f
!x::^w
!+x::^+t
;#+r::Run Format('"C:\Python312\python.exe" "C:\Users\Gianlucca.Pirovano\OneDrive - Wheelhouse IT\Documents\Scripts\ai.py" "{1}"', input.Value),,"Min"
#+r::Run "C:\Users\Gianlucca.Pirovano\OneDrive - Wheelhouse IT\Documents\Scripts\copyResponses.py"
#^r::Run "C:\Users\Gianlucca.Pirovano\OneDrive - Wheelhouse IT\Documents\Scripts\copyResponses-lol.py"
CapsLock::Escape
;AppsKey::RWin
AppsKey & space::Send "shutdown /L"
AppsKey & m::Send "mmsys.cpl"
AppsKey & u::{
CoordMode "Mouse", "Screen"
Click(926, 94)
}
Appskey & p::Send "ms-settings:printers"
Appskey & c::Send "control /name Microsoft.Printers"
Appskey & d::Send "DISM /Online /Cleanup-Image /RestoreHealth"
Appskey & s::Send "Start-ADSyncSyncCycle -PolicyType Delta"
Appskey & n::Send "net user /add whitadminlocal"
Appskey & a::Send "net localgroup administrators whitadminlocal /add"
Appskey & r::Send "shutdown /r /t 0"
Appskey & k::Send "rundll32.exe user32.dll,LockWorkStation"
>!\::!Tab
>+!|::!+Tab
^AppsKey::^z
!AppsKey::{
Send('{f3}')
WinWait("Manage: Work - Microsoft Edge", , 1)
MoveWindowToMonitor(mon6x,mon6y)
SnapUp()
}
;CapsLock & Space::Click
CapsLock & Space::CenterMouseOnActiveWindow()
Capslock & m::AppsKey
;Insert::{
;Send "^a"
;Sleep 5
;Send "^c"
;}
^+Insert::{
Send "^a"
Sleep 5
Send "^+v"
}
^/::^x
^.::^c
^,::^v
^'::^a
^o::^t
^;::^s
!+Enter::Run "cmd"
#m::Run "msedge.exe -inprivate https://admin.microsoft.com"
#space::Click
AppsKey & ,::^F3
AppsKey & .::!F3
AppsKey & /::^!F3
AppsKey & Enter::+F3
AppsKey & l::#+F4
AppsKey & `;::^+F4
AppsKey & '::#F4
AppsKey::AppsKey
#+i::f7
>!]::WinClose "A"
^\::^Tab
^+\::^+Tab
;Move Windows between monitors:
!+M::MoveWindowToMonitor(mon4x,mon4y)
!+N::MoveWindowToMonitor(mon5x,mon5y)
!+,::MoveWindowToMonitor(mon1x,mon1y)
!+.::MoveWindowToMonitor(mon2x,mon2y)
!+/::MoveWindowToMonitor(mon3x,mon3y)
!+\::{
MoveWindowToMonitor(mon6x,mon6y)
SnapUp()
}
;Move focus between montiors:
!M::FocusMonitor(mon4x,mon4y)
!N::FocusMonitor(mon5x,mon5y)
!,::FocusMonitor(mon1x,mon1y)
#,::FocusMonitor(mon1x-960,mon1y)
!.::FocusMonitor(mon2x,mon2y)
!/::FocusMonitor(mon3x,mon3y)
!\::FocusMonitor(mon6x,mon6y)
#\::FocusMonitor(mon6x+300,mon6y+700)
#HotIf


;Functions:
TileThirds(third){
number := third
Send "#z"
sleep 100
Send "6"
sleep 150
Send number
}
CenterWindow(WinTitle)
{
Send "{LWin up}"
WinGetPos &X, &Y, &W, &H, "A" ; xcoord ycoord width height activewindow
WinRestore "A"
Sleep 20
WinMove X, Y, 512, 512, "A"
Sleep 50
}
Maximize(){
WinRestore "A"
WinMaximize "A"
}
SnapLeft(){
;CenterWindow("A")
;Sleep 70
Send "{Blind}#{Left}"
}
SnapRight(){
;CenterWindow("A")
;Sleep 70
Send "{Blind}#{Right}"
}
SnapUp(){
;CenterWindow("A")
;Send "{Blind}#{Up}"
;Sleep 70
Send "{Blind}#{Up}"
}
SnapDown(){
;SnapUp()
;Sleep 500
;WinGetPos &X, &Y, &W, &H, "A" ; xcoord ycoord width height activewindow
;Y := Y+H
;WinMove X, Y, W, H, "A"
Send "{Blind}#{Down}"
}
SnapDownTest(){
WinGetPos &X, &Y, &W, &H, "A" ; xcoord ycoord width height activewindow
Y := Y+H
WinMove X, Y, W, H, "A"
}
SnapDownLeft(){
SnapLeft()
Sleep 70
Send "{Blind}#{Down}"
}
SnapUpLeft(){
SnapLeft()
Sleep 70
Send "{Blind}#{Up}"
}
SnapDownRight(){
SnapRight()
Sleep 70
Send "{Blind}#{Down}"
}
SnapUpRight(){
SnapRight()
Sleep 70
Send "{Blind}#{Up}"
}
MoveWindowToMonitor(xcoord, ycoord){
WinRestore "A"
WinMove xcoord, ycoord, 512, 512, "A"
DllCall("SetCursorPos", "int", xcoord, "int", ycoord)
Sleep 50
WinMaximize "A"
}
FocusMonitor(xcoord, ycoord){
DllCall("SetCursorPos", "int", xcoord, "int", ycoord)
MouseGetPos(,, &WinUMID)
WinActivate(WinUMID)
}
CenterMouseOnActiveWindow(){
 Sleep 01
 CoordMode "Mouse", "Screen"
 WinGetPos &winTopL_x, &winTopL_y, &width, &height, "A"
 winCenter_x := winTopL_x + width/2
 winCenter_y := winTopL_y + height/2
 DllCall("SetCursorPos", "Int", winCenter_x, "Int", winCenter_y)
}
AltClip(action){
}


;RC Functions
endCall(){
ib := InputBox("Type the numbers 987 to end the call")
if (ib.value = "987" and ib.result = "OK"){
Send("^!+#{f4}")
}
}
rcFocus(){
CoordMode "Mouse", "Window"
WinActivate("ahk_exe softphone.exe")
MouseMove 60, 45
}
rcStatusScreen(){
CoordMode "Mouse", "Window"
WinActivate("ahk_exe softphone.exe")
Click 60, 45
}
!Home::
numpadIns & numpadSub::{
rcStatusScreen()
Sleep 50
Click 60, 280
}
!End::
numpadIns & numpadAdd::{
rcStatusScreen()
Sleep 50
Click 60, 370
}
numpadIns & numpadEnter::{
rcStatusScreen()
Sleep 50
Click 290, 460
}