42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
EXTENSION HELLO_OS
|
|
REM VERSION 1.1
|
|
REM AUTHOR: Korben
|
|
|
|
REM_BLOCK DOCUMENTATION
|
|
USAGE:
|
|
For use with OS_DETECT Extension, call HELLO_OS() after DETECT_OS()
|
|
prints the OS determination
|
|
END_REM
|
|
|
|
REM Additional Example: Defining custom $_OS enums
|
|
DEFINE #EXTRA_EXAMPLES FALSE
|
|
DEFINE #SOME_OTHER_OS 6
|
|
DEFINE #ANOTHER_OS 7
|
|
|
|
FUNCTION HELLO_OS()
|
|
IF ($_OS == WINDOWS) THEN
|
|
STRING Hello Windows!
|
|
ELSE IF ($_OS == MACOS) THEN
|
|
STRING Hello Mac!
|
|
ELSE IF ($_OS == LINUX) THEN
|
|
STRING Hello Linux!
|
|
ELSE IF ($_OS == IOS) THEN
|
|
STRING Hello iOS!
|
|
ELSE IF ($_OS == CHROMEOS) THEN
|
|
STRING Hello ChromeOS!
|
|
ELSE IF ($_OS == ANDROID) THEN
|
|
STRING Hello Android!
|
|
IF_DEFINED_TRUE #EXTRA_EXAMPLES
|
|
ELSE IF($_OS == #SOME_OTHER_OS) THEN
|
|
REM Example Only
|
|
STRING HELLO Custom OS Type!
|
|
ELSE IF($_OS == #ANOTHER_OS) THEN
|
|
REM Example Only
|
|
STRING HELLO Another Custom OS Type!
|
|
END_IF_DEFINED
|
|
ELSE
|
|
STRING Hello World!
|
|
END_IF
|
|
END_FUNCTION
|
|
END_EXTENSION
|