TheAutomator

Retro fullscreen console with custom programming language!

9 posts in this topic

#1 ·  Posted (edited)

A fullscreen console with custom commands!

Example.thumb.gif.4b4ac6863696ff393a9caf

Introduction:

Hi everyone! :)

This funny project started as a question in the help section:

https://www.autoitscript.com/forum/topic/174404-edit-detect-key-before-updating-content/

I'd like to share this script with everyone that is interested. :)

 

Why would I want it?

  • You like the old style fullscreen console (like in the old day's),
  • You can add custom commands,
  • You can customize the font a lot more compared to cmd.exe,
  • You can share ideas or add tweaks to the script.

 

What's next?

I'm planning to add my own programming language to it!

Its going to be implemented with an ActiveX COM dll.

The syntax is going to be a bit like Lua I guess, any ideas are welcome!

 

Todo:

  • Add sounds.
  • Make an icon / logo.
  • Design a better grammar ( Backus-Naur-vormhttps://nl.wikipedia.org/wiki/Backus-Naur-vorm ).
  • Make test "Console-Scripts" for it.
  • Add a file type for script files ( like batch scripts ).
  • Clean up and modify Console.Au3 content.
  • Add an option to have to type a login password (maybe).
  • Call neo B)

 

Thanks to:

  • xxaviarxx: debugging, some ideas.
  • jguinch: debugging, adding a bunch of tweaks and ideas.
  • kylomas: debugging, new ideas.

 

Edits and updates:

  • Added tab key
  • Main edit has focus now on startup
  • Made a pdf that explains the upcoming programming language (need feedback about it!)

 

Until the dll is ready you can have fun with what I already have, hope you like it!

UDF can be downloaded from the attachments.

Regards ;)

 

[The programming language part is been postponed due to lack of interest]

 

TheAutomator

 

Console.au3

ConsoleScript.pdf

Edited by TheAutomator
2 people like this

Share this post


Link to post
Share on other sites



Need to make sure the window is active as soon as you run the script otherwise your users will have to click a full screen console. At the preset time you have to click it.

Share this post


Link to post
Share on other sites

Need to make sure the window is active as soon as you run the script otherwise your users will have to click a full screen console. At the preset time you have to click it.

Seems like $WS_TABSTOP prevents direct user input...

I updated the script :)

Thanks xxaviarxx !

Share this post


Link to post
Share on other sites
  • You can customize the font (unlike cmd.exe)

:think: I don't belive it...

http://www.wikihow.com/Customize-the-Font-in-Windows-Command-Prompt

TD ;)


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

TheDcoder,

Cmd.exe has 1 build in raster font and 2 optional ones you can choose of.

if you want to add a font you have to change the registry and you have to be lucky enough to find a raster font that will be accepted by cmd prompt..

(and even that doesn't work on my computer for some reason)

try to add a new font like: westminster.ttf to it and post a screenshot ;)

but ok, technically I should say that you can customize the fonts 'a lot more' then you can with cmd, so I'm gonna change that in my description.

Edited by TheAutomator

Share this post


Link to post
Share on other sites

@TheAutomator Oh, silly me :P


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

#8 ·  Posted

I just gave you some appreciation on other thread. Thanks bro, I am using it.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

its nice but please be aware that microsoft made powershell on every windows V7 and further available. 

type ISE in your startmenu / search  box and see an integrated IDE something between IDE/debugwindow/scripting at the same time

this shows the concept for excel.application

https://social.technet.microsoft.com/Forums/scriptcenter/en-US/33dbc1c4-40ee-4ef8-b25b-f29440ab3194/using-com-objects-excel-from-powershell?forum=ITCG

suggestion would be to incorporate javascript CHAKRA then you do not have to write a new grammar

 

 

 

Edited by junkew
nice see now its a little older thread

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • ur
      By ur
      I am running the tomcat batch file through autoit   and need to wait until the below line I get in console output.

      But when I am trying to read the console output using the ProcessEx UDF, I am getting only the partial output.
      So, can you please suggest how to handle this.
    • luckyluke
      By luckyluke
      Hello,
      Im trying to read the output from CMD using Dllcall, here is my code:
      #include <WinAPI.au3> #include <array.au3> Global Const $STD_OUTPUT_HANDLE = -11 Global Const $_CONSOLE_SCREEN_BUFFER_INFO = _ "struct;int dwSizeX;" & _ "short dwSizeY;" & _ "short dwCursorPositionX;" & _ "short dwCursorPositionY;" & _ "short wAttributes;" & _ "short Left;" & _ "short Top;" & _ "short Right;" & _ "short Bottom;" & _ "short dwMaximumWindowSizeX;" & _ "short dwMaximumWindowSizeY;endstruct" $pCmd = Run( "cmd.exe" ) Sleep(1000) $hCmd = WinGetHandle("") ConsoleWrite('handle:' & $hCmd & @CRLF) $aRet = DllCall("kernel32.dll", "int", "AttachConsole", "dword", $pCmd) ;_ArrayDisplay($aRet) If $aRet[0] <> 0 Then $vHandle_data='' $vHandle='' $vHandle_data = DllStructCreate($_CONSOLE_SCREEN_BUFFER_INFO) ; Screen Buffer structure $aRet1 = DllCall("kernel32.dll", "hwnd", "GetStdHandle", "dword", $STD_OUTPUT_HANDLE) if not @error Then $vHandle = $aRet1[0] $aRet = DllCall("kernel32.dll", "int", "GetConsoleScreenBufferInfo", "hwnd", $vHandle, _ "ptr", $vHandle_data) MsgBox(0, '1',DllStructGetData($vHandle_data, 'dwSizeX') & _WinAPI_GetLastErrorMessage()) EndIf It did not work, i got the message 'The handle is invalid'. Please help?
      Thank you in advance!
    • mihaijulien
      By mihaijulien
      Hello,
      I compiled a script I made that takes a command line parameter (the version of a .msi installer) when launched. The script was compiled with the /console option. The script (.au3) works fine but the executable returns  the following error:  
      Error: array variable has incorrect number of subscripts or subscript dimension range exceeded  
    • fosil
      By fosil
      Hi everyone.

      I'm currently working a program that constantly prints out log files through "consolewrite" and the "#AutoIt3Wrapper_Change2CUI=y" wrapper.

      Part of this program requires me to run a batch script.

      My issue is the batch script launches from the same window as consolewrite. I need the batch file to be launched through a different window as currently this causes an issue with the logs (which need to be very precise) but also causes the batch file to produce some funny behavior...

      Does anyone know how I can force the file to run on a second DOS window?

      Thanks in advance!!!
       
      Edit: Im using the "run" command if that helps. I tried "shellexecute" but that seemed to not launch the batch scripts at all.
    • Baboo85
      By Baboo85
      Hi all,
      I need to start a script that include:
      - admin privileges
      - multiple cmd commands
      - no bat, no exe, no tmp files created anywhere (especially in the user temp folder)
      In a bat file it would be simple, but users shouldn't see what commands I'm sending.
      Example of the script:
      echo off cls echo. echo I AM A TOOL echo. echo NOTE: echo - note 1 echo - note 2 echo - etc set USER1=0 set COMPUTER1=0 if /i %username% equ user.user ( set USER1=1 set COMPUTER1=1 ) if /i %username% equ another.user set USER1=1 if /i %computername% equ notebook set COMPUTER1=1 if %USER1% EQU 1 ( if %COMPUTER1% EQU 1 ( reg delete "HKLM\SOFTWARE\blablabla" /f ) else ( echo Computer not authorized. Contact assistance.) ) else ( echo User not authorized. Contact assistance.) echo. pause exit With the send("") is a disaster.
      I'm a noob here, so what can I do?
       
      EDIT: OR ELSE I explain the situation and what I need, so if there is a simple solution I can use that.
       
      SITUATION: our domain users have Users rights on the machine. Some of them need administrator rights.
      We create a local user with administrator rights, so that the users must insert username and password when asked to run something with administrator rights.
      We have an internal domain group policy that blocks EXE, BAT, COM, TMP files from the user local temp directory, for a security reason (malware). That also blocks most software installation.
      But some users are often out of office, away from workplace and in another country, they need a complete control on their computers.
       
      WHAT I NEED: I need to check the username and the computer name. If the username is the one with local administrator rights and the computer name is a computer that is qualified to temporary remove the policy, then I need to execute a REG DELETE command with administrator rights.
       
      I hope I explained myself.
       
      Thank you very much.