Macros
From Sputnik Wiki
(Difference between revisions)
(→Misc) |
|||
Line 129: | Line 129: | ||
@DIRECTORYSEPARATORCHAR // Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization. | @DIRECTORYSEPARATORCHAR // Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization. | ||
@ALTDIRECTORYSEPARATORCHAR // Provides a platform-specific alternate character used to separate directory levels in a path string that reflects a hierarchical file system organization. | @ALTDIRECTORYSEPARATORCHAR // Provides a platform-specific alternate character used to separate directory levels in a path string that reflects a hierarchical file system organization. | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Key Constants for use with many things (Bascially equal to VirtualKey Codes === | ||
+ | |||
+ | <syntaxhighlight lang="sputnik"> | ||
+ | @None | ||
+ | @LButton | ||
+ | @RButton | ||
+ | @Cancel | ||
+ | @MButton | ||
+ | @XButton1 | ||
+ | @XButton2 | ||
+ | @LButton | ||
+ | @XButton2 | ||
+ | @Back | ||
+ | @Tab | ||
+ | @LineFeed | ||
+ | @LButton | ||
+ | @LineFeed | ||
+ | @Clear | ||
+ | @Return | ||
+ | @RButton | ||
+ | @Clear | ||
+ | @RButton | ||
+ | @Return | ||
+ | @ShiftKey | ||
+ | @ControlKey | ||
+ | @Menu | ||
+ | @Pause | ||
+ | @Capital | ||
+ | @KanaMode | ||
+ | @RButton | ||
+ | @Capital | ||
+ | @JunjaMode | ||
+ | @FinalMode | ||
+ | @HanjaMode | ||
+ | @RButton | ||
+ | @FinalMode | ||
+ | @Escape | ||
+ | @IMEConvert | ||
+ | @IMENonconvert | ||
+ | @IMEAceept | ||
+ | @IMEModeChange | ||
+ | @Space | ||
+ | @PageUp | ||
+ | @Next | ||
+ | @End | ||
+ | @Home | ||
+ | @Left | ||
+ | @Up | ||
+ | @Right | ||
+ | @Down | ||
+ | @Select | ||
+ | @Print | ||
+ | @Execute | ||
+ | @PrintScreen | ||
+ | @Insert | ||
+ | @Delete | ||
+ | @Help | ||
+ | @D0 | ||
+ | @D1 | ||
+ | @D2 | ||
+ | @D3 | ||
+ | @D4 | ||
+ | @D5 | ||
+ | @D6 | ||
+ | @D7 | ||
+ | @D8 | ||
+ | @D9 | ||
+ | @RButton | ||
+ | @D8 | ||
+ | @RButton | ||
+ | @D9 | ||
+ | @MButton | ||
+ | @D8 | ||
+ | @MButton | ||
+ | @D9 | ||
+ | @XButton2 | ||
+ | @D8 | ||
+ | @XButton2 | ||
+ | @D9 | ||
+ | @64 | ||
+ | @A | ||
+ | @B | ||
+ | @C | ||
+ | @D | ||
+ | @E | ||
+ | @F | ||
+ | @G | ||
+ | @H | ||
+ | @I | ||
+ | @J | ||
+ | @K | ||
+ | @L | ||
+ | @M | ||
+ | @N | ||
+ | @O | ||
+ | @P | ||
+ | @Q | ||
+ | @R | ||
+ | @S | ||
+ | @T | ||
+ | @U | ||
+ | @V | ||
+ | @W | ||
+ | @X | ||
+ | @Y | ||
+ | @Z | ||
+ | @LWin | ||
+ | @RWin | ||
+ | @Apps | ||
+ | @RButton | ||
+ | @RWin | ||
+ | @Sleep | ||
+ | @NumPad0 | ||
+ | @NumPad1 | ||
+ | @NumPad2 | ||
+ | @NumPad3 | ||
+ | @NumPad4 | ||
+ | @NumPad5 | ||
+ | @NumPad6 | ||
+ | @NumPad7 | ||
+ | @NumPad8 | ||
+ | @NumPad9 | ||
+ | @Multiply | ||
+ | @Add | ||
+ | @Separator | ||
+ | @Subtract | ||
+ | @Decimal | ||
+ | @Divide | ||
+ | @F1 | ||
+ | @F2 | ||
+ | @F3 | ||
+ | @F4 | ||
+ | @F5 | ||
+ | @F6 | ||
+ | @F7 | ||
+ | @F8 | ||
+ | @F9 | ||
+ | @F10 | ||
+ | @F11 | ||
+ | @F12 | ||
+ | @F13 | ||
+ | @F14 | ||
+ | @F15 | ||
+ | @F16 | ||
+ | @F17 | ||
+ | @F18 | ||
+ | @F19 | ||
+ | @F20 | ||
+ | @F21 | ||
+ | @F22 | ||
+ | @F23 | ||
+ | @F24 | ||
+ | @Back | ||
+ | @F17 | ||
+ | @Back | ||
+ | @F18 | ||
+ | @Back | ||
+ | @F19 | ||
+ | @Back | ||
+ | @F20 | ||
+ | @Back | ||
+ | @F21 | ||
+ | @Back | ||
+ | @F22 | ||
+ | @Back | ||
+ | @F23 | ||
+ | @Back | ||
+ | @F24 | ||
+ | @NumLock | ||
+ | @Scroll | ||
+ | @RButton | ||
+ | @NumLock | ||
+ | @RButton | ||
+ | @Scroll | ||
+ | @MButton | ||
+ | @NumLock | ||
+ | @MButton | ||
+ | @Scroll | ||
+ | @XButton2 | ||
+ | @NumLock | ||
+ | @XButton2 | ||
+ | @Scroll | ||
+ | @Back | ||
+ | @NumLock | ||
+ | @Back | ||
+ | @Scroll | ||
+ | @LineFeed | ||
+ | @NumLock | ||
+ | @LineFeed | ||
+ | @Scroll | ||
+ | @Clear | ||
+ | @NumLock | ||
+ | @Clear | ||
+ | @Scroll | ||
+ | @RButton | ||
+ | @Clear | ||
+ | @NumLock | ||
+ | @RButton | ||
+ | @Clear | ||
+ | @Scroll | ||
+ | @LShiftKey | ||
+ | @RShiftKey | ||
+ | @LControlKey | ||
+ | @RControlKey | ||
+ | @LMenu | ||
+ | @RMenu | ||
+ | @BrowserBack | ||
+ | @BrowserForward | ||
+ | @BrowserRefresh | ||
+ | @BrowserStop | ||
+ | @BrowserSearch | ||
+ | @BrowserFavorites | ||
+ | @BrowserHome | ||
+ | @VolumeMute | ||
+ | @VolumeDown | ||
+ | @VolumeUp | ||
+ | @MediaNextTrack | ||
+ | @MediaPreviousTrack | ||
+ | @MediaStop | ||
+ | @MediaPlayPause | ||
+ | @LaunchMail | ||
+ | @SelectMedia | ||
+ | @LaunchApplication1 | ||
+ | @LaunchApplication2 | ||
+ | @Back | ||
+ | @MediaNextTrack | ||
+ | @Back | ||
+ | @MediaPreviousTrack | ||
+ | @Oem1 | ||
+ | @Oemplus | ||
+ | @Oemcomma | ||
+ | @OemMinus | ||
+ | @OemPeriod | ||
+ | @OemQuestion | ||
+ | @Oemtilde | ||
+ | @LButton | ||
+ | @Oemtilde | ||
+ | @RButton | ||
+ | @Oemtilde | ||
+ | @Cancel | ||
+ | @Oemtilde | ||
+ | @MButton | ||
+ | @Oemtilde | ||
+ | @XButton1 | ||
+ | @Oemtilde | ||
+ | @XButton2 | ||
+ | @Oemtilde | ||
+ | @LButton | ||
+ | @XButton2 | ||
+ | @Oemtilde | ||
+ | @Back | ||
+ | @Oemtilde | ||
+ | @Tab | ||
+ | @Oemtilde | ||
+ | @LineFeed | ||
+ | @Oemtilde | ||
+ | @LButton | ||
+ | @LineFeed | ||
+ | @Oemtilde | ||
+ | @Clear | ||
+ | @Oemtilde | ||
+ | @Return | ||
+ | @Oemtilde | ||
+ | @RButton | ||
+ | @Clear | ||
+ | @Oemtilde | ||
+ | @RButton | ||
+ | @Return | ||
+ | @Oemtilde | ||
+ | @ShiftKey | ||
+ | @Oemtilde | ||
+ | @ControlKey | ||
+ | @Oemtilde | ||
+ | @Menu | ||
+ | @Oemtilde | ||
+ | @Pause | ||
+ | @Oemtilde | ||
+ | @Capital | ||
+ | @Oemtilde | ||
+ | @KanaMode | ||
+ | @Oemtilde | ||
+ | @RButton | ||
+ | @Capital | ||
+ | @Oemtilde | ||
+ | @JunjaMode | ||
+ | @Oemtilde | ||
+ | @FinalMode | ||
+ | @Oemtilde | ||
+ | @HanjaMode | ||
+ | @Oemtilde | ||
+ | @RButton | ||
+ | @FinalMode | ||
+ | @Oemtilde | ||
+ | @OemOpenBrackets | ||
+ | @Oem5 | ||
+ | @Oem6 | ||
+ | @Oem7 | ||
+ | @Oem8 | ||
+ | @Space | ||
+ | @Oemtilde | ||
+ | @PageUp | ||
+ | @Oemtilde | ||
+ | @OemBackslash | ||
+ | @LButton | ||
+ | @OemBackslash | ||
+ | @Home | ||
+ | @Oemtilde | ||
+ | @ProcessKey | ||
+ | @MButton | ||
+ | @OemBackslash | ||
+ | @Packet | ||
+ | @Down | ||
+ | @Oemtilde | ||
+ | @Select | ||
+ | @Oemtilde | ||
+ | @Back | ||
+ | @OemBackslash | ||
+ | @Tab | ||
+ | @OemBackslash | ||
+ | @PrintScreen | ||
+ | @Oemtilde | ||
+ | @Back | ||
+ | @ProcessKey | ||
+ | @Clear | ||
+ | @OemBackslash | ||
+ | @Back | ||
+ | @Packet | ||
+ | @D0 | ||
+ | @Oemtilde | ||
+ | @D1 | ||
+ | @Oemtilde | ||
+ | @ShiftKey | ||
+ | @OemBackslash | ||
+ | @ControlKey | ||
+ | @OemBackslash | ||
+ | @D4 | ||
+ | @Oemtilde | ||
+ | @ShiftKey | ||
+ | @ProcessKey | ||
+ | @Attn | ||
+ | @Crsel | ||
+ | @Exsel | ||
+ | @EraseEof | ||
+ | @Play | ||
+ | @Zoom | ||
+ | @NoName | ||
+ | @Pa1 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Core Function]] | [[Category:Core Function]] |
Revision as of 19:14, 2 December 2011
Contents |
Macros
For Functions
@ARGS // Stores all arguments passed to a function allowing for unlimited arguments.
Directory/Path
@COMMONFILESDIR // Common Files folder @WINDIR // The directory of windows @SYSDIR // The directory of windows system directory @CURDIR // The current working directory @TEMPDIR // The current system's temporary folder
Strings
@CRLF // @CR . @LF ;Occasionally used for line breaks. @LFCR // @LF . @CR ;Stupidly used for line breaks. @CR // Carriage return, Chr(13); sometimes used for line breaks. @LF // Line feed, Chr(10); typically used for line breaks. @TAB // Tab character, Chr(9). @NL // The newline that the current windows likes best.
Math
@PI // Mathematical constant that is the ratio of any circle's circumference to its diameter @E // Represents the natural logarithmic base, specified by the constant, e.
Variable Limits etc
@CHAR_MIN // Represents the smallest possible value of a unicode character @CHAR_MAX // Represents the largest possible value of a unicode character @BYTE_MIN // Represents the smallest possible value of a unsigned 8-bit integer @BYTE_MAX // Represents the largest possible value of a unsigned 8-bit integer @SBYTE_MIN // Represents the smallest possible value of a signed 8-bit integer @SBYTE_MAX // Represents the largest possible value of a signed 8-bit integer @USHORT_MIN // Represents the smallest possible value of a unsigned 16-bit integer @USHORT_MAX // Represents the largest possible value of a unsigned 16-bit integer @UINT16_MIN // Represents the smallest possible value of a unsigned 16-bit integer @UINT16_MAX // Represents the largest possible value of a unsigned 16-bit integer @UINT_MIN // Represents the smallest possible value of a unsigned 32-bit integer @UINT_MAX // Represents the largest possible value of a unsigned 32-bit integer @UINT32_MIN // Represents the smallest possible value of a unsigned 32-bit integer @UINT32_MAX // Represents the largest possible value of a unsigned 32-bit integer @ULONG_MIN // Represents the smallest possible value of a unsigned 64-bit integer @ULONG_MAX // Represents the largest possible value of a unsigned 64-bit integer @UINT64_MIN // Represents the smallest possible value of a unsigned 64-bit integer @UINT64_MAX // Represents the largest possible value of a unsigned 64-bit integer @SHORT_MIN // Represents the smallest possible value of a signed 16-bit integer @SHORT_MAX // Represents the largest possible value of a signed 16-bit integer @INT16_MIN // Represents the smallest possible value of a signed 16-bit integer @INT16_MAX // Represents the largest possible value of a signed 16-bit integer @INT_MIN // Represents the smallest possible value of a signed 32-bit integer @INT_MAX // Represents the largest possible value of a signed 32-bit integer @INT32_MIN // Represents the smallest possible value of a signed 32-bit integer @INT32_MAX // Represents the largest possible value of a signed 32-bit integer @LONG_MIN // Represents the smallest possible value of a signed 64-bit integer @LONG_MAX // Represents the largest possible value of a signed 64-bit integer @INT64_MIN // Represents the smallest possible value of a signed 64-bit integer @INT64_MAX // Represents the largest possible value of a signed 64-bit integer @DOUBLE_POSINF // Represents positive infinity @DOUBLE_NEGINF // Represents negative infinity @DOUBLE_NAN // Represents (Not a number) NaN @DOUBLE_MIN // Represents the smallest possible value of a float @DOUBLE_MAX // Represents the largest possible value of a float @DOUBLE_EPSILON // Represents the smallest positive double value greater than zero @FLOAT_POSINF // Represents positive infinity @FLOAT_NEGINF // Represents negative infinity @FLOAT_NAN // Represents (Not a number) NaN @FLOAT_MIN // Represents the smallest possible value of a float @FLOAT_MAX // Represents the largest possible value of a float @FLOAT_EPSILON // Represents the smallest positive float value greater than zero
Date & Time
@DATETIMENOW // Stores the current date and time as a string @MSEC // Milliseconds value of clock. Range is 00 to 999 @SEC // Seconds value of clock. Range is 00 to 59 @MIN // Minutes value of clock. Range is 00 to 59 @HOUR // Hours value of clock in 24-hour format. Range is 00 to 23 @WDAY // Numeric day of week. Range is 1 to 7 which corresponds to Sunday through Saturday @MDAY // Current day of month. Range is 01 to 31 @MON // Current month. Range is 01 to 12 @YDAY // Current day of year. Range is 1 to 366 (or 365 if not a leap year) @YEAR // Current four-digit year. @TICKS // The number of ticks that represent the current date and time (A single tick represents one hundred nanoseconds or one ten-millionth of a second. There are 10,000 ticks in a millisecond.) @TIME // Get a 10 element array containing in this order; @MSEC, @SEC, @MIN, @HOUR, @WDAY, @MDAY, @MON, @YDAY, @YEAR, @TICKS // Heres an example of how to use @Time to create a useable list : List ($MSec, $Sec, $Min, $Hour, $WDay, $MDay, $Mon, $YDay, $Year, $Ticks) = @TIME; println("MSec: " . $MSec); println("Sec: " . $Sec); println("Min: " . $Min); println("Hour: " . $Hour); println("WDay: " . $WDay); println("MDay: " . $MDay); println("Mon: " . $Mon); println("YDay: " . $YDay); println("Year: " . $Year); println("Ticks: " . $Ticks);
Misc
@ERROR // Stores the state of the last error which can be useful to find out exactly what happened. @CURRENCY // Stores the local currency symbol that the computer is using such as $ or £ etc. @GROUP // Stores the amount of groups captured in the last regex match operation. @DESKTOPWIDTH // Current width of the desktop the program is running on. @DESKTOPHEIGHT // Current height of the desktop the program is running on. @DOMAIN // The computers currently network domain name associated with current user. @USER // The name of the user currently logged in to windows. @MACHINENAME // Get NetBIOS name of this computer. @TICKCOUNT // The number of miliseconds elapsed since the system started. @INVALIDPATHCHARS // String of characters that are not allowed in path names. @INVALIDFILENAMECHARS // String of characters that are not allowed in file names. @VOLUMESEPARATORCHAR // Provides a platform-specific volume separator character. @PATHSEPARATOR // A platform-specific separator character used to separate path strings in environment variables. @DIRECTORYSEPARATORCHAR // Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization. @ALTDIRECTORYSEPARATORCHAR // Provides a platform-specific alternate character used to separate directory levels in a path string that reflects a hierarchical file system organization.
Key Constants for use with many things (Bascially equal to VirtualKey Codes
@None @LButton @RButton @Cancel @MButton @XButton1 @XButton2 @LButton @XButton2 @Back @Tab @LineFeed @LButton @LineFeed @Clear @Return @RButton @Clear @RButton @Return @ShiftKey @ControlKey @Menu @Pause @Capital @KanaMode @RButton @Capital @JunjaMode @FinalMode @HanjaMode @RButton @FinalMode @Escape @IMEConvert @IMENonconvert @IMEAceept @IMEModeChange @Space @PageUp @Next @End @Home @Left @Up @Right @Down @Select @Print @Execute @PrintScreen @Insert @Delete @Help @D0 @D1 @D2 @D3 @D4 @D5 @D6 @D7 @D8 @D9 @RButton @D8 @RButton @D9 @MButton @D8 @MButton @D9 @XButton2 @D8 @XButton2 @D9 @64 @A @B @C @D @E @F @G @H @I @J @K @L @M @N @O @P @Q @R @S @T @U @V @W @X @Y @Z @LWin @RWin @Apps @RButton @RWin @Sleep @NumPad0 @NumPad1 @NumPad2 @NumPad3 @NumPad4 @NumPad5 @NumPad6 @NumPad7 @NumPad8 @NumPad9 @Multiply @Add @Separator @Subtract @Decimal @Divide @F1 @F2 @F3 @F4 @F5 @F6 @F7 @F8 @F9 @F10 @F11 @F12 @F13 @F14 @F15 @F16 @F17 @F18 @F19 @F20 @F21 @F22 @F23 @F24 @Back @F17 @Back @F18 @Back @F19 @Back @F20 @Back @F21 @Back @F22 @Back @F23 @Back @F24 @NumLock @Scroll @RButton @NumLock @RButton @Scroll @MButton @NumLock @MButton @Scroll @XButton2 @NumLock @XButton2 @Scroll @Back @NumLock @Back @Scroll @LineFeed @NumLock @LineFeed @Scroll @Clear @NumLock @Clear @Scroll @RButton @Clear @NumLock @RButton @Clear @Scroll @LShiftKey @RShiftKey @LControlKey @RControlKey @LMenu @RMenu @BrowserBack @BrowserForward @BrowserRefresh @BrowserStop @BrowserSearch @BrowserFavorites @BrowserHome @VolumeMute @VolumeDown @VolumeUp @MediaNextTrack @MediaPreviousTrack @MediaStop @MediaPlayPause @LaunchMail @SelectMedia @LaunchApplication1 @LaunchApplication2 @Back @MediaNextTrack @Back @MediaPreviousTrack @Oem1 @Oemplus @Oemcomma @OemMinus @OemPeriod @OemQuestion @Oemtilde @LButton @Oemtilde @RButton @Oemtilde @Cancel @Oemtilde @MButton @Oemtilde @XButton1 @Oemtilde @XButton2 @Oemtilde @LButton @XButton2 @Oemtilde @Back @Oemtilde @Tab @Oemtilde @LineFeed @Oemtilde @LButton @LineFeed @Oemtilde @Clear @Oemtilde @Return @Oemtilde @RButton @Clear @Oemtilde @RButton @Return @Oemtilde @ShiftKey @Oemtilde @ControlKey @Oemtilde @Menu @Oemtilde @Pause @Oemtilde @Capital @Oemtilde @KanaMode @Oemtilde @RButton @Capital @Oemtilde @JunjaMode @Oemtilde @FinalMode @Oemtilde @HanjaMode @Oemtilde @RButton @FinalMode @Oemtilde @OemOpenBrackets @Oem5 @Oem6 @Oem7 @Oem8 @Space @Oemtilde @PageUp @Oemtilde @OemBackslash @LButton @OemBackslash @Home @Oemtilde @ProcessKey @MButton @OemBackslash @Packet @Down @Oemtilde @Select @Oemtilde @Back @OemBackslash @Tab @OemBackslash @PrintScreen @Oemtilde @Back @ProcessKey @Clear @OemBackslash @Back @Packet @D0 @Oemtilde @D1 @Oemtilde @ShiftKey @OemBackslash @ControlKey @OemBackslash @D4 @Oemtilde @ShiftKey @ProcessKey @Attn @Crsel @Exsel @EraseEof @Play @Zoom @NoName @Pa1