Title: | -={ H A C K E R S }=- |
Notice: | Write locked - see NOTED::HACKERS |
Moderator: | DIEHRD::MORRIS |
Created: | Thu Feb 20 1986 |
Last Modified: | Mon Aug 03 1992 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 680 |
Total number of notes: | 5456 |
Can someone help me out here? What I want to do is get my prompt to read the current time. I think all I need is that F$get time thing. I know that the prompt can't continuously be updated, as that will take up quite a bit of CPU time, or can it?? advTHANXance -=*>Jason<*=-
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
657.1 | This is a good one | KBOMFG::COLDITZ | Peter Colditz @KBO | Mon Jan 11 1988 02:36 | 41 |
Months again I extracted the following procedure from the Command Procedures notes RDGENG::COMMAND_PROCEDURES. Today I couldn't find the exact entry anymore. Therefore I put the command into this reply. Short but powerful. Peter $! DCL_TIME.COM - DOLAN 00-JAN-85 $! DISPLAYS THE TIME AT THE DCL PROMPT. TYPE "EXIT" TO ABORT THIS. $ $! You don't want to run this when your process is in "BATCH", so $! put this following line at the end of your LOGIN.COM file $! $ IF F$MODE() .EQS. "INTERACTIVE" THEN @DCL_TIME.com $! THIS CAUSES GRIEF TO PARAMETERS WITH QUOTES IN IT. I THINK $! BY USING THREE QUOTES, YOU WILL GET ONE QUOTE. $! $! ALSO, USAGE OF THIS COMMAND PROCEDURE REQUIRES FULL COMMAND $! STRINGS. IE YOU MUST DO A "COPY INPUT OUTPUT". YOU CAN NOT DO A $! "COPY" THEN HAVE IT PROMPT YOU. $! double Also, The INQUIRE prompt contains VT1?? ANSI highliting $! sequences. $ $ ESC[0,8] = 27 $ HON = "''ESC'[1m" $ HOFF = "''ESC'[0m" $ $!<@BOOKMARK@> $ LOOP: $ ON ERROR THEN GOTO LOOP $ ON CONTROL_Y THEN GOTO LOOP $ IF F$LOGICAL("SYS$INPUT") .NES. "SYS$COMMAND" THEN - $DEFINE/NOLOG SYS$INPUT SYS$COMMAND $ $ INQUIRE/NOPUNCTUATION COMMAND - "''HON'''F$EXTRACT( 12, 5, F$TIME())' ''F$DIRECTORY()'''HOFF' " $ $ 'COMMAND' $ GOTO LOOP | |||||
657.2 | Is this the better one? | KIPPIS::SIRO | First Day of Rest of Your Life=today | Sun Jan 11 1987 17:12 | 10 |
Maybe you also want to have a look at DYN_PROMPT written by Jean Calado. It is a macro program which changes time every 5th seconds. I think it uses less recourses than DCL procedure. You can find it by reading METOO::SW_TOOLS_CATALOG entry 729.0; installing kit could be found from 729.1. BTW there are a lot of nice tools for your use without inventing the wheel again... Risto | |||||
657.3 | I have one... | VAXWRK::SWARD | What, It's illegal?!? | Tue Jan 12 1988 20:02 | 9 |
I have a macro program that runs as a detached process and sets my prompt every second. You need CMKRNL or you need the program started from an account with CMKRNL privs. Send me mail and so on... Peter |