|
[WD55] batchprocess : HowTo update screen |
Iniciado por Peter van Vuuren, 15,ene. 2004 13:55 - 2 respuestas |
| |
| | | |
|
| |
Publicado el 15,enero 2004 - 13:55 |
Hi, I have a batchprocess, quite simple but can be long. In short : *** sTxt=fReadline(x) while sTxt<>EOT Control = sTxt{{to 10}} //show something on screen Multitask() DoUpdateFiles() sTxt=fReadline(x) END *** It's working, but the 'Control Update' and the Multitask() uses a lot of time. So I was thinking to let the user decide if (s)he wants to see where the program is or if speed is more important. So: *** sTxt=fReadline(x) gbDisplay = false while sTxt<>EOT //to let the user 'click a button or checkbox, while processing CallDLL32("user32","UpdateWindow",handle()) if calldll32("user32","GetInputState") then multitask(-1) END if gbDisplay then Control = sTxt{{to 10}} //show something on screen Multitask() end DoUpdateFiles() sTxt=fReadline(x) END *** In the beginning it's working, but after a while, when 'gbDisplay' is false (so more speed in processing), then the program is 'not responding', while in fact is still working. But the user can not do anything anymore (can not put the 'gbDisplay' to true by clicking a button) while the process is running. Question: Does somebody have an idea how to acclompish that an enduser can change the "Display_YES - Display_NO" switch, while process is running, without having the problems i mentioned. TIA, Peter |
| |
| |
| | | |
|
| | |
| |
Publicado el 16,enero 2004 - 09:29 |
use: multitask(-1) it will hurry things up
"Peter van Vuuren" <[petervu@xs4all.nl> escribió en el mensaje news:40067fa4@news....
Hi, I have a batchprocess, quite simple but can be long. In short : *** sTxt=fReadline(x) while sTxt<>EOT Control = sTxt{{to 10}} //show something on screen Multitask() DoUpdateFiles() sTxt=fReadline(x) END *** It's working, but the 'Control Update' and the Multitask() uses a lot of time. So I was thinking to let the user decide if (s)he wants to see where the program is or if speed is more important. So: *** sTxt=fReadline(x) gbDisplay = false while sTxt<>EOT //to let the user 'click a button or checkbox, while processing CallDLL32("user32","UpdateWindow",handle()) if calldll32("user32","GetInputState") then multitask(-1) END if gbDisplay then Control = sTxt{{to 10}} //show something on screen Multitask() end DoUpdateFiles() sTxt=fReadline(x) END *** In the beginning it's working, but after a while, when 'gbDisplay' is
false > (so more speed in processing), then the program is 'not responding', while in
fact is still working. But the user can not do anything anymore (can not put > the 'gbDisplay' to true by clicking a button) while the process is running.
Question: Does somebody have an idea how to acclompish that an enduser can change the "Display_YES - Display_NO" switch, while process is running, without having the problems i mentioned. TIA, Peter
|
| |
| |
| | | |
|
| | |
| |
Publicado el 16,enero 2004 - 09:31 |
Try add a line of code as below: if gbDisplay then gbDisplay = false //Toggle off Control = sTxt{{to 10}} //show something on screen Multitask() end
// Regs, King
Peter van Vuuren <[petervu@xs4all.nl> wrote:
Hi, I have a batchprocess, quite simple but can be long. In short : *** sTxt=fReadline(x) while sTxt<>EOT Control = sTxt{{to 10}} //show something on screen Multitask() DoUpdateFiles() sTxt=fReadline(x) END *** It's working, but the 'Control Update' and the Multitask() uses a lot of time. So I was thinking to let the user decide if (s)he wants to see where the program is or if speed is more important. So: *** sTxt=fReadline(x) gbDisplay = false while sTxt<>EOT //to let the user 'click a button or checkbox, while processing CallDLL32("user32","UpdateWindow",handle()) if calldll32("user32","GetInputState") then multitask(-1) END if gbDisplay then Control = sTxt{{to 10}} //show something on screen Multitask() end DoUpdateFiles() sTxt=fReadline(x) END *** In the beginning it's working, but after a while, when 'gbDisplay' is false
>(so more speed in processing), then the program is 'not responding', while in
fact is still working. But the user can not do anything anymore (can not put
the 'gbDisplay' to true by clicking a button) while the process is running. Question: Does somebody have an idea how to acclompish that an enduser can change
the "Display_YES - Display_NO" switch, while process is running, without having the problems i mentioned. TIA, Peter
|
| |
| |
| | | |
|
| | | | |
| | |
|