General Information

Locked
User avatar
JHPJHP
Site Admin
Posts: 217
Joined: Wed Jun 21, 2023 10:48 am

General Information

Post by JHPJHP »

Alternate Console

ShowConsole(State = 1)
Default to showing Console in Normal Mode.
Sets state for both AltConsole or CmdConsole (0 = hidden, 1 = Normal, 2 = Minimized, 3 = Maximized).

BringToTop(hConsole)
Not called directly.
Brings AltConsole or a visible CmdConsole to the foreground on open.

GetColors(CharacterColor, BackgroundColor)
Not called directly.
Sets colors for both AltConsole or CmdConsole.

SetConsoleFont(FaceName.s, FontSize, FontWeight = 400)
Limited number of supported fonts (i.e. Consolas).

HandlerRoutine(dwCtrlType)
Not called directly.
Callback to catch AltConsole or CmdConsole closing.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

altOpenConsole(X = 10, Y = 10, State = 1, Title.s = "Alternate Console", xColumn = 0, yRow = 0)
Default to position (10, 10) with Console in Normal Mode and "Alternate Console" for Title.
Opens in various states (0 = hidden, 1 = Normal, 2 = Minimized, 3 = Maximized).
Opens a new Console with specified Title.
Resizes the Console width/height.

altConsoleTitle(State = 1, Title.s = "Alternate Console")
Default to showing Console in Normal Mode with "Alternate Console" for new Title.
Opens in various states (0 = hidden, 1 = Normal, 2 = Minimized, 3 = Maximized).
Changes the current Console's Title.

altPrint(Text.s = " ", nRepeat = 1)
Default one space.
Option to repeat Text n times.

altPrintN(Text.s = #Null$, nRepeat = 1)
Default one newline.
Option to repeat Text/Newline n times.

altFillChar(Character, nLength = 1)
Fills ascii Character n length.

altFillColor(CharacterColor = 7, BackgroundColor = 0, nLength = 1)
Default one character length of the deafult colors.
Fills n character length to chosen colors (color codes same as PureBasic).

altConsoleColor(CharacterColor = 7, BackgroundColor = 0, Mode = 0)
Mode 0: Change the foreground and background character color using the limited color palette (default).
Mode 1: Change the foreground character color and the background character and console color using the limited color palette.
Mode 2: Change the foreground and background character color using the limited color palette, and the background console color using RGB.

Set the foreground and/or background character color to zero for RGB color.

altConsoleLocate(xColumn, yRow)
Moves the cursor to the new x/y location.

altReadConsoleData(xColumn = 0, yRow = 0, nLength = 0)
Default reading the entire Console text.
Reads the console text from x/y n length.

altClearConsole(xColumn = 0, yRow = 0, nLength = 0)
Default clearing the entire Console's text and colors.
Clears the Console text from x/y n length.

altNewConsole(X = 10, Y = 10, State = -1, Title.s = #Null$)
Default to position (10, 10) with Console set to previous State and previous Title.
Closes previous Console.
Opens new Console with optional new State.
Opens new Console with optional new Title.

altInkey()
Captures ascii keystrokes showing the character key value.

altRawKey()
Shows the raw key code for ascii and non-ascii keys.

altConsoleImage(ImageName.s = #Null$, nDelay = 1000)
Default with an OpenFileRequester prompt and a transition Delay of 1000ms.
Optional ImageName can be either path or path\filename.
Translates the pixels from a *.jpg | *.png | *.bmp file to console characters.
nDelay is used to pause n milliseconds between images.

altConsoleAnimate(hImage)
Translates the pixels from a *.png file to console characters.
Requires a sprite sheet with equally spaced x/y images or an animated GIF.

altInput(Text.s = #Null$)
Default a pause waiting for the Enter key to be pressed.
Reads text written after the input (pause) location.
Allows for Text to be included with the pause.
Dispalys optional Text in bottom/left of visible Console.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

cmdOpenConsole(dwX = 10, dwY = 10, State = 1, Title.s = "Command Console", dwXCountChars = 80, dwYCountChars = 5000)
Default to position (10, 10) with Console in Normal Mode and "Command Console" for Title and size (80, 5000).
Opens in various states (0 = hidden, 1 = Normal, 2 = Minimized, 3 = Maximized).
Opens a new Command Console with specified Title.
Resizes the Console width/height.

cmdChangeColor(CharacterColor = 7, BackgroundColor = 0)
Default the Command Console to default colors.
Changes the Command Console to chosen colors (color codes same as PureBasic).

cmdAddAlias(Source.s, Target.s, ExeName.s = "cmd.exe")
Default alias commands to cmd.exe.
Allows multiple commands to be combined then called using an alias.
Alias commands can be used with any executable.

cmdRunScript(Text.s, RunAndWait = #False, WaitMS = 1000)
Default to passing commands without waiting for them to finish.
Runs commands passed by Text with an option to wait for them to finish.
Set the number of milliseconds to wait for a single.

cmdRunBatch(FileName.s = #Null$, RunAndWait = #False, WaitMS = 1000)
Default with an OpenFileRequester prompt.
Reads a .bat or .txt file line by line and runs the commands.
Optional run and wait (will be applied to each command).
Set the number of milliseconds to wait for a single.

cmdReadConsole(nLeft = 0, nTop = 0, nRight = 0, nBottom = 0, nDelay = 0)
Default reading the entire Command Console text.
Reads the Command Console text from the left/top/right/bottom location.
Delay the reading until the console is fully populated.

cmdCloseConsole()
Closes the Command Console.
This should always be called with a hidden Command Console.
The difference between stupidity and genius is that genius has its limits.
~ Albert Einstein
User avatar
JHPJHP
Site Admin
Posts: 217
Joined: Wed Jun 21, 2023 10:48 am

Re: General Information

Post by JHPJHP »

Image
The difference between stupidity and genius is that genius has its limits.
~ Albert Einstein
Locked