Hidden window or accept loop without a window 
Author Message
 Hidden window or accept loop without a window

Hi Everyone,

I have a program which runs on a simple window and does a couple of really
simple things.  No file acces or anything tricky.  I would like to convert
this into a command-line program, or one that appears to be command-line,
which could be embedded into a login script (no visible windows).  The trick
is that my program uses a class that needs to be able to post events back to
the program, hence it needs some sort of event loop.  Anyone know how to
implement this without a window?  If not, how could I make it so the window
is never actually displayed?

Best,

Dan Gorrell



Sun, 06 Nov 2005 07:01:58 GMT  
 Hidden window or accept loop without a window
Dan Gorrell spoke thusly on 5/20/2003 16:01:

Quote:
> Hi Everyone,

> I have a program which runs on a simple window and does a couple of really
> simple things.  No file acces or anything tricky.  I would like to convert
> this into a command-line program, or one that appears to be command-line,
> which could be embedded into a login script (no visible windows).  The trick
> is that my program uses a class that needs to be able to post events back to
> the program, hence it needs some sort of event loop.  Anyone know how to
> implement this without a window?  If not, how could I make it so the window
> is never actually displayed?

> Best,

> Dan Gorrell

Set Prop:Hide to True after opening the window but before the Accept
statement IE

Open(MyWindow)
MyWindow{Prop:Hide} = True
Accept

HTH,
--
Paul Attryde
www.attryde.com/clarion



Sun, 06 Nov 2005 07:13:43 GMT  
 Hidden window or accept loop without a window
The best way I have found to use comand line parameters is to load a
variable string first.
Loc:Command = COMMAND()

Once in the string you can use INSTRING to locate your parameters. Most
command line parameters i've seen are delimited with /param1 /param2
or -param1 -param2. It's completely up to you of course.

Hiding the window is easy. After the window is open
Window{PROP:Hide} = True

--
Regards,
Tony M



Sun, 06 Nov 2005 10:53:29 GMT  
 Hidden window or accept loop without a window
Hi Dan,

On Tue, 20 May 2003 17:01:58 -0600, "Dan Gorrell"

Quote:

>implement this without a window?  If not, how could I make it so the window
>is never actually displayed?

I've done this in a class method where I needed a timer, something
like this:

W  Window, At(0,0,0,0),Timer(1)
   End
 Code
 Open(W)
 W{Prop:Hide} = True
 Accept
   If Event() = EVENT:Timer
     ! Do your stuff
   End
 End
 Close(W)

Best regards,

Arnr Baldvinsson
Icetips Software        
San Antonio, Texas, USA
www.icetips.com

Subscribe to information from Icetips.com:
http://www.icetips.com/getnotificationinfo.htm



Sun, 06 Nov 2005 11:00:27 GMT  
 Hidden window or accept loop without a window
Hi Dan,

Quote:
> I would like to convert
> this into a command-line program, or one that appears to be command-line,
> which could be embedded into a login script (no visible windows).  The
trick
> is that my program uses a class that needs to be able to post events back
to
> the program, hence it needs some sort of event loop.

You are talking about the difference between a CUI and a GUI. Check out the
.EXP file that your program uses. The first line reads something like this:

NAME 'SOMENAME' GUI

If you changed that GUI to a CUI and recompiled you would get a program that
did not throw away it's default Console. e.g. a command-line program. Since
it is running under Win32 you should be able to open a hidden window AND
write to that console, but it may require some hand-coded API calls to write
to the console. If you have a subscription to Clarion Magazine you can find
several articles on all this including an old Clarion On-Line article from
Paul Attryde (who posted a response to you earlier) where he describes using
WriteConsole. Also, you can experiment with using a Clarion DOS file driver
and opening the "CON:" device for write access to the default console. DOS
devices are available in Win32 (see the API call QueryDOSDevice). There are
even ones for USB devices.

Good luck with it. If you have problems post it here and I may be able to
help.

Regards,

Jim Gambon



Sun, 06 Nov 2005 21:08:00 GMT  
 Hidden window or accept loop without a window
It's pretty simple isn't it!  :)

Thanks Paul!  Works perfectly.

- Dan


Quote:
> Dan Gorrell spoke thusly on 5/20/2003 16:01:

> > Hi Everyone,

> > I have a program which runs on a simple window and does a couple of
really
> > simple things.  No file acces or anything tricky.  I would like to
convert
> > this into a command-line program, or one that appears to be
command-line,
> > which could be embedded into a login script (no visible windows).  The
trick
> > is that my program uses a class that needs to be able to post events
back to
> > the program, hence it needs some sort of event loop.  Anyone know how to
> > implement this without a window?  If not, how could I make it so the
window
> > is never actually displayed?

> > Best,

> > Dan Gorrell

> Set Prop:Hide to True after opening the window but before the Accept
> statement IE

> Open(MyWindow)
> MyWindow{Prop:Hide} = True
> Accept

> HTH,
> --
> Paul Attryde
> www.attryde.com/clarion



Mon, 07 Nov 2005 02:34:28 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. - Tcl without windows, Tcl without Tk for windows.

2. Procedure, window, accept loop questions

3. Window Open() refuses to accept Window.Left changes?

4. How to draw a window not hidden by the taskbar in windows

5. dialog windows hiding main GUI window/catching printer error

6. Positioning toplevel windows on MS-Windows without ghosting?

7. Closing Window (?CancelButton) while in event.accepted ...help!

8. TCPServer#accept blocking in Windows

9. Tk accepts invalid window name!

10. close and/or hide a window: HELP

11. hide windows

12. Hiding a non clarion window

 

 
Powered by phpBB® Forum Software