I've implemented sonething where my application waits for the user to copy a url from somewhere. I set a variable to the _CLIPTEXT value and then run a DO loop until the _CLIPTEXT value changes.
Here's the code so far:
As you can see, I've been trying to get Windows to return control to my application once it detects that _CLIPTEXT has changed. However, none of my efforts have worked so far. I tried a messagebox after the IF..ELSE..ENDIF which also didn't work.
Does anyone have a suggestion?
Thanks,
Stewart
Here's the code so far:
Code:
OriginalCliptext = _CLIPTEXT
MbResponse = MESSAGEBOX("Waiting for you to copy a web page url", Mb_OkCancel+Mb_InfoIcon, "Foundation")
DO WHILE OriginalCliptext = _CLIPTEXT AND MbResponse = MB_RTNOK
WAIT WINDOW TIMEOUT 1 [] && so that there is a pause in processing allowing for the change in _CLIPTEXT to be detected
ENDDO
IF MbResponse = MB_RTNOK
WITH THIS.Parent.edtDetail
.Value = LEFT(.Value, .SelStart) + [<a href='] + _CLIPTEXT + ['>] + _CLIPTEXT + [</a>] + SUBSTR(.Value, IIF(.SelStart>0, .SelStart, 1))
ENDWITH
* ThisWindow = THISFORM.HWnd && _SCREEN.HWnd
* ShowWindow(ThisWindow, 1)
* BringWindowToTop(ThisWindow)
* THISFORM.Show()
ENDIF
As you can see, I've been trying to get Windows to return control to my application once it detects that _CLIPTEXT has changed. However, none of my efforts have worked so far. I tried a messagebox after the IF..ELSE..ENDIF which also didn't work.
Does anyone have a suggestion?
Thanks,
Stewart