Link to home
Start Free TrialLog in
Avatar of LeTay
LeTay

asked on

wait user action in Delphi

I am developping Delphi GUI application
That application process "commands" that come from a "script" (via a for loop)
Some commands request the user to do some "action"
For example, the user has to confirm something : I do this with a "modal" request.
But now, some command requests the user to click on a button on the form.
Only when the user will click on that will the "process" continue its execution.
Another command "asks" the user to drag and drop something on the form
Etc..
What is the easiest way to achieve this ? (events, timer, flags ...)
A sample is welcome...
ASKER CERTIFIED SOLUTION
Avatar of Thommy
Thommy
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LeTay
LeTay

ASKER

More simple than that is difficult !
Many thanks Tommy
Avatar of Geert G
it all depends on how you have setup your script to run

let's assume that you want feedback from the script ... it's progress
and that you want a responsive app
and you want user input via the front-end

you still need to divide the script in 2 divisions
1: all user input is asked before the script starts
2: user input depends on results from inside the script

from all the apps i have written/maintained,
having to use application.processmessages indicates a flaw in design

threads are the best approach to solve this problem
and syncronisation objects to control the flow
ah it was closed already ...