isKeyDown and esc
Posted by Stackman317 on Sep 06, 2008; 4:56pm
URL: http://imagej.273.s1.nabble.com/isKeyDown-and-esc-tp3695153.html
Hi all,
So I've been trying to make a simple addition to some looping code so that I have the option to abort the macro at the end of each run, but I've been running into some problems interfacing with running macros. First of all, hitting esc has no effect on a running macro (even a very simple test macro). In addition, ImageJ seems to be having trouble detecting keystrokes in general. For instance, if I write code such as
for (i=1; i<=10; i++) {
wait(1000);
test = isKeyDown("space");
print (test);
if (test>0) {
setKeyDown=("esc");
}
}
it prints a string of 10 0s whether I hold down space or not.
I'm running ImageJ 4.0 64bit on my MacBook Pro running OS 10.5.4
Anyone have experience with problems like this with ImageJ?
Thanks for your help!!