Instant AWK GUI under Windows

  • Permalink
  • submit to reddit
  • Email
  • Follow


A dirt simple method of sprucing up your
AWK output under Windows.

Beware wordwrap & enjoy!
 
later on,
Mike

-- 
http://topcat.hypermart.net

<-- cut here -->

<!--

Instant GUI for AWK output - Michael S. Sanders 2009

This example will capture the output of your AWK program
and render that output dynamically to an HTML stream
within a graphical window.

Requires Windows, and the WSH scripting host, both
of which are native to any modern Windows installation.

To use this example, follow these three steps:

1. Save this example to a file with an extension of 'HTA'
eg - 'example.hta' (HTA meaning 'HyperText Application'
is a proprietary format for Internet Explorer).

2. Edit the line below containing 'program.awk datafile'
and replace with your AWK program file, and your datafile.

3. double click your HTA file to run it.

-->

<html>
<head>
<title>My application</title>

<hta:application 
id="MyApp"
applicationName="My application"
border="thick"
borderStyle="normal"
caption="yes"
contextMenu="yes"
icon=""
innerBorder="no"
maximizeButton="yes"
minimizeButton="yes"
navigable="yes"
scroll="yes"
scrollFlat="no"
selection="yes"
showInTaskBar="yes"
singleInstance="yes"
sysMenu="yes"
version="1.0"
windowState="normal"
>
</head>

<body>

<script type="text/vbscript">
Set WshShell = CreateObject("Wscript.shell")
Set objExec= WshShell.Exec("%comspec% /c gawk -f program.awk datafile")
output = objExec.StdOut.ReadAll
document.write("<pre>" & output & "</pre>")
</script>

</body>
</html>

<-- cut here -->

0
Reply mss 12/19/2009 2:14:51 PM

See related articles to this posting

comp.lang.awk 3216 articles. 6 followers. Post

0 Replies
509 Views

Similar Articles

[PageSpeed] 9


Reply:

Similar Artilces:

GUI or not to GUI
Hello, how can I proof if a program (which has WinMain and not main) is started from a console window or if a programm is started by a shortcut or by a doubleclick in Windows Explorer, etc. I think if the programm is started I can use GetParent to get the parents window handle, but then I have to test if this Window is a console. How can I do this? 2nd) If the parent window (which started the app) is a console, how can I write to that console? I tried this: bCon = AttachConsole(ATTACH_PARENT_PROCESS); SetConsoleTitle(_T("This is a console window") ); and the ...

how to display erros on a gui window after run the gui instead of commond window
hi i created software using matlab gui ..if any errors comes it gets stop and showing error on commond window.my problem is here how can i display the errors on running GUI.. whethr it is using errordialogs or msgbox.. pls giv me the information regarding this.. and anthr thing is how to create a setup file or exe to install in client machine... advance thanks to all.... "jagadish katti" <jagadish.katti@gmail.com> wrote in message <iclcpm$osa$1@fred.mathworks.com>... > hi i created software using matlab gui ..if any errors comes it gets stop and showing error ...

Windows GUI app with Console Window?
Hi, Is it possible to have a Windows GUI app (Fivewin) that calls a console window where you can use: ? " hello" in your code that than appears in the console window? A user wants to have a Console Window (Like a 'Dos-Box') where he can use ? "Hello world" to appear in that console window. So, the Windows app should be able to open a 'dos-box'-alike window and send text to it. Its mainly for keeping track of which files have been uploaded to a FTP site. So the dos-box alike window is used as a outputwindow to see the progress of the files uploaded....

How to load a GUI from another GUI window
Hi, I doing a GUI calculator, therefore need to do one GUI with several pushbuttons that launch another GUI in the same window, without opening a new figure window. Can someone advise me how to do it? Thanks a lot. Jean "Jean Lim" <inno_pf@yahoo.com.sg> wrote in message <g1dv4i$l6a$1@fred.mathworks.com>... > Hi, > > I doing a GUI calculator, therefore need to do one GUI with > several pushbuttons that launch another GUI in the same > window, without opening a new figure window. > > Can someone advise me how to do it? ...

GUI
HI would anybody be able to help me. Im attaching a webcam to a pan and tilt module and would like to be able to display the video window in the GUI itself, does anyone know how this can be achieved? regards: Leigh McClurg ...

Separating GUI window from graph window
Hi all My GUI interface has a pushbutton. When I click on the push button, data is read from a text file and plotted on a graph. when I am using plot command, the graph is plotted on the GUI window, so the graph does not have default graph options (like print, save, etc). Is it possible to plot graph on a seperate window i.e., when I click on the pushbutton another window popsup displaying the graph. so that it has all the graph options? thanks Bh Letters wrote on 16 Aug 2004 22:28:35 MET: > Is it possible to plot graph on a seperate window i.e., when I > click on the pushbutton an...

plot is in a new window not on gui window defined
I am new to matlab so maybe my problem is pretty easy, I have a GUI which plots several 2d figures using command plot, basically I enter vaues to static boxes and press a push botton to obtain the corespondent graph, but when I try the same for 3d plots the figure is shown perfect as expected but in a new figure and not on the axes of the gui. Alfredo. [x,y,z]=xyz_patch(theta,dth,phi,dphi,R); patch(x,y,z,z); set(gca,&#8217;Tag&#8217;,'ActiveAxes&#8217;); ...

how to use Gui in multi-Windows or mulit-Gui
Hi, I am creating the user interface with GUI of matlab6.5. As I have so many information to be shown and I don't want to use one single Gui, I hope I can use the second or more gui to show the information if I want. But I cannot find useful information on how to creat a multi-gui, who can provide use information or tell me how to do. Can't you just call other GUIs using the main GUI's callbacks? e.g. a button in the main GUI has a callback which contains the name of a second GUI. Stuart "frank zhu" <fzhu@scintrextrace.com> wrote in message news:eee4435.-1@webx.ra...

calling a new gui window from within a gui
I need to be able to open a new gui window from within a gui. I have a gui that presents data for certain selected fields. My users want to be able to see data for a number of fields at the same time, this means they want to be able to open a new window with the same functions the first gui has, that will display data from the same file. I've figured out how to transfer all the data and so on, what I'm missing is how do I open a new window for the additional gui. Any ideas? Thanks, Noa Hi, try this : function mygui figure('Color',rand(1,3)) uicontrol('style','p...

Can a console-window launches a GUI window...
Hello everyone, is there a way for a console-window based program (characterBase), to launch a GUI-Window based program, by calling the win32 API "CreateProcess" ?? In my case, this method is not working at all. thanks a lot for the help. Kellie. Kellie Fitton wrote: > is there a way for a console-window based program (characterBase), > to launch a GUI-Window based program, by calling the win32 API > "CreateProcess" ?? In my case, this method is not working at all. Of course it's possible. Did you check GetLastError()? Show us some code and ...

windows:perl-tk-GUI without dos window ?
Is there a possibility to run a perl-tk-GUI on Windows without the unwanted-black-DOS window showing up in the background? Thanks in advance ... Frank On 9 Jul 2004 06:07:45 -0700, frank@fgcz.ethz.ch (Frank Potthast) wrote: >Is there a possibility to run a perl-tk-GUI on Windows without the >unwanted-black-DOS window showing up in the background? > >Thanks in advance ... Frank I don't use Perl on Windows, but a fellow on http://perlmonks.org says that if you use wperl.exe instead of perl.exe, you avoid the dos console window. -- I'm not really a ...

GUI for Windows?
Hi I'm new to Ruby and after I read a bit about the sweetness of the language I'd like to learn it. But... I always work in Windows, and fine I'd like to program for web aplications as a hobby, but I'd also like to be able to have a use for it in my daily work in Windows where I can program snippets, for fun, to help me and my coworkes. Is it possible to pack a Ruby program so that the user don't need to have Ruby installed to use it and is there any good GUI for Windows which is nice to work with, even for a beginner as me? I know it is probably better for me to ...

GUI with awk?
I had written some of mine awk scripts. How to create GUI after clicking buttion particular awk script should be running.? Is there any tool or any suggestion. Please help. Vilas wrote: > I had written some of mine awk scripts. How to create GUI after > clicking buttion particular awk script should be running.? That is the easier of two scenarios (the much more difficult one would be to control a GUI from within awk). In your case, chose any tool / programming language you like for building GUIs and that can also execute an external command. That external command would be your aw...

GUI Awk
Where can I find a version of awk that hs a GUI interface ? I need to build Executalbe script under windows environment . Thanks in advance . Bless u happytoday wrote: > Where can I find a version of awk that hs a GUI interface ? I need to > build Executalbe script under windows environment . Thanks in > advance . Bless u To write your awk program you can use any text editor with GUI interface. The awk program saved in the file system can then be called from any command shell you have on your WinDOS environment (DOS box, MKS kornshell, Cygwin bash, etc.). If that doesn't fit; wh...

Figures and GUI control slower in Windows 7 than in Windows Xp
Hello everyon, I have Matlab 2010a installed under the windows 7 environment. I wrote recently a small MATLAB GUI program. It works very well. But one thing I noticed is that generally the GUI control and GUI reaction, like pressing a button to invoke some changes within the GUI, are remarkably slower than running in Windows Xp on another notebook I have. Both computers' hardware performance are similar and I don't think this the reason is why the same program works so differently. Also I have a problem, If I call the function "figure" to create a new figure, the figu...

How to load a GUI within current current GUI figure window
Hi all, I was hoping someone would know the answer to this, as i have searched and asked many matlab users. Im using a GUI for my final year project, and have several different GUIS in total. What i would like to do is have one GUI with several pushbuttons that launch another GUI in the same window, without opening a new figure window. As by the time you have finished exploring my program you may have upto 10 windows running! I tried to set the current figure handle to launch within the same figure window, but to no avail. Any help would be greatly appreciated. Thank You ...

how to make GUI window a 'figure' window in GUIDE?
Its been a while since I used GUIDE. I wrote a small GUI app with GUIDE now, but it is not a 'figure'. i.e. there are non of the figure associated options one would see at the top as when one does a 'figure' command such as zoom/unzoom, print, rotate3D, etc... I have created few axes on the window, but the whole GUI should sit in a 'figure'. Not sure how to do this in GUIDE at this time. When I created this, I choose the 'Blank GUI default' and added all the uicontrols. GUIDE created the m file and the fig files. I looked at 'GUI options...

VIM on windows
I am curious if there is a version of VIM that uses win32 GUI routines, but uses cygwin for file i/o, shell and so forth. JoeSmith <JoeSmith@IDontWantSpam.bogus.bogusaddress.com> wrote in news:VNFJb.6177$R66.1923@newssvr25.news.prodigy.com: > > I am curious if there is a version of VIM that uses win32 GUI > routines, but uses cygwin for file i/o, shell and so forth. > > From cygwin, you can execute the w32 gvim executable. Stick a link in /usr/local/bin to gvim.exe. Hello, JoeSmith <JoeSmith@IDontWantSpam.bogus.bogusaddress.com> wrote in...

gui window
possible that close button (in addition to Maximize) on gui window can be disabled (enable 'off')? "pink " <wahyoe_slipnot@yahoo.co.id> wrote in message news:it1bm8$ffm$1@newscl01ah.mathworks.com... > possible that close button (in addition to Maximize) on gui window can be > disabled (enable 'off')? No, but you can set the figure's CloseRequestFcn property to control the behavior when you click on that button. -- Steve Lord slord@mathworks.com To contact Technical Support use the Contact Us link on http://www.mathworks.com "Steven_Lo...

close sub-gui's on closing main gui window
Hello I have a main GUI application, which opens up smaller gui's and windows. I would like to close all the open windows and gui's, if I close the main Gui. What syntax would I have to use? Vihang On Feb 18, 9:23=A0am, "Vihang Patil" <vihang_pa...@yahoo.com> wrote: > Hello > I have a main GUI application, which opens up smaller > gui's and windows. > I would like to close all the open windows and gui's, =A0if > I close the main Gui. > What syntax would I have to use? > Vihang What about the "close all" command. Doesn't ...

Gui having an 'open file window' and a 'save file window'
Is it possible to click on a button in the gui and have a Windows-like window where I can select the file to open and another like when you click on 'save as'? Thank you very much nathaniel zoso wrote: > Is it possible to click on a button in the gui and have a > Windows-like window where I can select the file to open and another > like when you click on 'save as'? > > Thank you very much Check out the UIGETFILE and UIPUTFILE functions, respectively. -SteveSimon ...

How to start java GUI program WITHOUT additional Windows command line prompt console window?
I want to start GUI based Java programs by simple clicking on a batch script file which in turn contains a command like the following: java myclass or java myclass "someparm" However when I click on the batch script file in Windows(XP) at first a black command line prompt window pops up and then the actual Java GUI window is shown. The black command line prompt window remains visible until I close the Java GUI window. How can I prevent this? I want to see just the Java GUI window nothing else. I don't even want to have the black command line window to be minimized. How ...

Deploytool help please: Can't get standalone Windows GUI without DOS window
Hi Everyone, I have created a matlab GUI for my program and would like to deploy it as a stand alone application for Windows. - Unfortunately, a DOS window appears when I use the Deploytool to do this. Is there a way I can create a standalone windows version that doesn't have this DOS window come up? - As it stands, the DOS window look sufficiently unprofessional that I'll have to look into an alternative development platform if I can't suppress it. I figure there must be a way (even if I have to start importing things into Visual Studio), but, I really don't have any ide...

Ann: lesson 5 in Windows API level GUI programming "Window message basics"
<url: http://learnwinapi.wordpress.com/2012/01/08/lesson-5-window-message-basics/> Contents of this lesson: > The power and limits of resources. > Packed message arguments, manual unpacking. > Use a separate message handler function for each message. > Unpack arguments via undocumented message cracker macros. > Be pedantically correct: support message results. This lesson�s main points: * Windows window messages are much like C++ virtual functions. * The packing and unpacking of messages, having messages as data, introduces some com...