Blitz (57/176)

From:David McMinn
Date:13 Jul 2001 at 12:20:06
Subject:Re: Taskname of a window

Hi John

> *wintask.Task = *currwindow\UserPort\mp_SigTask
> taskname.s = Peek.s(*wintask\tc_Node\ln_Name)
>
> Does that look right??

Yeah, but do all the tasks have their names stored in that field? Have
you tried this (will only work for things started from CLI - I can't
remember how to get the task name for WB progs if it's not inthe
task\ln_Name field):

*wintask.Task = *currwindow\UserPort\mp_SigTask
If *wintask\tc_Node\ln_Type = #NT_PROCESS
*pr.Process = *wintask
*cli.CommandLineInterface = *pr\pr_CLI LSL 2
If *cli
If *cli\cli_CommandName
taskname.s = Peek$(*cli\cli_CommandName LSL 2 + 1)
EndIf
Else
; Program started from WB, not sure about task name
EndIf
Else
; Not a process, so it must be a task. I guess just use your method?
If *wintask\tc_Node\ln_Name
taskname.s = Peek$(*wintask\tc_Node\ln_Name)
Else
taskname.s = "NULL name pointer for task!"
EndIf
EndIf
NPrint taskname



|) /\ \/ ][ |) |\/| c |\/| ][ |\| |\| | dave@blitz-2000.co.uk
http://members.nbci.com/david_mcminn | ICQ=16827694
Computer games don't affect kids, I mean if Pac Man affected us as
kids, we'd all be running around in darkened rooms, munching pills and
listening to repetitive music.

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie