Not exactly a System Window???

Ken Ray kray at sonsothunder.com
Tue Oct 11 15:24:18 EDT 2005


On 10/11/05 12:39 PM, "Todd Geist" <tg.lists at geistinteractive.com> wrote:

> Thanks Again Ken!
> 
> On 10/11/05 10:25 AM, "Ken Ray" <kray at sonsothunder.com> wrote:
> 
>> Well, you could constantly poll for the frontmost application process on OS
>> X using AppleScript, and then set the style of the window to 'system' only
>> when a particular app was in front, and to 'palette' all the other times.
> 
> Will constantly poll have an impact on the performance of the stack?

Not on the stack, but on the overall system, depending on how tight a "loop"
you run. For example, if you can affort to wait a half-second before
bringing your palette up (500ms), you can significantly reduce the impact on
the system.
 
> Does anybody have an example of how to set up "polling"?

Here's a simple one:

on StartPolling
   PollProcesses
end StartPolling

on PollProcesses
  -- do your code for checking the processes, etc.
  send "PollProcesses" to me in 500 milliseconds
end PollProcesses

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list