2

I want to execute a function or a procedure or a block in regular intervals of 60seconds. Do i have to use PS timer for that? let this be my block

MyString = myEditor.Screen-Value.
Message MyString.

//myEditor is my Editor widget in the frame. //My String is a string which i will use to display

I want to repeat this in each 60 seconds.. So that everytime it should display whatever I typed inside the editor.? How can I do this with using PSTimer or without using it?

Bhavin Bhaskaran
  • 572
  • 5
  • 17
  • 41

1 Answers1

1

You must generate a Tick trigger block. In this block can you write your code. PSTimer has a property "Interval", which means interval for Tick event in miliseconds. It has also other property "Enabled", witch starts and stopts timer. When you run some longer code from your Tick event, schould be better switch that property "Enabled" on FALSE and on end of the trigger over on TRUE. Otherwise you can become a conflict with your code and new Tick event resp. your program will making never other, only showing runing your trigger script.

firhang
  • 244
  • 2
  • 11
  • If this is procedural code, I'm afraid you're out of luck and this answer is the correct option. I guess it would be possible to have, in an OO construction, something happen every time 60 seconds have passed. But due to Progress's WAIT-FOR nature, in which it sits basically waiting for events to fire, you won't be able to check time and again. You could fire that check for the last update every time anything at all fires, but I guess what would be bad code. So go with this, and you'll achieve the result you want. PSTimer is still Progress code, so no worries about legacy "foreign". – bupereira Jul 31 '17 at 18:12