Jump to content

How can a compiled script (exe) send its output to the user?


Recommended Posts

Hi,

I like the feature that I can compile the AutoIT script to an exe file. But my script running in endless loops and sometimes I'm not sure, if it hangs or not. That's why I want my compiled script to send it's output to the windows commandline window (where I start the script from) instead not to NULL. Or maybe there is a other way to see the output of the exe version of my script.

Currently I only get my ConsoleWrite output to the output window when I run the script out of AutoIT.

But what I don't want, is a logfile. I want a continious output.

Regards

Link to comment
Share on other sites

Thanks. This is what I need.

But I saw, that when I compile it to an CLI exe, the hotkey (to quit the script) I added to my script doesn't work any more. OK - I can close the window. But it would be nice if the hotkey also works.

Link to comment
Share on other sites

But I saw, that when I compile it to an CLI exe, the hotkey (to quit the script) I added to my script doesn't work any more. OK - I can close the window. But it would be nice if the hotkey also works.

HotKey is working here using CUI.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Change2CUI=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
HotKeySet("+!d", "_Exit")  ;Shift-Alt-d
ConsoleWrite("I'm executing...")
Sleep(6000)
ConsoleWrite("still alive...")
Sleep(6000)
ConsoleWrite("finished.")
Exit
Func _Exit()
    ConsoleWrite(@CRLF & "Exiting using hotkey")
    Exit
EndFunc
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...