New topic: Console Application Assistance
<http://forums.realsoftware.com/viewtopic.php?t=8295> Page 1 of 2 [ 28 posts ] Go to page 1, 2 Next Previous topic | Next topic Author Message Azerus Post subject: Console Application AssistancePosted: Mon Oct 16, 2006 4:51 pm Joined: Mon Oct 16, 2006 4:47 pm Posts: 49 Location: Atlanta I need to know how to do a few things with a console application. 1.) I need to know how to determine when the console application is minimized so that I may create the tray icon for it on the event. (If at all possible) 2.) I need to know the best way to wait for input and allow input at all times for an interactive console. In other words, i need a non-blocking stdIn or some orther sort of input... I gotta have the console waiting at all times for console for user input since it is a client application. Top geocom Post subject: Posted: Mon Oct 16, 2006 5:04 pm Joined: Fri Jul 07, 2006 1:23 am Posts: 199 Location: Auckland, New Zealand Quote:1.) I need to know how to determine when the console application is minimized so that I may create the tray icon for it on the event. (If at all possible) open the code view and then click on minimize and put the code there to create a tray icon _________________ Real Basic 2006 R3 For MAC Check Out My Blog Here http://geocom.wordpress.com And My Site Here http://geocom.co.nz And get my wonderful program Menuola Top Azerus Post subject: Posted: Mon Oct 16, 2006 5:14 pm Joined: Mon Oct 16, 2006 4:47 pm Posts: 49 Location: Atlanta I'm not sure there is a minimize event for a console application? Top geocom Post subject: Posted: Mon Oct 16, 2006 5:17 pm Joined: Fri Jul 07, 2006 1:23 am Posts: 199 Location: Auckland, New Zealand can you even minimize a console application other wize i have no idea as i do not use console applications _________________ Real Basic 2006 R3 For MAC Check Out My Blog Here http://geocom.wordpress.com And My Site Here http://geocom.co.nz And get my wonderful program Menuola Top Aaron Ballman Post subject: Re: Console Application AssistancePosted: Mon Oct 16, 2006 5:36 pm Joined: Wed Sep 28, 2005 8:39 am Posts: 9340 Location: St Augusta, MN Azerus wrote:1.) I need to know how to determine when the console application is minimized so that I may create the tray icon for it on the event. (If at all possible) Console applications don't have any GUI interactions, so from its perspective, there is no such thing as a "minimized" state, much less a tray item. Quote:2.) I need to know the best way to wait for input and allow input at all times for an interactive console. In other words, i need a non-blocking stdIn or some orther sort of input... I gotta have the console waiting at all times for console for user input since it is a client application. Try using a thread to wait on the input. _________________ Check out Ramblings on REALbasic, the hottest book on REALbasic you'll ever encounter! Top Azerus Post subject: Posted: Mon Oct 16, 2006 5:39 pm Joined: Mon Oct 16, 2006 4:47 pm Posts: 49 Location: Atlanta How would I create a new thread in RB? Top Aaron Ballman Post subject: Posted: Mon Oct 16, 2006 5:52 pm Joined: Wed Sep 28, 2005 8:39 am Posts: 9340 Location: St Augusta, MN Make a new class, set its super to Thread and say dim t as new MyClassName. _________________ Check out Ramblings on REALbasic, the hottest book on REALbasic you'll ever encounter! Top Azerus Post subject: Posted: Mon Oct 16, 2006 6:15 pm Joined: Mon Oct 16, 2006 4:47 pm Posts: 49 Location: Atlanta Ok, I created the thread and put an infinite loop for the input, but it still blocks the other thread from continuing. Is there a way to create a non-blocking input stream? Top Aaron Ballman Post subject: Posted: Mon Oct 16, 2006 6:30 pm Joined: Wed Sep 28, 2005 8:39 am Posts: 9340 Location: St Augusta, MN No, there is not. _________________ Check out Ramblings on REALbasic, the hottest book on REALbasic you'll ever encounter! Top Azerus Post subject: Posted: Mon Oct 16, 2006 6:32 pm Joined: Mon Oct 16, 2006 4:47 pm Posts: 49 Location: Atlanta Well that sure takes a few points off of REALbasic huh?... Top Aaron Ballman Post subject: Posted: Mon Oct 16, 2006 7:25 pm Joined: Wed Sep 28, 2005 8:39 am Posts: 9340 Location: St Augusta, MN I wouldn't say so as the vast majority of console applications would never require anything like that. In fact, I'm hard pressed to think of a current situation which would require asynchronous, non-blocking keyboard input. That being said, you're certainly welcome to file a feature request, but be sure to explain your needs as well. _________________ Check out Ramblings on REALbasic, the hottest book on REALbasic you'll ever encounter! Top Azerus Post subject: Posted: Mon Oct 16, 2006 7:49 pm Joined: Mon Oct 16, 2006 4:47 pm Posts: 49 Location: Atlanta Well my app is a client for the Battle.net protocol. Input would be used for local commands or chatting while the incoming chats and commands are also being displayed on screen. Top Pariahware Post subject: Posted: Mon Oct 16, 2006 7:55 pm Joined: Fri Sep 30, 2005 10:00 am Posts: 994 Location: Raleigh, NC Azerus wrote:Well my app is a client for the Battle.net protocol. Input would be used for local commands or chatting while the incoming chats and commands are also being displayed on screen. What you are calling a Console App is not what others are calling a Console App. You most likely want a regular desktop application which spits information into an EditField when the socket receives data. _________________ Christian Pariahware, Inc. Mac, Windows, Linux, & iPhone Consulting [email protected] http://www.pariahware.com/ Bible Trivia Game Show for iPhone, iPad, & iPod touch http://biblicious.com/ -- God loved you so much that He gave His only son Jesus. What have you done with God's gift? Top Azerus Post subject: Posted: Mon Oct 16, 2006 8:01 pm Joined: Mon Oct 16, 2006 4:47 pm Posts: 49 Location: Atlanta Well I already have a GUI version of the application, I just wanted something that can be run remotely on a shell account or locally without taking up so much memory. Top Aaron Ballman Post subject: Posted: Mon Oct 16, 2006 8:03 pm Joined: Wed Sep 28, 2005 8:39 am Posts: 9340 Location: St Augusta, MN If that's the case, then you don't require non-blocking input. You wait on user input, and respond to the user's input. So the user would say "show me the current chat information" and it would show it to you. Or you the user would say "do this other command here" and it would do it. At least, that's how I'd expect a CLI to work. _________________ Check out Ramblings on REALbasic, the hottest book on REALbasic you'll ever encounter! Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 2 [ 28 posts ] Go to page 1, 2 Next -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
