Year 11 assessment help lazarus / 21-General ---------------------------------------------------------------------- XIX_NAPALMER · 2021-03-11 07:02 Hi all, Got an assessment due on the 16th of March and was wondering if anyone could help me code it in pascal. Aim is to create a reaction time test with multiple runs, also a scoreboard. For example https://humanbenchmark.com/tests/reactiontime Any sort of help with this would  be very much appreciated. ---------------------------------------------------------------------- MarkMLl · 2021-03-11 07:29 Yes, people will help. But it would be considered good form- both by the people here and by your lecturer who is probably reading this- if you roughed something out yourself first. Also please let us know what OS you're running etc. MarkMLl ---------------------------------------------------------------------- XIX_NAPALMER · 2021-03-11 09:35 Yeah good point. I've got some things roughed out so far as in I know how to make it grab time, using sysutils and such, just not sure how to get it to use screen elements and detect when you click and how long after a blip. I have spoken quite a bit with my lecturer about the nature of this and he's given me some pointers but due to it being a formal assessment task he is not allowed to help us all that much. ---------------------------------------------------------------------- trev · 2021-03-11 09:49 You still haven't told us what Operating System you are using which Mark asked above. You also need to explain what your program does so far and what you envision it doing. As for detecting the time between a blip (whatever that is: sound? visual?) and a mouse click, a TTimer component as described with example at that link would be a useful avenue to pursue. ---------------------------------------------------------------------- ASBzone · 2021-03-11 16:03 Quote from: XIX_NAPALMER on March 11, 2021, 10:35:53 amI have spoken quite a bit with my lecturer about the nature of this and he's given me some pointers but due to it being a formal assessment task he is not allowed to help us all that much. This will apply to others as well.  You will be best served by providing as much detail as possible (code always helps) and then folks will almost certainly provide some assistance and suggestions. ---------------------------------------------------------------------- MarkMLl · 2021-03-11 16:22 Quote from: XIX_NAPALMER on March 11, 2021, 10:35:53 amI've got some things roughed out so far as in I know how to make it grab time, using sysutils and such, just not sure how to get it to use screen elements and detect when you click and how long after a blip. I have spoken quite a bit with my lecturer about the nature of this and he's given me some pointers but due to it being a formal assessment task he is not allowed to help us all that much. Things to be considered: you mention "screen elements" and "click" which implies Lazarus, but we REALLY need to know more about your target environment. For precise timing you should be able to use something like https://sourceforge.net/projects/lazarus- ccr/files/EpikTimer/ (watch out for wrong link on that page) or most OSes make a precise time-of-day clock available (in the case of Linux, of the order of a uSec). Finally, how are you acquiring input? If you're collecting it via USB you'll need to allow for finite latency and that this might be non- deterministic. MarkMLl ---------------------------------------------------------------------- Bart · 2021-03-11 17:03 Show us the code you have so far. Then we can help. We're simply not going to write it for you. Bart ---------------------------------------------------------------------- cdbc · 2021-03-11 17:34 Hi Just to get you going with 'Clicking', consider this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.Button1Click(Sender: TObject);begin// do your stuff here... :-Pend;  HTH Regards Benny