Added home visit summary, right click menu, and EPS

This commit is contained in:
2022-05-25 19:08:23 +01:00
parent ab4e987a87
commit e62940c2af
12 changed files with 176 additions and 8 deletions

View File

@@ -21,9 +21,19 @@ SetKeyDelay, 50
#Include includes\TextExpansions.ahk ;; Text expansions for autohotkey #Include includes\TextExpansions.ahk ;; Text expansions for autohotkey
;#Include includes\ChromeController.ahk ;; S1 chrome controls for AMGP ;#Include includes\ChromeController.ahk ;; S1 chrome controls for AMGP
#Include includes\QuickSearch.ahk ;; Quicksearch / shortcut tools #Include includes\QuickSearch.ahk ;; Quicksearch / shortcut tools
#Include includes\PrintHomeVisitsImageSearch.ahk
#Include includes\EPS.ahk
; Reload Script after changes (Ctrl + F1) ; Reload Script after changes (Ctrl + F1)
^F1:: ^F1::
Reload Reload
Return Return
F15::
Menu MyMenu, Add, View EPS, LoadEPS
Menu MyMenu, Add, Sign Px, signpx
Menu MyMenu, Add, Print home visits, PrintHomeVisits
Menu MyMenu, Add, Med3, med3
Menu MyMenu, Add, Enter notes from AMGP, copyemailnotes
Menu MyMenu, Show
Return

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 928 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

62
includes/EPS.ahk Normal file
View File

@@ -0,0 +1,62 @@
; This script was created using Pulover's Macro Creator
; www.macrocreator.com
#NoEnv
SetWorkingDir %A_ScriptDir%
CoordMode, Mouse, Screen
SendMode Input
#SingleInstance Force
SetTitleMatchMode 2
#WinActivateForce
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1
LoadEPS:
CoordMode, Pixel, Screen
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\eps\prescription_icon.png
CenterImgSrchCoords("assets\eps\prescription_icon.png", FoundX, FoundY)
If ErrorLevel
Return
FoundX := FoundX+45
CoordMode, Mouse, Screen
Click, %FoundX%, %FoundY% Left, 2
Sleep, 10
Sleep, 200
CoordMode, Pixel, Screen
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\eps\prescription_select_all.png
CenterImgSrchCoords("assets\eps\prescription_select_all.png", FoundX, FoundY)
If ErrorLevel
{
MsgBox, 49, Continue?, Image / Pixel Not Found.`nPress OK to continue.
IfMsgBox, Cancel
Return
}
CoordMode, Mouse, Screen
Click, %FoundX%, %FoundY% Left, 1
Sleep, 10
Sleep, 200
CoordMode, Pixel, Screen
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\eps\prescription_selected.png
CenterImgSrchCoords("assets\eps\prescription_selected.png", FoundX, FoundY)
If ErrorLevel
{
MsgBox, 49, Continue?, Image / Pixel Not Found.`nPress OK to continue.
IfMsgBox, Cancel
Return
}
CoordMode, Mouse, Screen
Click, %FoundX%, %FoundY% Right, 1
Sleep, 10
Send, {Enter}
Return
^G:: ;; Px
signpx:
Send {Space 50}
Send +{Home}
Send {Del}
return

View File

@@ -0,0 +1,86 @@
; This script was created using Pulover's Macro Creator
; www.macrocreator.com
#NoEnv
SetWorkingDir %A_ScriptDir%
CoordMode, Mouse, Screen
SendMode Input
#SingleInstance Force
SetTitleMatchMode 2
#WinActivateForce
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1
; UserGlobalVars
F18::
PrintHomeVisits:
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
ImageSearch, FoundX, FoundY, 893, 661, 2455, 1439, assets\homevisits\home_visit_icon.png
CenterImgSrchCoords("assets\homevisits\home_visit_icon.png", FoundX, FoundY)
If (ErrorLevel)
{
MsgBox, 0, , Couldn't find the home visit icon
Return
}
FoundX := FoundX + 43
Click, %FoundX%, %FoundY% Left, 2
Sleep, 10
Sleep, 300
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\homevisits\home_visit_wrench.png
CenterImgSrchCoords("assets\homevisits\home_visit_wrench.png", FoundX, FoundY)
If (ErrorLevel)
{
MsgBox, 0, , Couldn't find Spanner Icon
Return
}
VisitsY := FoundY+50
Click, %FoundX%, %VisitsY% Left, 1
Sleep, 10
Loop, 10
{
Send, +{Down}
}
Click, %FoundX%, %FoundY% Left, 1
Sleep, 10
Sleep, 300
Loop, 18
{
Send, {Down}
}
Send, {Enter}
Sleep, 300
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\homevisits\home_visit_summary.png
If (ErrorLevel = 0)
{
FoundY := FoundY-100
Click, %FoundX%, %FoundY% Left, 1
Sleep, 10
Loop, 50
{
Send, {PgDn}
Sleep, 100
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\homevisits\home_visit_summary_entry.png
If (ErrorLevel = 0)
{
Click, %FoundX%, %FoundY% Left, 2
Sleep, 10
Break
}
}
}
Else
{
MsgBox, 0, , Couldn't find Name title in Summary Printout Window
}
Return

View File

@@ -54,18 +54,19 @@ Return
;; Med3, Not fit for work, Free Text, in S1. To do this Assign med3 to F12 menu under letter M ;; Med3, Not fit for work, Free Text, in S1. To do this Assign med3 to F12 menu under letter M
^M:: ^M::
med3:
Send {F12} Send {F12}
Sleep 200 Sleep 200
SendRaw {m} SendRaw {m}
Sleep 1000 Sleep 1000
Send {Space} Send {Space}
Send {Tab 4} Send {Tab 4}
Send {Space}
Send {Tab}
return return
;; Copy email notes into record ;; Copy email notes into record
^+E:: ^+E::
copyemailnotes:
ClipBoard := RegExReplace(ClipBoard, "\R+\R", "`r`n") ; Removes blank lines ClipBoard := RegExReplace(ClipBoard, "\R+\R", "`r`n") ; Removes blank lines
Send ^w Send ^w
Sleep 600 Sleep 600
@@ -96,8 +97,3 @@ Send {End}
Send {PgDn 2} Send {PgDn 2}
return return
^G:: ;; Px
Send {Space 50}
Send +{Home}
Send {Del}
return

View File

@@ -31,3 +31,17 @@ check_in_win_title(match) {
return false return false
} }
} }
; From pulovers macro creator
CenterImgSrchCoords(File, ByRef CoordX, ByRef CoordY)
{
static LoadedPic
LastEL := ErrorLevel
Gui, Pict:Add, Pic, vLoadedPic, % RegExReplace(File, "^(\*\w+\s)+")
GuiControlGet, LoadedPic, Pict:Pos
Gui, Pict:Destroy
CoordX += LoadedPicW // 2
CoordY += LoadedPicH // 2
ErrorLevel := LastEL
}