Tim. How can I run the macro time.shm when I start shell? I open shell with a 
DOS batch file shell.bat containing:

i:\dp23\mc shell /nt=0 /u=RIK /d-c:\shell\temp

Sent from my iPhone

Begin forwarded message:

> From: "[email protected]" <[email protected]>
> Date: August 31, 2015 at 3:58:16 PM EDT
> To: Tim Rude <[email protected]>
> Subject: Re: [Dataperf] Macro to exit DP
> 
> This is exactly what I need. Thank you!
> 
> Sent from my iPhone
> 
>> On Aug 31, 2015, at 1:27 PM, Tim Rude <[email protected]> wrote:
>> 
>> Not guaranteed to be perfectly reliable but I've slapped together the 
>> attached Shell 4.0 macro that might work for you.
>> 
>> Essentially, it has to stay running the entire time DP is running to monitor 
>> for keystrokes and pass them through to DP. When it times out, it should 
>> exit from both DP and Shell.
>> 
>> You set the number of seconds for the timeout on the first line of the macro.
>> 
>> It's probably not bulletproof and there's no visible indication that it's 
>> running until the time runs out and everything exits. And if the user 
>> presses Ctrl-Alt-Shift-F1 it will abort the macro and prevent the timeout 
>> from ever happening. It survives a normal F1 but not the super 
>> Ctrl-Alt-Shift-F1.
>> 
>> Test it and tinker with it. Adjust it as you want or need to.
>> 
>> "No deposit, no return."
>> 
>> Tim Rude
>> 
>> PS: In case the attachment gets stripped off, here's the listing of the 
>> macro so that it can be re-entered via Editor:
>> 
>> ========== START LISTING ==========
>> {ASSIGN}TimeOut~30~
>> 
>> {;}TimeOut·is·the·number·of·seconds·to·wait·for·a·keypress·before~
>> {;}giving·up·and·exiting.~
>> 
>> {;}So,·to·wait·one·minute·(approximately),·TimeOut·should·be·set·to·60.~
>> {;}To·wait·5·minutes,·TimeOut·should·be·300.·For·10·minutes·600,·etc.~
>> 
>> {;}Note·that·times·will·not·be·perfectly·exact·but·should·be·close.~
>> 
>> {CANCEL OFF}
>> 
>> {ASSIGN}Timer~0~
>> {ASSIGN}Ticks~{VARIABLE}TimeOut~*18~
>> 
>> {WHILE}{VARIABLE}Timer~<{VARIABLE}Ticks~~
>>   {LOOK}Key~
>>   {IF EXISTS}Key~
>>     {ASSIGN}Timer~0~
>>     {;}Reset·the·timer~
>>     {IF}{KTON}{VARIABLE}Key~~=33023~{ELSE}{VARIABLE}Key~{END IF}
>>     {;}33023·is·the·code·used·when·shell·cannot·recognize/process·keystroke~
>>     {;}properly.·We·ignore·these·keystrokes·to·keep·shell·from·crashing.~
>>     {;}This·isn't·documented·anywhere·-·I·found·it·by·trial·and·error.~
>>   {ELSE}
>>     {ASSIGN}Timer~{VARIABLE}Timer~+1~
>>     {WAIT}1~
>>   {END IF}
>> {END WHILE}
>> 
>> {;}If·we·get·here,·our·timer·has·run·out·and·we·need·to·exit.~
>> 
>> {;}The·following·should·exit·from·both·DP·and·Shell.~
>> 
>> {DISPLAY OFF}
>> {Ctrl-Alt- }
>> {DISPLAY OFF}
>> {F7}4{Enter}
>> {F1}{F1}{F1}{F1}{F1}{F1}{F1}{F1}{F1}{F1}
>> {Esc}{Esc}{Esc}{Esc}{Esc}{Esc}{Esc}{Esc}{Esc}{Esc}
>> {F7}{F7}{F7}{F7}{F7}{F7}{F7}{F7}{F7}{F7}
>> ========== END LISTING ==========
>> 
>>> On 8/31/2015 10:18 AM, Robert Kendall wrote:
>>> Is there a way to use a shell macro to exit DP         after an interval of 
>>> inactivity?
>>> 
>>> Robert Kendall
>>> 
>>> 
>>> _______________________________________________
>>> Dataperf mailing list
>>> [email protected]
>>> http://lists.dataperfect.nl/cgi-bin/mailman/listinfo/dataperf
>> 
>> <TIMER.SHM>
>> _______________________________________________
>> Dataperf mailing list
>> [email protected]
>> http://lists.dataperfect.nl/cgi-bin/mailman/listinfo/dataperf
_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/cgi-bin/mailman/listinfo/dataperf

Reply via email to