Hi Sean,

Quote Originally Posted by seanyboy View Post
I quite like console mode apps, and it's frustrating that DAccess don't provide a "Convert to Console" button in the project options.
Thanks for exposing these functions. I have started to convert some of our house keeping programs so we can run them as scheduled tasks.

Click image for larger version. 

Name:	2018-10-15_11-11-57.png 
Views:	56 
Size:	35.4 KB 
ID:	12322

becomes

Click image for larger version. 

Name:	2018-10-15_11-12-54.png 
Views:	56 
Size:	37.1 KB 
ID:	12323

One change I did make was to split the WriteConsole procedure into WriteConsole and WritelnConsole. Also there was comment next to the statement, highlighted below, in the OpenConsole function I didn't really understand as it would be called each time WriteConsole was called.

Code:
 Function OpenConsole Returns Handle
  Integer iRetVal
  
  Move (Win32AttachConsole(ATTACH_PARENT_PROCESS)) To iRetVal // Can only call this once!
  
  Move (Win32GetStdHandle(STD_OUTPUT_HANDLE)) To iRetVal
  Function_Return iRetVal
End_Function