Jump to content
Sign in to follow this  
Guest Guidosoft

AD Console

Recommended Posts

Guest Guidosoft

Now, we all agree that insolences console style is totally cool in his Adrian Donkey project.

Well, I made a template console program that uses that style. 90% of the credit is given to insolence cause he made it up. 10% cause I wrote the template code.

Here is the ADConsole Skeleton:

Note: Although maybe 1 or 2 lines of code appear to be exactly the same as in Adrian Donkey code, there was no other way to do it, so naturally, this is the method that fell out.

Remember, I am not saying this is ALL 100% my work cause it is not cause the idea

is all insolences. Notice I did NOT put an Author: Guido Arbia.

Just thaught I would clarify this. So if you want to say thankyou to somebody, it should be 90% to insolence and 10% to me.

;Basic AD Console Skeleton

#include <GUIConstants.AU3>

$CW = GUICreate("My Console", 500, 300)
$CO = GUICtrlCreateEdit("",0,0,500,275,$WS_VScroll+$ES_AUTOVSCROLL+$ES_READONLY)
$CI = GUICtrlCreateInput("",0,275,500,24)

GuiSetState(@SW_SHOW)

$CIV = ""
$ResponseStage = "Main"

ConsoleOutputLine("This is a console skeleton. Type exit and press enter to quit.")
While 1
   $MSG = GuiGetMsg()
   
   Select
   Case $MSG = $GUI_EVENT_CLOSE
      Exit
   Case $CIV <> ""
      DealWithInput()
   EndSelect
   
   If WinActive($CW) Then
      HotKeySet("{ENTER}","CIV")
      ControlFocus($CW, "", $CI)
   Else
      HotKeySet("{ENTER}")
   EndIf
WEnd

Func CIV()
   $CIV = GUICtrlRead($CI)
   GUICtrlSetData($CI,"")
EndFunc

Func DealWithInput()
   Select
   Case $ResponseStage = "Main"
      MainInputDeal()
   EndSelect
   
   $CIV = ""
EndFunc

Func MainInputDeal()
   Select 
   Case $CIV = "exit"
      ConsoleOutputLine("Exitting console....")
      Exit
   EndSelect
EndFunc

Func ConsoleOutput($Stuff)
   $COV = GUICtrlRead($CO)
   $COV = $COV & $stuff
   GuiCtrlSetData($Stuff,$COV)
EndFunc

Func ConsoleOutputLine($Stuff)
   $COV = GUICtrlRead($CO)
   $COV = $COV & $stuff & @CRLF
   GuiCtrlSetData($CO,$COV)
EndFunc

Share this post


Link to post
Share on other sites

'AD'?

Did you have to take the name too...?

EDIT:

I type lines it and it doesn't do anything.

Edited by Insolence

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

thats what i thought at first... then i think he means like this is how yours looks (just without all the comamnds and shizzle) so he just abriviated the Angry Donkey to AD Console "Skeleten" as its just the basics of your program :lmao: maybe im wrong though o:)


FootbaG

Share this post


Link to post
Share on other sites

Oh, that makes sense... sorry :lmao:

Nevermind then, not offended.


"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

"thats what i thought at first... then i think he means like this is how yours looks (just without all the comamnds and shizzle) so he just abriviated the Angry Donkey to AD Console "Skeleten" as its just the basics of your program smile.gif maybe im wrong though sad.gif"

Exacativtly.

Edit: Accididently speelled sontin corecty got a ficks dat.

Edited by Guido

I used to have over 700 posts. This is a new account. I am not a newbie.My AutoIt Home Page - Here is all my AutoIt stuff. Well, actually, I have loads more, I am just too lazy to put it on my page right now so deal with it.Guess what? The unvierse is made out of basically nothing.Think about it? What is the smallest building block of anything, it is what? A chunk of nothingness. Thats all. Hey this peice of space is a forperborb and it is so.

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...