Many thanks Dave
Paul
Dave Crozier wrote:
> Paul,
> Use this to see if Notepad is running
>
> Dave Crozier
>
> *******************
> * Start of Code
> *
> ? IsRunning("Notepad")
>
> Function IsRunning
> Lparameter pctitle
>
> Declare INTEGER GetActiveWindow IN Win32API
> Declare INTEGER GetWindow IN Win32API;
> INTEGER hwnd, INTEGER dflag
> Declare INTEGER GetWindowText IN Win32API ;
> INTEGER hwnd, STRING @lptstr, INTEGER cbmax
> Declare INTEGER CloseWindow IN Win32API;
> INTEGER hwnd
> Declare INTEGER DestroyWindow IN Win32API;
> INTEGER hwnd
> Local lnhwnd, lnnext, lldone, lctitle_bar, lcsearchfor,;
> lntext_len
> lcsearchfor = UPPER(ALLTRIM(pctitle))
> lnhwnd = GetActiveWindow()
> lnnext = 2
> lctitle_bar = ""
> Do WHILE lnhwnd # 0
> If type('lnhwnd') # 'N'
> Loop
> Endif
>
> lctitle_bar = SPACE(200) + CHR(0)
> lntext_len = GetWindowText(lnhwnd, @lctitle_bar, 200)
> lctitle_bar = UPPER(LEFT(lctitle_bar, lntext_len))
> lldone = (lcsearchfor $ lctitle_bar)
> lp=lnhwnd
> lnhwnd = iif(lldone, 0, GetWindow(lnhwnd, lnnext))
> Enddo
> Return lldone
> *
> * End of Code
> ************
>
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.