Jump to content

console


 Share

Recommended Posts

i would ike some console functions, to write console programs.

like ConsolePrint like cout in C++ and ConsoleGet like cin in C++

i would just add them myself if i had the full source but i dont so think this would be a cool addition to autoit, if a bit rarely used, and fairly easy i think.

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

  • Replies 42
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

like ConsolePrint like cout in C++ and ConsoleGet like cin in C++

Would that be the same as the new AutoIT stdout_child capability? I don't know the c languages to be sure...
...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format
Link to comment
Share on other sites

i would ike some console functions, to write console programs.

like ConsolePrint like cout in C++ and ConsoleGet like cin in C++

i would just add them myself if i had the full source but i dont so think this would be a cool addition to autoit, if a bit rarely used, and fairly easy i think.

I would like it if you would search the forum or the internet for that matter or even the help file. This is quite thoroughly covered in multiple places.
Link to comment
Share on other sites

AutoIt it is a GUI application; it doesn't have a console. AutoIt can read and write to the stdout/stderr/stdin streams but it can't write to a console (natively) and there is a difference between writing to the streams and writing to a console, even if the difference is only technical. Writing to a stream means something may or may not be listening; writing to a console means something is listening and that something is a console window.

So in other words, while it's true that the beta can write to all the streams it still can not write to a console so there's really not much difference between the beta and stable release in this regard.

Link to comment
Share on other sites

Excuse me Valik. I misunderstood the OP. I inferred a "to" in this sentence:

i would ike some console functions, to write to console programs.

I see now that this is not what was requested. I stand corrected.

Who else would I be?
Link to comment
Share on other sites

Valik's right.

But, a few months ago I was writing a file (.au3) with DllCalls and DllStructs and I had a decent amount done... I posted in the developers forum, got like 2 responses, but I never posted any code of it. But I had things like you could write to the console, read what the user typed I think, change the title. Nothing useful, but I like the way consoles look so for me, I could have used it. Then I went on a mood swing for like 5 minutes and I got all mad and deleted like half my .au3 scripts. But with this new Plugin stuff in the BETA, I may write a simple thing to AllocConsole, change the title, output characters on the console screen, read what was typed in, Free the console, etc. Change font colors... etc. But I want to wait till' everything is like, sorted out... ;)

FootbaG
Link to comment
Share on other sites

i would just add them myself if i had the full source but i dont so think this would be a cool addition to autoit, if a bit rarely used, and fairly easy i think.

I'm a bit confused. You do have the source, you allready asked some questions about it !!?? See here: http://www.autoitscript.com/forum/index.php?showtopic=16178

It's not the current beta code, but enough to add what you suggested.

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

Hi !

You can write in the console, if you compile the script, and filter it.

Code's sample :

ConsoleWrite("Aaaaaaaaaaa")
ConsoleWrite("Bbbbbbbbbbb" & @CRLF)
ConsoleWrite("Cccccccccccc")

Save as write.au3 ; compile to write.exe.

Then, in DOS-Box, type :

write | more [Enter]

That's all, folks ! ;)

Re- Hi !

Perhaps more fun, this line :

write.exe | find /V "" [Enter]

that's, for to view ALL line, without page-break.

Edited by Michel Claveau
Link to comment
Share on other sites

I'm a bit confused. You do have the source, you allready asked some questions about it !!?? See here: http://www.autoitscript.com/forum/index.php?showtopic=16178

It's not the current beta code, but enough to add what you suggested.

Cheers

Kurt

yes, but thats the public source, which is missing a few key features of autoit. if it were the full source, i would definitely add it myself, but its not.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

yes, but thats the public source, which is missing a few key features of autoit. if it were the full source, i would definitely add it myself, but its not.

I used the publicly available source as a basis, added my proposed mods to it, and then published my work here for review. It was a cool and fun project. That's how I got started as an AutoIt developer, and I know that that was the case for SvenP, as well...

What features are you lacking in the public source, theguy?

Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

Link to comment
Share on other sites

from the readme:

NOTE: For obvious reasons this archive doesn't contain all the new features in the current

version of AutoIt. The code for these features may be made available at a later date.

Excluded features are:

- GUI

- DllCall

- ControlListView

- InetGet

GUI is a pretty important feature

edit: and i just noticed,

Things not working under DevC++ (commented out with #ifdef statements):

- "new" handler,

i use devC++

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

What do the "missing" features have to do with the topic at hand? Why do you specifically single out the GUI as being important? Are you off (your own) topic with such comments or do you think there is some correlation between "GUI" programming and "Console" programming?

Also, what is the significance of your edit? Do you actually understand that message? If you did, I don't think you'd comment on it because it's irrelevant to AutoIt working correctly.

Link to comment
Share on other sites

i commented on the GUI because Kurt suggested that I add it myself, and if i compiled my custom version, i would be missing GUI functionality, which isnt something i want to do.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

I think you completely missed Kurt's point. You're not adding it so you'll have your own custom build, you're adding it as proof of concept to prove the idea is doable and useful in which case it might go into AutoIt.

Link to comment
Share on other sites

Ermm... You don't need the full source to make a modification to the source, unless of course it was to add to the missing functions. In this case, it's not.

After you successfully add your code to the public source and compile it and scripts can run fine on it, then you follow the guidelines (I forgot where they are, probably on the public source page) and include the modified files, sample scripts with the new functionality, and the AutoIt EXE you compiled. And also need help file pages. There may be more, but I forgot... It's there somewhere.

Ok, so now, there is no way that the executable you compiled will be the exact one that is publically released (not just for you, but everyone). So you don't have to worry about the final executable and other functionality that is not there because the devs re-compile the private source with your modified code and then ALL of the functionality is in the final release including YOUR modifications.

FootbaG
Link to comment
Share on other sites

Just going back to the original request for a second... and please bear with me because I'm not really a developer.

Isn't the only reason ConsoleWrite () doesn't output to a DOS console is because AutoIt frees up the command line after running (ie. GUI mode)? How about a # command that tells AutoIt not to release the command line after running (like #notguimode or #dontrelease) so that ConsoleWrite () outputs to the DOS console until the script completes, thus avoiding the need for using "|more" to acheive that.

Sean

Link to comment
Share on other sites

AutoIt is a Windows application, not a Console application. The only thing a windowed application can do is "AllocConsole" to create a console window but this is not the same thing as being launched from a console.

I'm tired of explaining this to people, particularly when DaveF has done a better job at it, repeatedly, as well.

Link to comment
Share on other sites

Isn't the only reason ConsoleWrite () doesn't output to a DOS console is because AutoIt frees up the command line after running (ie. GUI mode)?

Sadly, no; Windows "helpfully" disconnects the console connection when it assesses that your script is a GUI application. The AutoIt3.exe program (and the binary used for compiled scripts) is declared as GUI at C++ build time; it's not something intended to be altered on-the-fly or at run time...

Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

Link to comment
Share on other sites

Sadly, no; Windows "helpfully" disconnects the console connection when it assesses that your script is a GUI application. The AutoIt3.exe program (and the binary used for compiled scripts) is declared as GUI at C++ build time; it's not something intended to be altered on-the-fly or at run time...

Great explanation, sorry for my ignorance! :">
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...