|
|||
|
Hello
I need to allow the program to idle while in a loop to allow another screen within the executable to be switched to. DO WHILE TRUE // some code including the exit // wait state allowing control ENDDO If certain conditions are triggered I need to stall this loop and go to another screen in the same application and do something there. ApplicationExec(EXECWHILEEVENT) and Sleep() both don't work in this instance. Any ideas please? |
|
|
||||
|
||||
|
|
|
|||
|
Martin,
Have you considered when the condition is true and you need to start another window to do it modally? Regards, Willie "Martin" wrote in message news:H8ynq.2787$Bc7.1793@newsfe20.ams2... Hello I need to allow the program to idle while in a loop to allow another screen within the executable to be switched to. DO WHILE TRUE // some code including the exit // wait state allowing control ENDDO If certain conditions are triggered I need to stall this loop and go to another screen in the same application and do something there. ApplicationExec(EXECWHILEEVENT) and Sleep() both don't work in this instance. Any ideas please? |
|
|||
|
The other task will not be a modal window, but will be another open
window in the application. I am looking at a quick fix to a fatal embrace locking situation in a number of places, quite a big rewrite on a saving routine to avoid it. This is not a permanent fix, the rewrite is, this is just so the user can change window and exit it while waiting for a lock. Happens occasionally at 2 sites or so, but I may want the switchable lock wait code for other uses. On 19/10/2011 13:50, Willie Moore wrote: > Martin, > > Have you considered when the condition is true and you need to start > another window to do it modally? > > Regards, > Willie > > "Martin" wrote in message news:H8ynq.2787$Bc7.1793@newsfe20.ams2... > > Hello > > I need to allow the program to idle while in a loop to allow another > screen within the executable to be switched to. > > DO WHILE TRUE > // some code including the exit > > // wait state allowing control > ENDDO > > If certain conditions are triggered I need to stall this loop and go to > another screen in the same application and do something there. > > ApplicationExec(EXECWHILEEVENT) and Sleep() both don't work in this > instance. > > Any ideas please? |
|
|||
|
Dear Martin:
On Oct 19, 4:04*am, Martin <s...@spam.spam> wrote: > Hello > > I need to allow the program to idle while in a > loop to allow another screen within the executable > to be switched to. > > DO WHILE TRUE > // some code including the exit > > // wait state allowing control > ENDDO > > If certain conditions are triggered I need to > stall this loop and go to another screen in > the same application and do something there. > > ApplicationExec(EXECWHILEEVENT) and Sleep() > both don't work in this instance. > > Any ideas please? How about DO WHILE inkey(0.1) = 0 ENDDO .... with your choice of redirector based on keystroke? David A. Smith |
|
|||
|
Martin
Is this program controlled or user controlled?? If user then it's really out of your control as windows will set focus to whatever window/control is clicked. I program control then in your loop if condition_tested_for_is_true // Abort what I'm doing in this loop // Set focus to the other window // Do whatever on that window and return here once it's done and // hope like hell that the user didn't do something to these windows // before I get back here endif How do you know that 'other' window will even be open?? Will/can it be minimised?? Do you expect to pass data into the 'other' window?? Why can't you have the current window do whatever it is you want done?? CYA Steve |
|
|||
|
See my reply to Willie
It is so control can pass to another window in the application while processing pauses in another. On 19/10/2011 15:07, Stephen Quinn wrote: > Martin > > Is this program controlled or user controlled?? > > If user then it's really out of your control as windows will set focus to > whatever window/control is clicked. > I program control then in your loop > if condition_tested_for_is_true > // Abort what I'm doing in this loop > // Set focus to the other window > // Do whatever on that window and return here once it's done and > // hope like hell that the user didn't do something to these windows > // before I get back here > endif > > How do you know that 'other' window will even be open?? > Will/can it be minimised?? > Do you expect to pass data into the 'other' window?? > > Why can't you have the current window do whatever it is you want done?? > > CYA > Steve > > |
|
|||
|
Martin,
DoEvents() in your loop designed for this purpose. Basically it allows multi-tasking while other events are working. Jamal "Martin" wrote in message news:QwBnq.35$1Y4.2@newsfe18.ams2... See my reply to Willie It is so control can pass to another window in the application while processing pauses in another. On 19/10/2011 15:07, Stephen Quinn wrote: > Martin > > Is this program controlled or user controlled?? > > If user then it's really out of your control as windows will set focus to > whatever window/control is clicked. > I program control then in your loop > if condition_tested_for_is_true > // Abort what I'm doing in this loop > // Set focus to the other window > // Do whatever on that window and return here once it's done and > // hope like hell that the user didn't do something to these > windows > // before I get back here > endif > > How do you know that 'other' window will even be open?? > Will/can it be minimised?? > Do you expect to pass data into the 'other' window?? > > Why can't you have the current window do whatever it is you want done?? > > CYA > Steve > > |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|