Or get rid of the unnecessary Do loop entirely and try it this way.
#include <Misc.au3>
#include <Constants.au3>
#include <String.au3>
#include <GUIConstantsEx.au3>
Local $hDLL = DllOpen("user32.dll")
GUICreate("Crew Control", 500, 300)
GUISetState(@SW_SHOW)
GUICtrlCreateLabel("Use the number pad to select the page you wish to send from list below", 10, 30)
GUICtrlCreateLabel("Press Numeric keypad 1 key for task 1", 10, 60)
GUICtrlCreateLabel("Press Numeric keypad 2 key for task 2", 10, 90) ; line and next cell
GUICtrlCreateLabel("Press Numeric keypad 3 key for task 3", 10, 120) ;
While GUIGetMsg() <> $GUI_EVENT_CLOSE
If _IsPressed("31", $hDLL) or _IsPressed("61", $hDLL) Then
MsgBox(0, "", "Task 1")
ElseIf _IsPressed("32", $hDLL) or _IsPressed("62", $hDLL) Then
MsgBox(0, "", "Task 2")
ElseIf _IsPressed("33", $hDLL) or _IsPressed("63", $hDLL) Then
MsgBox(0, "", "Task 3")
EndIf
If _IsPressed("1B", $hDLL) Then
MsgBox(0, "_IsPressed", "The Esc Key was pressed, therefore we will close the application.")
Exit
EndIf
WEnd
This allows either the numpad number or the normal top row number to initiate a task.