Creating a list of names from multiple documents

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
banaitclinic
Posts: 3
Joined: 16 Mar 2018, 06:55

Creating a list of names from multiple documents

16 Mar 2018, 07:26

Hi
I want to create a list of patients I have seen in a day . I use emacs on windows with org mode to write daily encounter. The format of document is simple.

Code: Select all

Name :  XYZ 
Address : 
------------------------------------------------------------------------------------------------------------------------
encounter details 
I need a script to copy and capture the name using a single key and save it to single file (dailysheet.txt)
Eg> If I see a patient named Mr Joy Smart. I will select "Mr Joy Smart" and use the hotkey. It should copy this name to txt file. For next patient, I create a new file, enter Mr NAME SURNAME in demographic field and then select and capture it using hotkey to append name to previously created file so that at the end of day, I get
16/03/2018 5:55 PM
Mr Joy Smart
Mr NAME SURNAME
----------------------------------------------------------------------------------------------------------------------
so on

Is this possible ?
Kindly help
Regards
Guest

Re: Creating a list of names from multiple documents

17 Mar 2018, 11:55

This should get you started.

Code: Select all

SetWorkingDir, %A_ScriptDir%

#z::
InputBox, NewPatient, Enter name, Name of Patient, , 400, 150
If (NewPatient = "") or ErrorLevel
	Return
FormatTime, Time, , dd/MM/yyyy h:mm tt
FileAppend, `n%Time%`n%NewPatient%, MyPatients.txt
Return
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Creating a list of names from multiple documents

17 Mar 2018, 13:13

Code: Select all

#SingleInstance, Force

!c::    ; press Alt+c to ...
    Send, ^c    ; ... copy name to clipboard
    ClipWait
    FormatTime, date,, yyyy-MM-dd   ; get current date
    FileAppend,% A_Hour . ":" . A_Min . "-" . ClipBoard . "`n",% date . ".txt"   ; append the name to the "<date>.txt" file
    ClipBoard := ""
    Return
Not tested.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Dewi Morgan, doanmvu, RSable and 396 guests