In the following script, when I check checkboxes from different TABs, and a combobox in esophageal TAB, some of the checked items are not sent, while when they are sent individually, the script works fine. I am not able to understand this erratic behaviour.
Kindly help.
Here is the script
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Gui, Destroy
Gui, Margin, 10, 5
Gui, Add, Tab2,buttons left, Past History|Addiction|Esophageal
Gui, Tab, Past History
Gui, Add, CheckBox,vDiabetes, Diabetes
Gui, Add, Edit, vDM w500
Gui, Add, ComboBox, vDur_DM, Diet|OHA|Insulin
Gui, Add, CheckBox,vHT,HT:
Gui, Add, Edit, vHT1 w500
Gui, Add, CheckBox,vIHD ,IHD
Gui, Add, Edit, vIHD1 w500
Gui, Add, CheckBox,vCVE,CVE
Gui, Add, Edit, vCVE1 w500
Gui, Add, CheckBox, vTB,TB
Gui, Add, Edit, vTB1 w500
Gui, Add, CheckBox, vAsthma,Asthma |COAD
Gui, Add, Edit, vAsthma1 w500
Gui, Add, CheckBox, vCirrhosis,Cirrhosis
Gui, Add, Edit, vCirrhosis1 w500
Gui, Add, CheckBox,vIUC,IUC
Gui, Add, Edit, vIUC1 w500
Gui, Add, CheckBox,vIBS,IBS
Gui, Add, Edit, vIBS1 w500
Gui, Add, CheckBox,vCarcinoma,Carcinoma
Gui, Add, Edit, vCarcinoma1 w500
Gui, Add, CheckBox, vHypothyroid, Hypothyroid
Gui, Add, Edit, vHypothyroid1 w500
Gui, Add, CheckBox, vAppendectomy, Appendectomy
Gui, Add, Edit, vAppendectomy1 w500
Gui, Add, CheckBox,vCholecystectomy, Cholecystectomy
Gui, Add, Edit, vCholecystectomy1 w500
Gui, Add, CheckBox, vHysterectomy, Hysterectomy
Gui, Add, Edit, vHysterectomy1 w500
Gui, Add, CheckBox, vPancreatitis,Acute pancreatitis
Gui, Add, Edit, vPancreatitis1 w500
Gui, Add, Edit , vOther w500, Other illness
;; Personal History goes here
Gui, Tab, Addiction
Gui, Add, CheckBox, vAlcohol, Significant alcohol intake
Gui, Add, Edit, vAlcohol1 w500
Gui, Add, CheckBox, vTobacco, Tobacco in any form
Gui, Add, Edit, vTobacco1 w500
;; Present history
Gui, TAB, Esophageal
Gui, Add, CheckBox, vHR, Heartburn + Regurgitation
Gui, Add, Edit, vvHR1 w500
Gui, Add, CheckBox, vH, Heartburn - Regurgitation
Gui, Add, Edit, vH1 w500
Gui, Add, CheckBox, vRH, Regurgitation - HR
Gui, Add, Edit, vRH1, w500
Gui, Add, CheckBox, vID, Intermittent dysphagia for solids and liquids
Gui, Add, Edit, vID1 w500
Gui, Add, CheckBox, vPrD, Progressive dysphagia
Gui, Add, Edit, vPrD1 w500
Gui, Add, CheckBox, CD, Current grade of dysphagia
Gui, Add, Edit, vCD1 w500,
Gui, Add, CheckBox, wW, Water to clear
Gui, Add, CheckBox, vNR, nasal regurgitation at night
Gui, Add, CheckBox, vNR1, nasal regurgitation after swallow
Gui, Add, CheckBox, vOdynophagia, Odynophagia
Gui, Add, Edit, vOdynophagia1 w500
Gui, Add, CheckBox , vHiccup, Hiccup
Gui, Add, Edit, v Hiccup1 w500
Gui, Add, CheckBox, vNausea, Nausea
Gui, Add, Edit, vNausea1 w500
Gui, Add, CheckBox,vVomiting, Vomiting for
Gui, Add, ComboBox, vVR w500, Related to FOOD|Related to HEADACHE| Related to abdominal PAIN| Related to VERTIGO|Related to menses| No relation with food, headache, vertigo, menses
Gui, Add, ComboBox, vVC w500, Vomitus contained food residue| Vomitus contained bilious fluid| Vomitus contained fecal matter | Vomitus contained fresh blood| Vomitus contained altered blood|Did not see vomitus
Gui, Add, Button, gEncounter w75 h35, OK
!^h:: Gui, Show,, Encounter
Encounter:
Gui, Submit, hide
EncounterIndex:= {"Diabetes" : "Diabetes" . DM , "HT": "Systemic hypertension" . HT1, "IHD":"Ischemic heart disease" . IHD1, "CVE": "CVE" . CVE1, "TB":"Tuberculosis" . TB1, "Asthma": "Bronchial Asthma" . Asthma1,"IUC":"IUC" . IUC1, "IBS":"Irritable bowel syndrome" . IBS1, "Cirrhosis":"Cirrhosis of liver" . Cirrhosis1, "Carcinoma": "Carcinoma" . Carcinoma1, "Hypothyroid": "Hypothyroid" . Hypothyroid1, "Appendectomy": "Appendectomy" . Appendectomy1, "Cholecystectomy": "Laparoscopic cholecystectomy" . Cholecystectomy1, "Hysterectomy":"Hysterectomy for" . Hysterectomy1, "Pancreatitis":"Pancreatitis" . Pancreatitis1, "Other":"Other", "Alcohol": "Significant alcohol intake for" . Alcohl1, "Tobacco": "Consumption of tobacco (in any form) is present" . Tobacco1, "Gerd": vGerd1
, "HR" :"Frequent episodes of heartburn and regurgitation of sour fluid for" . HR1
, "H" : "Patient complained of episodes of frequent heartburn, but there is no history of regurgitation of sour fluid in the mouth" . H1
, "RH" : "Frequent episodes of regurgitation of the sour fluid in the mouth, but no significant heartburn " . RH1
, "ID" : "Intermittent episodes of dysphagia for solids and liquids:" . ID1
, "PrD" : "Progressive dysphagia had started with solids" . PrD1
, "CD" :"Current grade of dysphagia:" . CD1
, "W" : "Patient requires water to clear the food stuck in chest"
, "NR" : "Patient regurgitates swallowed food and residue, when (s)he is lying down at night. "
, "NR1" : "Patient regurgitates food through nose and mouth immediately after the swallow."
, "Odynophagia" : "Pain during swallowing of food :" . Odynophagia1
, "Hiccup" : "Patient is getting hiccups for" . Hiccup1
, "Nausea" : "Feels nauseated for" . VNausea1
, "Vomiting" : "Vomiting for " . VR . VC}
for Encounter, advice in EncounterIndex
if (%Encounter% =1) {
SendInput, {Enter}- %advice%
Reload
}
Return