The following example will open the file 途eadme.txt in the AutoMate directory using the viewer for text files (Windows sets this to Notepad.exe by default).
Sub Main
'This script uses the AutoMate system constant %AMDIR%
'but we could have used a literal path such as C:\test.txt
Action.OpenFile("%AMDIR%\readme.txt")
End Sub