This function returns the name of the last event that was triggered. This can be used in a script to detect which event the script was executed from.
Return value: last eventType: string
t = hs.GetLastEvent
msgbox "This script is run from the event: " & t