Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AUTOMATIC DAILY PRINTOUT

Status
Not open for further replies.

darlek

Technical User
May 9, 2001
27
GB
I need one of my forms to automatically print out at 9 a.m. everyday.The computer and printer are on permanently.
help needed for code and where to place code.
THANK YOU
 
You could move your code to a script, then have any scheduler kick off paradox with the appropriate command line options eg.
"c:\program files\borland\paradox\pdxwin32.exe -w workingdir scriptname.ssl"

If you need to retain the existing form for interactive use, your script can open the form and push whatever buttons are necessary, otherwise you can move all the code to the script.
HTH,
Richie


 
Thanks
i have not done any programming with scripts, please could you give me a bit more info.
I can program into the main "main menu Form " on my paradox application which is open at all times, i was thinking of putting a time field on the form then a timer to trigger at 9am to push the form button on the form i want to print.
You mentioned a scheduler is this a windows prog or can you make one in paradox .
regards.
 
Scripts are just like forms without a user interface. The main method is called run and just runs as soon as the script is called.

If your form is constantly running then its easier. You can put a timer in the open method of the form:
self.setTimer(60000, true)
this would run the timer event every minute. In the forms timer event add the code to push the button.
if hour(time()) = 9 and minute(time()) = 0 then
buttonname.pushbutton()
endif

HTH,
Richie





 
Thanks
I have tried this out and the result is just what i needed.
regards
paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top