Advance Commands

Advance Command are unique to Batch Compiler.They are specially designed to perform advance operations; To see beyond.Lets see how you can use Advance Commands.

The rule

You MUST use prefix rem with the Advance command for the compiler to recognize the Advance Command.And there must be only one space between the prefix and command.Otherwise it will stay as a comment.

Rem Hideself --Right
Rem  Hideself --Wrong!
RemHideself --Wrong!



Commands

  • rem Add [Number1] [Number2]
  • Adds two numbers and returns the result in the variable %result%


  • rem BrowseFiles [ ??? Optional_File_Extention ] [ %~dps0 Optional_Start_Path ]
  • Use Windows Common Dialog box to browse for a file. Use %~dps0 for the Start_Path to browse in the EXE path. Selected file is stored in variable %result%


  • rem BrowseFolder
  • Use a Windows Dialog to browse for a folder. Selected folder is stored in the variable %result%


  • rem CenterSelf
  • Center the console window on the screen


  • rem ChangeColor [Integer_FGcolor(0-15)] [Int_BGcolor(0-15)]
  • Changes the color text will be printed on the screen


  • rem ClearColor
  • Changes the color text will be printed on the screen back to default colors (FG=7 BG=0)


  • rem CloseWindow "Window_Title"
  • Close an application window. You must know the window title. Surround the Window_Title with quotes. Watch for double spaces.


  • rem CursorHide
  • Hides the blinking cursor on the console window.


  • rem CursorShow
  • Shows the blinking cursor on the console window.


  • rem Divide [Number1] [Number2]
  • Divides Number1 by Number2 and returns the result in the variable %result%.


  • rem FastCMD [Slot(1-9)]
  • Embed Graphic Wizard File (Saved Slot 1-9).


  • rem GenRandom [MaxInteger]
  • Generates a random integer no larger than MaxInteger and returns the number in the variable %result%.


  • rem GetInput
  • Lets the user type input and returns the result in the variable %result%.


  • rem GetLength [Text]
  • Returns the length of text in the integer variable %result%.


  • rem GetMasked
  • Lets the user type input (MASKED for passwords) and returns the result in the variable %result%.


  • rem GetPercent [Number1] [Number2]
  • Finds the percent [Number1] out of [Number2] and returns the result in the variable %result%.


  • rem GreaterThan [Number1] [Number2]
  • If Number1 >= Number2 (Greater than or equal to) returns 1 if true and a 0 if false in the variable %result%.


  • rem Hideself
  • Allows the compiled batch file window to go invisible and run in the background.


  • rem HideWindow "Window_Title"
  • Hide any window on the screen. You must know the window title. Surround the Window_Title with quotes. Watch for double spaces.


  • rem LaunchSilent [Text_Filename] [Options(or "" )] [Int_WaitTillFinish(1or0)]
  • Launches any executable completely silent. Use double quotes "" if no options. Wait(1=YES 0=NO) Filename and path cannot contain spaces. Recommend Embedding the target EXE. Use %MYFILES%\filename.exe to launch it. If you must run an App with spaces in the path, use CD command to change the current directory then just enter the EXE filename without path.


  • rem LessThan [Number1] [Number2]
  • If Number1 <= Number2 (Less than or equal to) returns 1 if true and a 0 if false in the variable %result%.


  • rem LimitDecimal [DecimalNumber] [Integer_X]
  • Limits the DecimalNumber to X number decimal places and returns the result to the variable %result%.


  • rem Locate [Integer_Y(1-25)] [Int_X(1-80)]
  • Moves the cursor Y number of spaces down and X number of spaces right from the top left corner.


  • rem LocateAt [Integer_Y(1-25)] [Int_X(1-80)]
  • Hides Cursor. Moves the cursor Y number of spaces down and X number of spaces right from the top left corner.


  • rem MakeInteger [DecimalNumber]
  • Makes the DecimalNumber an integer and returns the result in the variable %result%.


  • rem MakeLower [Text]
  • Makes the text all lowercase and returns the text in the variable %result%.


  • rem MakeUpper [Text]
  • Makes the text all UPPERCASE and returns the text in the variable %result%.


  • rem MouseCmd [ x1,y1,x2,y2 ]
  • Create a button/hotspot that can be clicked with the mouse. Separate multiple buttons with a space. Compile "rem MouseCMD GET" to get the coordinates of your buttons at run-time. They are stored in the clipboard. The variable %result% will return which button number was pressed. See example.


  • rem Multiply [Number1] [Number2]
  • Multiplies two numbers and returns the result in the variable %result%.


  • rem PaintBoxAt [Integer_Y] [Int_X] [Int_Height] [Int_Width] [Int_BGcolor(0-15)]
  • Hides Cursor. Paints a box on the screen at the Y X coordinates with the specified dimensions and BGcolor.


  • rem PaintScreen [Integer_BGcolor(0-15)]
  • Paints the screen the selected integer background color.


  • rem PrintBox [Integer_Height] [Int_Width] [Int_BorderType(1or2)]
  • Prints a box centered on the screen with the specified border type.


  • rem PrintBoxAt [Integer_Y] [Int_X] [Int_Height] [Int_Width] [Int_Border(1or2)]
  • Hides Cursor. Prints a box on the screen at the Y X coordinates with the specified dimensions and border type.


  • rem PrintCenter [Text] [Integer_Y(1-25)] [Int_FGcolor(0-15)] [Int_BGcolor(0-15)]
  • Prints one centered line of text on screen with the specified colors in the row Y.


  • rem PrintColor [Text] [Integer_FGcolor(0-15)] [Int_BGcolor(0-15)]
  • Prints text on the screen with the specified colors without printing a Return after. Use PrintReturn command if you must.


  • rem PrintColorAt [Text] [Int_Y] [Int_X] [Int_FGcolor(0-15)] [Int_BGcolor(0-15)]
  • Hides Cursor. Prints colored text on the screen at the Y X coordinates without printing a Return. Use PrintReturn.


  • rem PrintReturn
  • Moves cursor down a line.


  • rem PrintSpace
  • Moves the cursor a space to the right.


  • rem ShadeBoxAt [Int_Y] [Int_X] [Int_Height] [Int_Width] [Int_ShadeType(1-4)]
  • Hides Cursor. Shades a box on the screen at the Y X coordinates with the specified dimensions.


  • rem ShowSelf
  • Allows the compiled batch file window to reappear after going invisible with HideSelf.


  • rem ShowWindow "Window_Title"
  • Reveal a hidden window. You must know the window title. Surround the Window_Title with quotes. Watch for double spaces.


  • rem Subtract [Number1] [Number2]
  • Subtracts Number2 from Number1 and returns the result in the variable %result%.


  • rem Wait [Integer_Milliseconds]
  • Waits the specified number of milliseconds before continuing (1000 = 1 second)



Check the Upgrade Pro section often because new features are always available.