Hi Alan,
In your scrip task, you can use a 'special' variable called execution which gives you access to the engine API. Hence you could call execution.getVariable("name") to get the value of a process variable or execution.setVariable(name, value) to set a process variable. From the execution object you should be able to lookup the process instance id etc.
Im a bit puzzled what you meant by fields as I would normally associate fields with a form associated with a user task. hence do you mean you want to set process variables in a script task prior to displaying in a user task?
regards
Rob