External forms are neither EDIT or ENTER. They are initiated using REFF ExternalFormName.
In its' own thread means it won't muck with any other process you are running. A continuous loop burns up processor time at a horendous rate. Never do it. Never do it. Did I say "Never Do It"? I meant to say "Never Do It". ----- Original Message ----- From: "Michael J. Sinclair" <[email protected]> To: "RBASE-L Mailing List" <[email protected]> Sent: Monday, November 07, 2011 6:20 PM Subject: [RBASE-L] - Re: Copying a file to a printer from within a timer Thanks Mike! After I do what you wrote, do I do an EDIT USING formname or ENTER USING formname? You mentioned it runs in its own thread...does that mean it uses less memory than runing a stand alone command file within as a continuous loop? Thank you for your help!! Mike Sinclair ________________________________ From: Mike Byerley <[email protected]> To: RBASE-L Mailing List <[email protected]> Sent: Monday, November 7, 2011 5:59 PM Subject: [RBASE-L] - Re: Copying a file to a printer from within a timer You can use an external form which can run autonomously within the RBase session. Use a Form timer. Use only this code in the Form Timer EEP: SET Var vchkfile = (CHKFILE('c:\main\mike.txt')) IF vchkfile = 1 THEN COPY c:\main\mike.txt \\servername\printername ERASE c:\main\mike.txt ENDIF put the initialization of the variable vChkFile in your onBefore Start EEP: SET Var vchkfile INTEGER Get in the habit of spelling VAR fully. RStyle won't correct it to VAR from just V. I know it's a habit but there might come a time when it is unacceptable and then you would have hoards of V's to find and fix. The form Timer is a low cost gizmo that runs in its own thread (just the same way windows scheduler runs). Set the timer for however many milliseconds you want to check for the file. ----- Original Message ----- From: "Michael J. Sinclair" <[email protected]> To: "RBASE-L Mailing List" <[email protected]> Sent: Monday, November 07, 2011 2:42 PM Subject: [RBASE-L] - Copying a file to a printer from within a timer Hi all, I want to have Rbase check for the presence of a file within a folder, and it if finds any file, I would like Rbase to send that file to the printer and then erase the file from the folder. Here is my code... LABEL start SET V vchkfile = (CHKFILE('c:\main\mike.txt')) IF vchkfile = 1 THEN COPY c:\main\mike.txt \\servername\printername ERASE c:\main\mike.txt ENDIF GOTO start RETURN Here is my question... Do I want to run the above file as a stand alone file, ie a continous loop OR would I be better off trying to use a TIMER EEP within a form? I assume the form would be better because I should be able to "turn off the code" by closing the form. What I don't uderstand is where I need to put the EEP. Would it be a "On Before Start EEP" or a TIMER EEP (what is the difference?) Does it matter if I start the form with EDIT USING formname vs ENTER USING formname? Does the interval specify how often the EEP runs (ie I don't need the LABEL start and GOTO start loop), or does the interval specify the time between the moment the form is started and the time the EEP fires (in which case I assume I would still need the LABEL start and GOTO start to make the code keep checking the folder for files? I am trying to quit using Rbase for DOS (even though I love it), this will get me one step closer! Any help would be great! Mike

