Drive a 'random' event?

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

paulemasters

Drive a 'random' event?

Post by paulemasters »

Hello:

PC W7 64 bit CS3

I come from a linear programming background. While I 'understand' event driven programming, I do not 'know' like I know linear.

I gather that the UI processing is event driven. That is, when an entry is made (text keyed, button clicked, etc.) an event happens and code can be run at that time. (onClick, EventListner, etc.)

Is there a reasonable way to 'create' my own event? That is, something that doesn't take a lot of computer time. That is, something that doesn't happen for every key press.

What I would like to do, wth out putting an EventListner on every button and text entry field is to check to see if all items are entered/selected/correct and add an error message if not. If all is OK, enable a button, if not disable it. Perhaps every x seconds?

In linear programing I would have a loop that checked all the fields each time the code was gone through. But with events, that's not possible.

Hopefully I have made what I want to do somewhat clear.

Thanks for any help.

Paul Masters