=pod Code submission from: Paul Schaap (schaappa@ozemail.com.au) goHelpers 1.0.0 Release Notes WHY === The web browsers have an excellent (but possibly dangerous) feature called helpers. Basically all you have to do is set up your Web Server to send a mime type header in this example I made up "text/ pacerscript" and the set up your Browser to use the terminal emulator "Pacerterm" as a helper for this mime type. Just think of the possibilities this opens up for an automated login etc. to help silly users etc., I also did a "text/kqmacro" for running a Keyquencer script to automate a procedure on an unapplescriptable application, the joys of an Intranet over the Internet :-). Do be warned however due to the power of such a concept this capability could open you up to some real nasty possibilities, e.g. an AppleScript that deletes the Hard Drive etc..., it almost rivals all those putrid Microsoft Word Macro Viruses ;-P. INSTALLATION ============ ï Install MacPerl 5.1.4r4 or greater. (Thanx Matthias) ï Get OS8, well strictly not required but get it anyway :-) USAGE ===== 1) Put CGI go.Pacerterm.acgi & pform.pl in your WebServer. 2) Set the Application "Pacerterm" as the helper. 3) Run up the Browser and give it a go. CHANGES ======= V1.0.0 ï Well none really, first cut. CHEERS schaapp@ozemail.com.au - I Only read email once a fortnight, sorry. =cut #!/usr/local/bin/perl ################################################################################ # PROGRAM : go.Pacerterm.acgi # BY : Paul Schaap # DATED : 27/05/97 # PURPOSE : To display the option list for a back end launch ################################################################################ require "pform.pl"; &parse_form_data(*form); $destination = $form{'destlist'}; $the_back = $form{'the_back'}; $phone = $form{'phone'}; open(gsmis, "NETSCAPE -> PACERTERM") || die "Couldnt find file"; printf "Content-type: text/pacerscript\n\n"; while (){ s/destination/$destination/g; s/phone/$phone/g; print $_; } ---------------------------------------------------------------------- ---------- -- Program : NETSCAPE -> PACERTERM -- BY : Paul Schaap -- DATED : 05/01/1998 -- PURPOSE : To bring up and populate Pacerterm from Netscape -- -- MODIFICATION HISTORY --====================== -- ---------------------------------------------------------------------- ---------- Function main put the WindowList into Windows put 1 into counter put the number of items in Windows into NumberOfWindows repeat while (counter <= NumberOfWindows) If item counter of Windows = "HOST.(1)" Then put "true" into FoundWindow exit repeat else put "false" into FoundWindow end if add 1 to counter end repeat -- CHECK WINDOW STATE -- if FoundWindow="true" Then Select Window "HOST.(1)" if the state of window "HOST.(1)" is disconnected then login() end if else NewTerminal ("HOST.") login() end if -- INPUT DETAILS TO BE QUERIED -- transmit "\033OP-" put displayuntil("No data,Selection") into retvar if retvar is "No data" then transmit "\033OP-" end if transmit "*\015" transmit "destination" end main -- ISSUE LOGIN DIALOG FOR DISCONNECTED SESSIONS -- Function login put NewDialog ("Login to HOST","OK","Skip It") into dlg set the Width of dlg to 550 addfield dlg name "Name:" addfield dlg pw "Password:" set helptext of dlg to "Enter your LOGIN and PASSWORD, press OK" set the style of pw to password put dodialog(dlg) into whichButton if whichButton is "OK" then Open Connection displayuntil("login:,Username:") transmit name & return displayuntil("word:") transmit pw & return else exit scripts end if End login