Bhavin Bhaskaran
Bhavin Bhaskaran

Reputation: 582

Using pstimer to run an event

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?

Upvotes: 2

Views: 1576

Answers (1)

firhang
firhang

Reputation: 254

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.

Upvotes: 1

Related Questions