Page 1 of 1

Posted: Tue Jul 24, 2001 3:22 am
by BackupUser
Restored from previous forum. Originally posted by wayne1.

;simple example of getting current tasks, very useful
;expand as needed
;Space() prints string of spaces
;howMany= how many spaces wanted in string
Procedure.s Space(howMany.w)

While i 0
Parent = GetParent_(CurrWnd)
Length = GetWindowTextLength_(CurrWnd)
TaskName$ = Space(Length + 1)
Length = GetWindowText_(CurrWnd, TaskName$, Length + 1)
TaskName$ = Left(TaskName$, Len(TaskName$))
;SetWindowText_(CurrWnd,"Window #"+ str(n))
;n=n+1
If Length 0
;q$=q$+ TaskName$ + Space(15) + str(CurrWnd)+pbCrLf
AddGadgetItem(4, -1, TaskName$ + Space(15) +str(CurrWnd))
EndIf
CurrWnd = GetWindow_(CurrWnd, 2);GW_HWNDNEXT=2
Wend
SetGadgetState(4, 0)
;messagerequester("",q$,0)
Return


Edited by - wayne1 on 16 August 2001 23:54:06