On 3/1/07, Chipp Walters <[EMAIL PROTECTED]> wrote:
Here's what I ended up with..Seems to work fine and I don't see any
increase in processor usage on XP.

Script of btn 1 (the "test" button)

on mouseUp
  answer getThing()
end mouseUp

function getThing
  repeat forever
    wait 100 millisecs with messages
    if there is a file "C:/test.txt" then
      put URL ("file:C:/test.txt") into tResult
      delete file "C:/test.txt"
      beep
      exit repeat
    end if
  end repeat
  return tResult
end getThing

Script of btn 2 (the "stop now" button)

on mouseUp
  put "stop Now" into URL("file:C:/test.txt")
end mouseUp
__________________


I use a similar scheme for inter-application communications, but there
is one check that you might need to insert. If you start reading the
file before it is completely written to, the file exists but it will
be empty. Unless the file can be legitimately empty, then I suggest
you add a check for that to your loop as well.

Cheers,
Sarah
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to