February 20, 200421 yr I have a upcoming project in where I would need to show an image for maybe a few milleseconds and then the user would click a stop button. I was wondering if milleseconds were in FileMaker's capability? If not, is there any plugin for this, maybe someone can point me in the right direction? Thanks. Justin Grewe
February 20, 200421 yr I'm not sure how accurate you want it, but you might try something akin to the old fasioned (pre- "every computer has a clock" method): Set gTimer = 0 loop set gTimer = gTimer + 1 exit loop if gTimer > 5 pause/reume script [00:00:00] end loop Experiment with different numbers to get the duration you want. button clicks should be processed at the Pause/resume script step so you can halt the script and run another. Jeff ps - I know this answers a 3-month-old question -- but I always get annoyed at dead-end message-board and newsgroup searches that turn up questions and no potential answers.
February 21, 200421 yr Author I don't think this is solution. I am needing a reaction time button to where this method would work I think but there needs to be more. Also, for milleseconds, when it is setting the field, I have set the gtimer + .001, that doesn't improve the situation, does it? I mean it still takes the same time to set the field + .001 then it does to set it + 1.00 right? How can I do this if this is possible, and also, is there a way of dealing with repeating fields to where, the user clicks on the button, then clicks it again when they see an object, thus the difference is put into the next repeating field and that field keeps a log of the users performence. I probably need the object to start the script then the user clicks the button when they see the object, thus stopping the script. Thanks for any help on this subject as I know it is a difficult one. Justin Grewe
February 22, 200421 yr Hi Justin FileMaker isn't really the right tool for that kind of job. REALBasic might be a more appropriate tool. Ian
February 22, 200421 yr Author Ian, I know that REALBasic would be a more practicable solution for this sort of job, but I need to know if it is possible with FileMaker. I have a plugin that enables milliseconds with FileMaker but now I just need to integrate the object lauching the script. I think it is possible. Thanks. Justin Grewe
February 23, 200421 yr You might be able to find a plugin somewhere that gives you system clock time accurate to a few milliseconds, but you would still have to deal with the signifcant time delays in executing script steps.
February 23, 200421 yr Justin, to illustrate what Bob is talking about set up the script below using globals. Set Field [ timecntst, Seconds(Status(CurrentTime)) ] Set Field [ cntr, "" ] Loop Set Field [ cntr, cntr + 1 ] Exit Loop If [ Seconds(Status(CurrentTime)) ? timecntst + 1 ] End Loop Set Field [ timecntstp, Seconds(Status(CurrentTime)) ] Now you would think that the number returned in cntr would be pretty consistant, that is if you think your computers whole world stops to run this script....in fact there are many interupts that take precident over the filemaker script. So you cannot predict how long it will take your commands to get to the plugin to start and stop your timer or access the system clock. Rod
February 23, 200421 yr Author True, but the same thing would hold true for REALBasic too, as well as other programs out there that do this same thing. How do you account for such losses? Justin Grewe
February 23, 200421 yr Yes, it's not just Filemaker; it's an operation system issue. With preemptive multitasking as in OSX and Windows, this is pretty much impossible to do. You could probably do it in OS8/9 or old versions of Windows/DOS. To do this with any kind of real accuracy on a modern computer, you need to be running a real time operating system such as QNX.
February 25, 200421 yr >I have a upcoming project in where I would need to show an image for maybe a few milleseconds and then the user would click a stop button. Quite unusual for a database application, isn't it? Also, if the image is displayed for less than 20 milliseconds probably it won't appear in its whole size on the screen due to screen refresh issues. Also I can't figure out how a user could see an image and click a button in few milliseconds. Anyway, with lower level languages (probably with realbasic too), you can take advantage of system routines that let you perform operations at given time with great precision (less than milliseconds). In os 8/9 there was the TimeManager, I don't know in osX. Going back to filemaker, the smalles time it deals with is 1 second, with Pause/Resume script step. The loop workaround doesn't give neither precise or constant duration. Good luck
February 27, 200421 yr Author Paolo, The database application would not be that unusual. Berea College has a system already, although at the moment I do not know the details of it, that tests a users vision. My supervisor asked me to explore if this was possible in FileMaker. I have found a milliseconds plugin for FileMaker, oAzium Date & Time and it works fine. Just as BobWeaver said, I would have problems with certain operating systems. The issue is not displaying an image for a certain time, but to display an image, calculate the exact time that it was launched, then the user clicks the button, and the diffrence that they clicked the button will be calculated within milleseconds. So with the system routines that you were talking about for os 8/9, would this work for a windows system? Justin Grewe
March 1, 200421 yr >display an image, calculate the exact time that it was launched, then the user clicks the button, >and the diffrence that they clicked the button will be calculated within milleseconds. ok, now I understand. I haven't tried anything like that on FM, however I don't think you can do that in filemaker (and have precise results). The time needed to perform script steps is not trascurable. Also when the user click a button the script is performed only on mouse-Up, not on mouse-Down. I suppose you want to measure time from image display to mouse-down. You need an external application to do the image display+time measurement task. The app would then export data into a file that is then imported in filemaker. In system 8/9 this shouldn't involve many problems (I can say that because I wrote in the past C application in system 8). It is possible in osx or win too but I don't know how complex it could be. The problem is ensuring that background operations doesn't inferfere with the measurement.
Create an account or sign in to comment