Changed quicksearch to hash table
This commit is contained in:
@@ -7,18 +7,24 @@
|
||||
;;
|
||||
;; TODO: Add other shortcut URLs, add support for third word and URL escaping
|
||||
|
||||
#include libraries\hashTable.ahk
|
||||
|
||||
^\::
|
||||
InputBox, vQuery, BNF Search, , , 200, 100
|
||||
|
||||
;; Need some sort of select statemnt here, probably better to check wordcount first, if just 1 then a shortcut
|
||||
if (vQuery == "can") {
|
||||
Run, chrome.exe "https://www.nice.org.uk/guidance/ng12/chapter/Recommendations-organised-by-site-of-cancer"
|
||||
} else if (vQuery == "hrt") {
|
||||
Run, chrome.exe "https://d2931px9t312xa.cloudfront.net/menopausedoctor/files/information/229/Easy`%20HRT`%20prescribing`%20guide.pdf"
|
||||
} else if (vQuery == "htn") {
|
||||
Run, chrome.exe "https://www.england.nhs.uk/london/wp-content/uploads/sites/8/2019/11/NICE-NG136-Visual-Summary.pdf"
|
||||
vQuery := Trim(vQuery)
|
||||
|
||||
url_shortcuts := new hashTable
|
||||
url_shortcuts["can"] := "https://www.nice.org.uk/guidance/ng12/chapter/Recommendations-organised-by-site-of-cancer"
|
||||
url_shortcuts["hrt"] := "https://d2931px9t312xa.cloudfront.net/menopausedoctor/files/information/229/Easy`%20HRT`%20prescribing`%20guide.pdf"
|
||||
url_shortcuts["htn"] := "https://www.england.nhs.uk/london/wp-content/uploads/sites/8/2019/11/NICE-NG136-Visual-Summary.pdf"
|
||||
url_shortcuts["abx"] := "https://gmmmg.nhs.uk/wp-content/uploads/2022/06/GM-Antimicrobial-guidelines-Apr-2022-v11.0-FINAL.pdf"
|
||||
|
||||
if (url_shortcuts.hasKey(vQuery)) {
|
||||
path := url_shortcuts[vQuery]
|
||||
Run, chrome.exe %path%
|
||||
|
||||
;; Sarches
|
||||
;; Searches
|
||||
} else {
|
||||
vBNF := "https://www.medicinescomplete.com/#/search/bnf/"
|
||||
vBNFC := "https://www.medicinescomplete.com/#/search/bnfc/"
|
||||
|
||||
@@ -10,18 +10,18 @@ SetTitleMatchMode 2
|
||||
#WinActivateForce
|
||||
SetControlDelay 1
|
||||
SetWinDelay 0
|
||||
SetKeyDelay -1
|
||||
SetKeyDelay 100
|
||||
SetMouseDelay -1
|
||||
SetBatchLines -1
|
||||
SetBatchLines 20ms
|
||||
|
||||
|
||||
F23::
|
||||
Macro1:
|
||||
Send, !p
|
||||
Sleep, 200
|
||||
Send, !o
|
||||
Sleep, 400
|
||||
Loop, 5
|
||||
{
|
||||
Loop, 5 ; This was supposedto search for all boxes but the colour alternates.
|
||||
{ ; TODO: use arrow keys to select each, then finish with an image search to toggle the last one if unclicked.
|
||||
CoordMode, Pixel, Screen
|
||||
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440,assets\eps\eps_tick_box.png
|
||||
CenterImgSrchCoords("assets\eps\eps_tick_box.png", FoundX, FoundY)
|
||||
@@ -36,6 +36,8 @@ Loop, 5
|
||||
}
|
||||
}
|
||||
Until, ErrorLevel != 0
|
||||
Sleep 50
|
||||
;FindAndClickCenterOfImage("assets\eps\eps_pin.png", "EPS Pin Entry not found")
|
||||
CoordMode, Pixel, Screen
|
||||
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\eps\eps_pin.png
|
||||
CenterImgSrchCoords("assets\eps\eps_pin.png", FoundX, FoundY)
|
||||
@@ -43,7 +45,7 @@ If ErrorLevel
|
||||
{
|
||||
MsgBox, 49, Continue?, Image / Pixel Not Found.`nPress OK to continue.
|
||||
IfMsgBox, Cancel
|
||||
Return
|
||||
Return
|
||||
}
|
||||
If (ErrorLevel = 0)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
;; rdt. -> 12/01/2022
|
||||
;; eld. -> 12/01/2022 \n \n Time: 09:35 (for EOL meds)
|
||||
|
||||
;; sig. -> - Signed
|
||||
;; sig. -> adds signature image in word
|
||||
;; ftf. -> TCI for F2F assessment, appt given for today.
|
||||
|
||||
;; atsp. -> Asked to see patient while visiting another at same residence.
|
||||
@@ -63,9 +63,11 @@ FormatTime, CurrentDate,, dd/MM/yyyy
|
||||
SendInput %CurrentDate%
|
||||
return
|
||||
|
||||
::sig.::
|
||||
SendInput {Space}- Signed
|
||||
return
|
||||
/*
|
||||
::sig.::
|
||||
SendInput {Space}- Signed
|
||||
return
|
||||
*/
|
||||
|
||||
::eld.::
|
||||
FormatTime, CurrentDate,, dd/MM/yyyy
|
||||
@@ -142,4 +144,16 @@ return
|
||||
|
||||
::gabaweek.::
|
||||
SendInput Take 1 capsule daily, increase to twice daily after 1 week and three times daily after another week
|
||||
return
|
||||
|
||||
::sig.::
|
||||
SendInput !n
|
||||
SendInput !p
|
||||
Sendinput !p
|
||||
sleep 200
|
||||
ClipboardSaved := Clipboard
|
||||
Clipboard := "\\AGMH2RESCIFS01.resources.greatermanchestercsu.nhs.uk\CIFS_WBCCG_GPs\P92016\HOME\Sean.Cusack\My Documents\signature_small.jpg"
|
||||
SendInput ^v
|
||||
SendInput {Enter}
|
||||
Clipboard := ClipboardSaved
|
||||
return
|
||||
Reference in New Issue
Block a user