Hi Tore,
I don't want to belabour the point, but I have looked in the online help and have had no luck finding
KEYBOARD cKeyboardValue [PLAIN] [CLEAR] - Beware To be used only as a last resort.
The issue imho is not whether the KEYBOARD '{LEFTMOUSE}' command should be used in this context, but rather that it has a curious side-effect, which incidentally is not solved by adding the PLAIN clause.
All I'm saying is, that clicking the left mouse button and issuing the command - PLAIN or otherwise - does not produce identical results.
It's minor, but as far as I'm concerned, it does qualify as bug.
BR
Peter
>Hi Peter,
>
>Semantics is not the correct word here, as I see it. The thing is, Sergey showed you the CORRECT way to do the job, KEYBOARD should only be considered as a last resort.
>
>By the way, my guess is that your solution would actually have worked, if you added the PLAIN keyword.
>
>>Hi Sergey,
>>
>>Semantics, semantics... :-)
>>
>>I may be wrong here, though I can't quite see why, but I believe I'm not being unreasonable in expecting the KEYBOARD command to do
exactly the same as pressing the key or mouse, no more - no less.
>>
>>It clearly does not do that.
>>
>>When VFP does not behave as expected, but there is another way to achieve the goal, I'm inclined to call it a workaround.
>>
>>If I had RMFM I wouldn't have had to ask the question in the first place, but that's another issue.
>>
>>As always - Thank's for your help.
>>
>>
>>
>>>Hi Peter,
>>>
>>>
>Great workaround, thank you.>>>
>>>Why would you call it a workaround?
>>>
>>>
>It's still a bug, though, right?>>>
>>>Maybe, I dunno.
>>>
>>>
>>>>>Try
>>>>>This.SelStart = LEN(This.Value)
>>>>>This.SelLength = 0
>>>>>
>>>
Peter Pirker
Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?
(Woody Allen)