How to Automatically Fill-In “Laporan Harian COVID-19”

Note: the report as been moved from http://survey.dosh.gov.my/laporanhariancovid19/ to https://notification.miti.gov.my, we have revised the script to automatically filled in the new report at this new post …

Quick Guide

  1. Install AutoHotkey (AHK).
  2. Select the script “DOSH v. 1.0-demo.ahk”.
  3. Run the script by double clicking on “DOSH v. 1.0-demo.ahk” file.
  4. Go to “Laporan Harian COVID-19”  at http://survey.dosh.gov.my/laporanhariancovid19/
  5. Run the hotkey according to its page number. For example:
    • on page 1, press <CTRL> then <1>, all fields on that page will be automatically filled;
    • on page 2, press <CTRL> then <2>, all fields on that page will be automatically filled;
    • on page 5 (last page), press <CTRL> then <5>, all fields on that page will be automatically filled;
  6. Finally, manually click “Hantar” to submit the report. Refer to video below for a demonstration …

 

Full Guide

For this guide we will use AutoHotkey (AHK). Before installing you will need to download it from AutoHotkey Homepage:

  1. Go to AutoHotkey Homepage: https://www.autohotkey.com/  choose the version and download it
  2. During installation of AutoHotkey, you will be asked to choose from UNICODE or ANSI. In short, you would probably want to choose UNICODE. It has support for non-English letters and numbers (characters). Keep going until you see an Install button

After AutoHotkey installed, you will probably want to learn about how to do scripting in AutoHotkey. You can do that either:

  1. Go to https://www.autohotkey.com/docs/AutoHotkey.htm
  2. Find AutoHotkey help file on your computer:
    • Click Programs or All Programs
    • Find AutoHotkey in the list
    • Open AutoHotkey Help File

Once you have a knowledge about the AutoHotkey, you can create your script to automate the form fill-in in Laporan Harian COVID-19 (http://survey.dosh.gov.my/laporanhariancovid19/)

  1. Right-click on your desktop, find “New” -> “AutoHotkey Script
  2. Give the script a new name. It must end with a .ahk extension. For example: MyScript.ahk
  3. Go to the newly created file, right-click, click “Edit Script
  4. Copy this script into your script, right after “Ensures a consistent starting directory“. Change the input detail to match yours
    ; START (DOSH) >>>
    ^1:: ;page 1 (CTRL+1)
    Send {Tab 2}
    Send {Enter}
    return
    
    ^2:: ;page 2 (CTRL+2)
    ; Send {Tab 3}
    ;FormatTime, TimeString,, dd-MM-yyyy ; NKL: it will automatically set to today's date on the web page, there is no need to to this command
    ;Send %TimeString%{Tab} ; NKL: it will automatically set to today's date on the web page, there is no need to to this command
    Send {Tab 4} ; NKL: web page will automatically select today's date
    Send test@test.com{Tab}
    Send Company Sdn. Bhd.{Tab}
    Send 188888-H{Tab}
    Send No. 8, Jalan Lapan{Tab}
    Send 12{Tab}
    Send Pengilangan{Tab}
    Send Mr. ABC{Tab}
    Send 0388888888{Tab 2}
    Send Director{Tab 2}
    return
    
    ^3:: ;page 3 (CTRL+3)
    Send {Tab 3}
    Send 05{Tab}
    Send {Space}{Tab}
    Send {Space}{Tab}
    Send {Space}{Tab}
    Send {Space}{Tab}
    Send {Space}{Tab}
    Send {Space}{Tab}
    Send {Space}{Tab}
    Send {Space}{Tab}
    Send {Space}{Tab}
    Send {Space}{Tab}
    Send {Space}{Tab}
    Send {Space}{Tab}
    Send {Space}{Tab}
    Send {Tab 2}
    return
    
    ^4:: ;page 4 (CTRL+4)
    Send {Tab 3}
    Send {Down}{Tab}
    Send {Space}{Tab}
    Send Tiada{Tab 2}
    return
    
    ^5:: ;page 5 (CTRL+5)
    Send {Tab 3}{Space}
    Send {Tab 2}
    return
    ; <<< END (DOSH)
  5. Save the file
  6. Run the script by double-click on it. To make sure the script is running, go to the right corner taskbar -> click on the double down arrow -> find the AutoHotkey icon in the list. Hover to the icon to check for the right running script matching with your saved script.
  7. Go to http://survey.dosh.gov.my/laporanhariancovid19/
  8. Run the hotkey according to its page. For example: Page 1: CTRL + 1