console-application

How can you write log files in Objective C?

If I'm doing mass operations inside objective C, and a lot happens in the console... I cannot see it all happen in windows. Instead of adding the argument ">>WriteLog.log" what would the proper way to log the console inside of Objective C? ...

How could I link my c++ console application to take control of an existing console?

How would I take control of the console of a batch file, and load it into my c++ application? ...

log4net console app not logging on publish

I have a console app using log4net (via Castle Windsor). Everything logs fine to the console when I debug, but when I publish and run the app, nothing is logged. I have my log4net configuration in a separate file (log4net.config). I'm thinking it's not finding the config file, but that's just a guess. I'm a web dev and haven't deploye...

C# - Console.Beep does not work on Windows Vista

Hi, When I tried Console.Beep() on Win Vista (64bit), it just does not work. The speaker itself is OK, when the PC starts, it beeps. Any advice? Thanks! ...

Keeping input/output separated in Java console application

Hello, I am writing a console application in Java. It is similar to a chat client: Input and output are asynchronously made. The problem is that if some output is made while the user is in the middle of typing, the lines will get mixed up on the screen. I am looking for a solution which allows me to have a input area separate from the ...

C++ SetConsoleCtrlHandler routine issue

I'm writting a console application in C++. I use SetConsoleCtrlHandler to trap close and CTRL+C button. This allows for all my threads to stop and exit properly. One of the thread performs some saving that require some time to complete and I have some code to wait in the console crtl handle routine. MSDN specify that a box should pop u...

Creating a login page in java console application using a txt file

I am creating a java console application and i need to use a notepad (txt) file to store PIN, AccountNo and Balance. When the user enters the PIN (from BufferedReader) it should get validated from the notepad file and login to thge system. However, the code fragment which I used below only displays Enter PIN, and when i click on Enter, t...

Giving .NET program an output type of windows application and console application

I have a C# application that has a gui and has its output type set as Windows application. I would also like to invoke it from the command line (via parameters) and thus it needs to also be a console application. Is there a way to get my application to run both as a windows application and a console application? Is there a way to set ...

MSMQ private queue - not receiving

New to MSMQ... My local queue never receives my test message. I have verified that Message Queuing and Message Queuing Triggers are running in my Services dialog (Vista Ultimate). Thoughts? class ConsoleApplication { private const string Path = @".\private$\SomeQueue"; static void Main(string[] args) { var queue =...

Global hotkey in console application

Does anyone know how to use the RegisterHotKey/UnregisterHotKey API calls in a console application? I assume that setting up/removing the hotkey is the same, but how do I get the call back when the key was pressed? Every example I see is for Winforms, and uses protected override void WndProc(ref Message m){...}, which isn't available...

Invoke delegate on main thread in console application

In a Windows Application, when multiple threads are used, I know that it’s necessary to invoke the main thread to update GUI components. How is this done in a Console Application? For example, I have two threads, a main and a secondary thread. The secondary thread is always listening for a global hotkey; when it is pressed the secondary...

How to get raw XML in WCF Client from Web Service call

I have a WCF Client (console app) that calls a WCF web service and I'm trying to get the raw XML response from within my Console Application. Does anyone have an idea or code snippet on how to do this? ...

Log4Net config problems

Hi, So I've got a website and a console app that runs daily. They both call a Function called ProcessIncident(). The website allows you to do it manually for an individual incident and the console app does a batch every night. Within the function I have various log4net Log.InfoFormat() and Log.DebugFormat() calls When I run from the ...

How to use colours in console output in Scala or Java?

How to use colours in console output in Scala or Java? ...

Mask Password Input in a Console App

I am writing a console application using BDE 2006 and I want it to be able to prompt for a password string and mask it with "*" as the user is typing. I have looked around but I could not find examples of how to do this. Everything I saw was how to do this in TEdit. Any pointers on how to accomplish this? Thanks in advance, Nic ...

How can I get list of open tabs in firefox via a command line application

I have a lot of tabs open in Firefox. After I close firefox and then run it again, the tabs are there, that's all right. However, from time to time, Firefox crashes and my tabs are lost. I would like to somehow get the open tabs and backup the list to some file. Any ideas? (With tabs in file I can also use git/svn/whatever to store the...

Should I write unit tests as console apps first?

I'm debugging a set of WCF services. Initially, I created some unit tests, but since I'm using threading I often receive "Aborted" or "Stopped" tests without any clear explanation why (this is a known bug in Visual Studio). I found it extremely challenging to debug the services when I can't even read the log output, so I quickly wrote a...

Making UI for console application

How can I make an interface for console applications to make them look like edit.com under Microsoft's operating systems. Target languages are C, C++ and C#.NET. ...

I get the "FilenotfoundExceptionunhandled" ? in Console application while displaying the SharePoint site list name

Error Details: The Web application at http://dev001aaamaaind:333/ could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application. string urlSite = "http://dev001aaamaaind:333/"; usi...

C# application accessing remote sql server 2008 instance ... not working

I have a console app that needs to connect to a remote sql server 2008 instance.... this particular line throws an error even though i have access to that database... connection.open() is the line that is throwing the error... ...