initial commit, GP tools split into individual includes

This commit is contained in:
2022-05-21 21:55:02 +01:00
commit 0fa1476753
9 changed files with 956 additions and 0 deletions

39
includes/QuickSearch.ahk Normal file
View File

@@ -0,0 +1,39 @@
;; Quicksearch / Quicklinks
;; Shortcuts:
;; - 'can': NICE Cancer by site
;; Search:
;; - 'bnf <drug>': Searches BNF for <drug>
;; - 'bnfc <drug>': Search BNFc for <drug>
;;
;; TODO: Add other shortcut URLs, add support for third word and URL escaping
^\::
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"
;; Sarches
} else {
vBNF := "https://www.medicinescomplete.com/#/search/bnf/"
vBNFC := "https://www.medicinescomplete.com/#/search/bnfc/"
search_split := StrSplit(vQuery, A_Space, 2)
search_type := search_split[1]
search_query := search_split[2]
search_url := ""
if ( search_type = "bnf" ) {
search_url := vBNF
} else if ( search_type = "bnfc" ) {
search_url := vBNFC
}
if ( search_url = "" ) {
MsgBox Not sure what search type: %search_type%
} else {
Run, chrome.exe %search_url%%search_query%
}
}
return