18.11.2011, 15:41
How to create a DOS console script in standard PAWN?
Hi!
Anybody can help me about this? If I create an AMX script in the standard PAWN scripting language, and I run it with the pawnrun.EXE, the script's window like a Windows API Application. Is there a way, to to script run in a DOS console application?
This is the standard PAWN language console include: (console.INC)
Zuckerman
Hi!
Anybody can help me about this? If I create an AMX script in the standard PAWN scripting language, and I run it with the pawnrun.EXE, the script's window like a Windows API Application. Is there a way, to to script run in a DOS console application?
This is the standard PAWN language console include: (console.INC)
pawn Код:
/* Console input/output functions
*
* © Copyright 1998-2011, ITB CompuPhase
* This file is provided as is (no warranties).
*/
#pragma library Console
// Enumerator
const
{
black = 0, /* colours as per the ANSI Escape sequences, ISO 6429 */
red,
green,
yellow,
blue,
magenta,
cyan,
white,
}
native getchar(echo=true);
native getstring(string[], maxlength=sizeof string, bool:pack=true);
native getvalue(base=10, term=0x0d, ...); /* 0x0d == '\r' */
native print(const string[], foreground=-1, background=-1, highlight=-1);
native printf(const format[], {Float,Fixed,_}:...);
native console(columns, lines);
native clrscr(); /* also resets the cursor to (1,1) */
native clreol();
native gotoxy(x=1, y=1);
native wherexy(&x, &y);
native setattr(foreground=-1, background=-1, highlight=-1);
forward @keypressed(key);
Zuckerman