Sign in to follow this  
Followers 0
Delta01

Console creation?

5 posts in this topic

Well,

I'm sure most of you know of the "console applications" that can be created in C#/C++. My question to you is, can autoit create them? Create a console window and then write text into it, I've looked under Console and WINAPI in the helpfile but haven't found anything.

If it can, please tell me which functions to look up.

Thanks

Share this post


Link to post
Share on other sites



Well,

I'm sure most of you know of the "console applications" that can be created in C#/C++. My question to you is, can autoit create them? Create a console window and then write text into it, I've looked under Console and WINAPI in the helpfile but haven't found anything.

If it can, please tell me which functions to look up.

Thanks

ConsoleRead/ConsoleWrite and #AutoIt3Wrapper_Change2CUI=y at the top.

Cheers,

Brett

Share this post


Link to post
Share on other sites

ConsoleRead/ConsoleWrite and #AutoIt3Wrapper_Change2CUI=y at the top.

Cheers,

Brett

Sorry. But I don't understand the whole AutoIt wrapper. Can you do a quick example?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

@Delta1 - Please put this at the top of your script, and read it:

; Purpose - Script boilerplate to build a command consoled app.
; Requires - SciTe4AutoIt3 to be installed on the system used to compile script
; Notes - 
;           Only works as expected using the compiled version of your script.
;           Edit: Using this script, you CAN still create any GUI windows.
;           Use ConsoleWrite to output to the command window.
;           ConsoleRead maybe can be used to read from the command window.
;           StdoutRead maybe can be used to read from the command window.

#AutoIt3Wrapper_Change2CUI=y

; code to accept a commandline parameter - 
; Author - Zedna
If $CmdLine[0] > 0 Then
  If $CmdLine[1] = "/help" Then
    ConsoleWrite("some info")
    Exit
  EndIf
EndIf

Edit: Stricken text as per RichardRobertson: "Using this script, you cannot..."

Edited by Squirrely1

Das Häschen benutzt Radar

Share this post


Link to post
Share on other sites

Squirrely, you can create standard windows in a console application. There's nothing preventing that from being done.

In a normal sense, yes it would be a problem, but as far as I know, AutoIt always runs the message loop for it's own private window.

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  
Followers 0