ACTIVATE WINDOW Form
(or somtehing similar) to make sure the form designer has focus, then put a KEYBOARD '{Ctrl+W}'. If it doesn't work, searc for it to get the exact syntax, I know I've psoted this before.******************************************************************** * Description.......: SearchScxM - searches all SCX files for SearchString in MethodToSearch * Calling Samples...: * Parameter List....: pcSearchString, pcMethodToSearch * Created by........: Mike Helland * Modified by.......: Nadya Nosonovsky 10/18/2000 03:01:23 PM ******************************************************************** lparameters pcSearchString, pcMethodToSearch if vartype(pcSearchString)<>'C' pcSearchString=upper("SetFocus") else pcSearchString=upper(pcSearchString) endif if vartype(pcMethodToSearch)<>'C' pcMethodToSearch=upper("Init") else pcMethodToSearch=upper(pcMethodToSearch) endif =GetAllFiles1('\redp\appl','scx') && Creates cursor filesADIR of all scx files local lcTextString #define CRLF chr(13)+chr(10) lcTextString = '' select FilesAdir && cursor with all scx files on error suspend scan if not file(forceext(cFileName,'sct')) or 'backup'$lower(cFileName) or 'old'$lower(cFileName) && Memo file is not there or backup form && Skip this form else modify form (alltrim(cfilename)) nowait =aSelObj(aA, 1) llFlag=.f. llFlag=(atc(pcSearchString, aA[1].ReadMethod(pcMethodToSearch))>0) ? llFlag if llFlag && Found lcTextString = lcTextString + FilesAdir.cFileName+ ': ' +pcSearchString + CRLF + ; ' found in '+pcMethodToSearch + CRLF + CRLF endif *!* activate window 'form' && Make this window active *!* keyboard '{ctrl+w}' && Close it release window 'form' * messagebox( cfilename ) replace flag with llFlag endif * select FilesAdir && safety meassure endscan && each app dir if len(lcTextString) > 0 =strtofile(lcTextString,'Result.TXT') modi file 'Result.TXT' endif