I am facing another problem with Messagebox but this time I consider it as a critical problem.
$Inform=MESSAGEBOX("Hi @userid: This message for you ---- Thank you.","Computer_Power_System",4 + 64 + 0 + 4096,90)
SELECT CASE $Inform=6 GOSUB "--------" CASE $Inform=7 GOSUB "-------" CASE $Inform=-1 GOSUB "-------" ENDSELECT
In the previous code I found that user can easily hold the script if he deactivate the message box.
If the user moved the focus from the message box to any other window, following code will not be executed even if the message time (in this case 90 seconds) was over.
Since continues of code execution is very important for me, I have tried to overcome this issue by the following: Before the message box in the main script I add this RUN "Kix32 Activator.Kix"
Where Activator.Kix code are: $X=0 DO $Set=SETFOCUS("Computer_Power_System") sleep 1 $X=$X+1 Until $X=45 EXIT
Although this code did not work 100%, I found it useful in some way.
Without Run the Activator code the inactive message box will stay until you activate it again. with this additional code the inactive message box will disappear but not after the message time is over, it will take more time, some thing like 150 seconds instead of 90.
Any help will be appreciated. Thank you.
|