Jump to content

Recommended Posts

Posted
  On 7/24/2017 at 7:49 PM, Jos said:

Which limitation? I don't understand which limitations you refer to.

Expand  

Inability to print text (display) in cmd windows which executed the script, without first compiling the script.

 

  On 7/24/2017 at 7:49 PM, cbruce said:

Piotr12, I'm guessing you launched "AutoIt.exe myscript.au3" from Windows RUN or from Windows Explorer.

Expand  

No, I executed it from cmd window.

 

  2 minutes ago, cbruce said:

Also, if you launch a Command Prompt window first and then run your AutoIt script from that command line... you will see the output because that Command Prompt window will not close until you exit it manually.

Expand  

It does not work that way for me :(

Are you sure you don't mean compiled script?

 

  On 7/24/2017 at 7:50 PM, Deye said:

perhaps try something like posted here

Expand  

I think that is different - simulating keypresses. That's not what I want.

  • Developers
Posted (edited)
  On 7/24/2017 at 7:56 PM, Piotr12 said:

Inability to print text (display) in cmd windows which executed the script, without first compiling the script.

Expand  

That is because AutoIt3.exe is not a console program but rather a windows program... and it can only be one at the same time.

Jos

EDIT: There is NO problem!

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted
  On 7/24/2017 at 7:58 PM, Jos said:

That is because AutoIt3.exe is not a console program but rather a windows program... and it can only be one at the same time.

Expand  

Hm I see, well it's a pity. Would be nice if there was AutoIt3CLI.exe. On the other hand, when you run AutoIt3.exe /help, or without any options, won't it print help to cmd window from which you run it?

 

  14 minutes ago, Jos said:

EDIT: There is NO problem!

Expand  

OK, that's why I called it "limitation" (and it's a problem for people like me).

Posted

Whoops! Piotr12... My bad... I forgot that ConsoleWrite() is only good with compiled AutoIt scripts.

This will work when run from the command line with AutoIt.exe:

#include <WinAPI.au3>
_WinAPI_AttachConsole()
$hConsole = _WinAPI_GetStdHandle(1)
_WinAPI_WriteConsole($hConsole, "Hello Piotr12" & @CRLF)

 

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
  • Recently Browsing   0 members

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