Instant AWK GUI under Windows

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
mss
12/19/2009 2:14:51 PM
comp.lang.awk 3315 articles. 0 followers. Post Follow

0 Replies
660 Views

Similar Articles

[PageSpeed] 10
Reply:
Similar Artilces:

US-VA-McLean: UNIX System Admin, NFS, NIS, DCL, csh, Perl, VMS, Windows; C-P (45305157602)
US-VA-McLean: UNIX System Admin, NFS, NIS, DCL, csh, Perl, VMS, Windows; C-P (45305157602) ========================================================================================== Position: UNIX System Admin Reference: SMC01429 Location: McLean VA Duration: C-P Skills: 2+yrs UNIX and LINUX System Management. Configuration of UNIX systems, system Installation, clustering and configuration, fundamentals of security, installing third_party software. Paging and swapping, inter_process communication, device...

Using Robotics Toolbot w/GUI and GUIDE
I was wondering if anyone knows how to call a function (.m file) within another .m file. I am trying to call functions from the robotics toolbox (link, robot, etc . . ) in a GUI. "Derek Lura" <rakinind@yahoo.com> wrote in message <g0t0ce$k48$1@fred.mathworks.com>... > I was wondering if anyone knows how to call a function (.m > file) within another .m file. I am trying to call functions > from the robotics toolbox (link, robot, etc . . ) in a GUI. I've been working on this and it appears that the functions are working, however the plot(robot,q) ...

Bode plot using GUI
Hi, I am a beginner in Gui also to matlab with a matlab version of R2010b. I have a transfer function H(s)= K*((s+a)*(s+b)) / ((s+c)*(s+d)*(s+e)*(s+f)) where s=jw and want to be able to change the values of the parameters of a,b,c,d,e,f and the gain K using the Interface to get the bode plot of Magnitude and phase (2 plots) for different input parameters . Also, must be able to change the M & N values for the transfer function.i.e N>=M I have created an interface with default values for these parameters and the axes to obtain the 2 plots but not able to get the exact progra...

Display window after windowClosing() event.
Hi, I have the following code in windowClosing() of JFrame in Mac public void windowClosing(WindowEvent event) { setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); } Hence after I click on the close button, window won't be visible. But the .app is available in the dock menu of Mac. How can I make the window visible if I click on the .app icon in dock. Please let me know. Thanks in advance. Milind milindsj@gmail.com wrote: > Hi, > I have the following code in windowClosing() of JFrame in Mac Do not multipost. See the answer in another group. /Thomas -- The comp.lang.java...

Link to Yahoo Instant Messenger
Is there a way to send a text string from Access to Yahoo Instant Messenger. I have a client that has a customer address report that can be sent via email to a broker on request. The broker's prefer to get the customer address via instant messenger (to lazy to open email then open attached report). I can create a text string that has the necessary customer info. Is there a way to send the text string to Yahoo Instant Messenger? TIA Joe V ...

Detecting Ctrl-Alt-Del in Windows
Obviously, this is a windows-based question. I know that Ctrl-Alt-Del is handled deep inside the OS, and I'm not trying to interrupt that. But is there some way to detect that a C-A-D has been pressed? Also, is there a corresponding key-sequence in Mac and Linux? And how might one detect those too? Den On Thu, 01 Sep 2011 08:52:49 -0700, Den wrote: > Obviously, this is a windows-based question. I know that Ctrl-Alt-Del > is handled deep inside the OS, and I'm not trying to interrupt that. > But is there some way to detect that a C-A-D has been pressed? Not reliably. Yo...

Expect on Window XP, spawn telnet, tclsh always complain, why?
Hi, Gurus: I installed Active TCL8.4.15 on my XP notebook, and just tried small thing like below: tclsh package require Expect spawn telnet 172.31.31.31 then a system error poped out, saying tclsh application has encountered a problem and needs to close. if I issue telnet 172.31.31.31 outside of tclsh, it is working fine. anybody has this experience? the telnet application is from windows, anybody has telnet for Expect on windows. thanks. /zhenwu This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig623A6F074855ED5A25806A2C Content-Type: text/plain; charset=ISO-8...

window size and ack
Hi All, I am new to TCP/IP and after going thru the RFC, I am more confused. Basically, I would like to understand how windowing (flow control ) works and what is the relationship of window and ack. Also when is cumulative ack used? A simple example to illustrate the sender and receiver windows starting with SYN exchange would be of great help. Thanks, ASM asm wrote: > Hi All, > > I am new to TCP/IP and after going thru the RFC, I am more confused. The RFC793 is incomplete. Please read RFC1323 to have a better picture. > Basically, I would like to understa...

XP/Windows Server 2003 Interconnect Help Please
I know there must be a simple answer to this but I've tried just about everything, well almost, to have an XP notebook to Windows Server 2003 with no success. Clearly both machines see one another and their IP addresses but I'm unable to have visibility to either machine. Currently both units are members of the same WorkGroup. Can anyone provide a simple set of steps to make this happen. I have administrator access. Thanks in advance. I'm new to this so answer may not be correct. xp defaults to group name of mshome while my server 2003 defaulted to name of workgroup. all I d...

help : text in gui
hi all.. i have a problem, i have a button and a static text. when the button clicked,its open 'info.txt' then it shows in static text.can anybody help me? thanks On May 21, 3:50=A0am, "agnes cawas" <o_nestblu...@yahoo.com> wrote: > hi all.. > i have a problem, i have a button and a static text. when the button clic= ked,its open 'info.txt' then it shows in static text.can anybody help me? > > thanks -------------------------------------------------------- No. Because that does not make any sense. Rephrase, elaborate, and repost. ...

run program from cpp and hide window
Hello, Is there a way to hide a windows application and run it from a c program. Something like installing an app in the background? thanks ShellExecute(NULL, "Open","C:\\my\\bin\\Debug\\myapp.exe",NULL,"C:\\my\\bin\\Debug",SW_HIDE found this in another post, thanks. jcharth@hotmail.com wrote: > Hello, Is there a way to hide a windows application and run it from a c > program. Something like installing an app in the background? thanks ...

Scope on GUI: solved but with a couple of problems
I finally found the way to Scope my pressure sensor data on the GUI using the S-function by Nassim Khaled you can find here : http://www.mathworks.com/matlabcentral/fileexchange/21261 Now I have two problems with it: 1) When I start the simulation the graph starts to show pressure sensor values, but seems that once it reach a certain value on the X or Y axes it stops to graph in the GUI graph and instead open a new figure out of plot, keeping plotting there. Any idea why? 2) I wish to add another graph in real time for an accelerometer; how can I say to matlab to plot the sensor in axes1 an...

Lotus Domino 6.5.4 Windows 2003 x64, issues?
I recently bought a new server to replace the old one. It came pre-configured with Windows 2003 x64. Does anyone know if there are any known issues with installing Lotus Domino 6.5.4 on this operating system? Thanks! -- ---------------------------------------------- Posted with NewsLeecher v3.0 Final * Binary Usenet Leeching Made Easy * http://www.newsleecher.com/?usenet ---------------------------------------------- We moved our first domino 6.5.4 server to a Windows 2003 x64 IBM blade one week ago and have not had any issues. The only problem we had was unrealated to domin...

Guide errors creating a simple gui
Hello Matlab users, I created a simple gui (test.fig) with help of GUIDE. To get familiar with matlab I tried to play around with the test.m file that was made by GUIDE. I removed the % in front of uiwait() and put it back there afterwards. To see what changed I pressed the green triangle (run button) of the matlab editor and got error messages even after changing test.m back to its original state. Then I removed the test.m file to get a new one created by GUIDE when opening test.fig. But now GUIDE refuses to even open the test.fig with the error messages below. I suspect the er...

CLI ok GUI Sucks
Ok here it is, i have a laptop, that for some reason, will open up remote files just lighting quick however, you go to browse to them through a maped drive or some other form of windows GUI it will take about 45seconds to open. I can't think of anything else to do. So far i have double checked the ram/CPU its fine. I double checked the swap, its fine i double checked it was at 100full it is. bandwidthplace.com says im at 1.8mbs. i really am at a loss here. it has little to no spyware, which has me curious as to why adaware found 21 items and microsucks anti-whatweputonyourmachine found not...

New awk user needs help
Hello, I'm a new awk user and need some help. I've figured out how to use awk to extract certain columns from a file and output them to a new file. What I am having trouble with is telling awk how to skip a number of lines before extracting the desired columns. Basically, my file has a number of header lines before the column formatted data begins. Any help or suggestions would be appreciated. Cheers, Ayon phatphreak74@yahoo.ca wrote: > Hello, > > I'm a new awk user and need some help. I've figured out how to use > awk to extract certain columns from a file...

[News] Windows Blue Screen of Death Good for Masquerading Scareware
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Scareware package mimics Windows Blue Screen of Death ,----[ Quote ] | Miscreants have developed a scareware package that mimics Windows' infamous | Blue Screen of Death. | | Prospective marks are presented with a seemingly crashed system, along with a | text warning that they need to buy "security software" to clean up their | systems. But the SystemSecurity rogue package on offer has no utility other | than scamming people out of their money. `---- http://www.theregister.co.uk/2009/08/04/bsod_scareware/ Recent: Blue S...

open links in separate windows
I recently moved computers and installed XP and eudora again. But was has been changed is, when I got an email with several links, all these links are opened in the same Internet Explorer window. I prefer to have them in separate windows.... Anyone who knows the trick to get back to this option? Jan Verburgt On Sun, 25 Apr 2004 12:53:58 GMT, j_verburgt@hotmail.com (J Verburgt) wrote: >I recently moved computers and installed XP and eudora again. But was >has been changed is, when I got an email with several links, all these >links are opened in the same Internet Explore...

how to prevent popup windows when opening the main.vi with menu in use?
Hi I have a problem&nbsp;with the&nbsp;pop up windows.&nbsp; I have&nbsp;3 programs - main, entry and realtest. Entry and realtest are in main.vi. Entry and realtest are called to open and run by programmatically in main.vi. There's one problem with entry. I cannot understand how it could have&nbsp;happened. There's a menu bar used with 2 items&nbsp;that open up the pop window when selecting one of the items in the menu. I open up entry.vi&nbsp;and it itself opened up with 2 pop-up windows altogether. Of course, I linked the 2 pop up windows to entry by by u...

Run in Windows
Run["someprogram"] in Windows works, but it always pops up a command window, and only after that the application that is to be started. Is there a way to start without the command window, and even start the windows application in minimized mode? Hi, write a MathLink program that call ExecProgram(commandline,1) Regards Jens Erich Neuwirth wrote: > > Run["someprogram"] > in Windows works, but it always pops up > a command window, and only after that the application > that is to be started. > Is there a way to start without the...

AWK question #5
Hi All, I have a question, I have a data coming through like this; Problem='A' , 'B' , 'C' , 'D' , 'F' , 'G' , 'H' , 'I' , 'J' , 'K' , 'L' When I use awk like this; echo $Problem |awk -F, '{print $1}' I see only 'A' on the command line. I am trying to put the variable Problem in a loop so that I can print one by one like this ; 'A', 'B', 'C', 'D', .... 'L' Can anyone please give me suggestion. Thanks p pawan_test wrote: > H...

Hit pushbutton in GUI with 'return' from keyboard
Hi, is there a way to use the 'return' key from keyboard instead of clicking by mouse to activate a pushbutton in a GUI. I tried to use the code from the examples: function figure1_KeyPressFcn(hObject, eventdata, handles) if isequal(get(hObject,'CurrentKey'),'escape') handles.output = 'No'; guidata(hObject, handles); uiresume(handles.figure1); end if isequal(get(hObject,'CurrentKey'),'return') uiresume(handles.figure1); end But it doesnt work. Thx, Kai In article <ef5bf93.-1@webcrossing.raydaftYaTP>, Kai Voges <...

Q: Free compiler for 64 bit Windows 7?
Please excuse me for a dumb question: Are there any free C++ complier running on 64 bit Windows 7? Thanks, M. K. Shen "Mok-Kong Shen" <mok-kong.shen@t-online.de> > > Please excuse me for a dumb question: Are there any > free C++ complier running on 64 bit Windows 7? Guess visual studio... > Guess visual studio... Seem not completely painless in express, not sure if bug or feature... http://jenshuebel.wordpress.com/2009/02/12/visual-c-2008-express-edition-and-64-bit-targets/ On Dec 21, 8:38=A0pm, Mok-Kong Shen <mok-kong.s...@t-onlin...

awk xml problem substituting CHARDATA
Hi, I installed gawk 4.0.71 in my Slackware box to be able to use the xml parser. What I want is to be able to change the 'InvoiceNo' of a xml file, when it is repeated. I'm coming close to the objective. Here's the simplified xml file: <SalesInvoices> <Invoice> <InvoiceNo>VD 002/239721</InvoiceNo> <InvoiceStatus>N</InvoiceStatus> <Line> <LineNumber>1</LineNumber> <ProductCode>213</ProductCode> </Line> </Invoice...

I need GUI FREDA!!!
hi there, how can I download FREDA for matlab to calculating Random Decrement with Microtremor datas? please helop me!!! Hello, now I'm also looking for Freda GUI. You are able to find this, can you help me? Thanks ...