Walter Meester
HoogkarspelPays-Bas
Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Daniel,
Thanks, I'll look into this matter.
Walter,
>Hi Walter
> THank you again for you help.
> I think the cause of the infinite loop problem in your code was the following block:
>
> * Remove space and return characters from the beginning of the command if there.
> nT = nT + 1
> DO WHILE (INLIST(SUBSTR(THIS.Text,nT,1), CHR(13), CHR(10), " ") OR nT < 1)
> nT = nT + 1
> ENDDO
>
> Imagine If I type 'Enter' key as the first command in your command window it will run forever and hang up the computer.
> To fix, I think you can check the number of continuous Entery key (Chr(13)) in DO..ENDDO and exit the loop if 2 Enter
> keys were pressed. Sth like the following:
>
> nT = nT + 1
> DO WHILE (INLIST(SUBSTR(THIS.Text,nT,1), CHR(13), CHR(10), " ") OR nT < 1) AND numberofchar13 < 2
> nT = nT + 1
> IF INLIST(SUBSTR(THIS.Text,nT,1), CHR(13))
> numberofchar13 = numberofchar13 + 1
> ENDIF
> ENDDO
>
> Hope this makes sense.
>
>THanks
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement