They came in their hundreds, pouring into the great Post Office tent at the Edinburgh Book Festival in Charlotte Square. From the Borders, from Midlothian and from the capital itself - a mass of primary 5s-7s eager to see the children's author of the Nineties, JK Rowling.
Why were they so keen to meet the creator of Harry Potter, the young pupil at Hogwarts School of Witchcraft and Wizardry? All became clear as she read from the latest book, Harry Potter and the Prisoner of Azkaban, of the strangest looking classroom anyone ever saw and the professor of divination seeing Harry's doom in the tea leaves: "My poor dear boy I no it is kinder not to say - no, don't ask me ..." Rowling ended with a cackle and a grin.
Then she invited questions: "You in the white, with the Weasleyish hair." Four hundred faces turned to see who looked like Ron Weasley, Harry Potter's best friend - a small boy with wavy red hair.
"You over there, the girl doing what Hermione always does." They swivelled around to see the enthusiastic pupil jumping up and down, trying to catch the former teacher's attention.
"The boy in the blue top with Harry Potterish glasses."
Easy and friendly, she worked her magic around the marquee, turning the sea of anonymous faces into characters that captured the audience's imagination. At first only a few dared put their hands up, then it was 30, 40, 50, till at the end of the hour some were standing on their chairs waving both hands in the air and whistling their applause.
She told them where she gets her ideas and how she thinks up the characters and names. And there were revelations about what lies ahead. Hermione gets her first date in book four, and Harry's dreadful cousin Dudley gets put on a diet when he finally becomes "wider than he is tall".
"I already know the plots. I know exactly what Harry's going to do next - I know who's going to die. I've got to kill a few of them. If you're writing about evil, as I am, you've got to show how evil killing someone is."
The event was a sell-out, as was the rest of the schools programme, with writers of classroom classics such as Mairi Hedderwick, Gillian Cross and Joan Lingard. Eighty-two schools came this year. One Edinburgh primary paid more than pound;300 to attend several events. Tweedbank primary in Galashiels travelled more than an hour in the first week of term to bring 41 children from P56 and P7. Now it plans to come every year.
"We're looking at reading and writing as part of our staff development, and we can build this in," said Christine Johnson, the P56 class teacher with them.
Hopefield primary from Bonnyrigg in Midlothian was there with 32 P7s. "Hearing the author is particularly good for children who enjoy writing," said their class teacher, Rhona McLaren. "It's good for their writing skills."
The advice from top writers and illustrators can be outstanding. Anne Fine, the author of Mrs Doubtfire, said that when she gets stuck writing, it's "usually because I'm starting it off wrong, or I'm in the wrong voice". Diary of a Killer Cat was "quite a flat little story till I realised it was the cat who should be telling the story, so it got a voice," she said. "OK, OK, so hang me. I killed the bird ..." she read in a gangster drawl.
When you get stuck, think of starting earlier in the story, or later, or in the middle, or change the storyteller, she suggested. But she emphasised:
"Read, read, read is the best practice for writing."
The star illustrator was Quentin Blake, the new children's laureate, whose characters sprang to life with the help of a felt-tip pen and an overhead projector, while he described working with Roald Dahl on the image of the BFG with his giant ears and Norwegian sandals, or Mr Twit's beard "like a lavatory brush".
"The most important first job is reading - like the reader - for story, characters in it, and any opportunity you can find to enhance the story and make it more vivid.
"I do rough drawings very, very quickly to get down ideas before I forget them. You get your spontaneous reactions down; it's what you felt.
"Then you think what the characters in a book are like. For example, for a Dahl book I did a set of drawings, a good moment like lifting a boy up by the ear, and I would take them to show him. Then we'd talk about them.
"With picture books, it's different. Instead of manuscripts of 150 pages, perhaps you get four pages of typing, as in Russell Hoban's How Tom Beat Captain Najork and his Hired Men. These can be concise texts but with plenty to draw."
There was also a session on how to become a children's writer. Read right across the age range, suggested author Frank Rodgers, and find your niche. Go and look at the returns on the public library trolleys, said librarian-turned-writer Theresa Breslin, and see what children are actually reading.
There was some debate about writers going into schools. Fine has stopped doing it because it is so time consuming, Rodgers says there is too much pressure to do it, Rowling loves it and Breslin insists it makes a tremendous difference to children: "After visits, library issue figures rise. After meeting authors, children can hear their voice when reading books." Gill Evans, of Egmont Books, believed it was "a magical hook" for children.
Certainly, that was how it came across in Edinburgh, judging by the queues of children waiting for Rowling's autograph, a couple of girls discussing Fine's books in the cafe and one young boy absorbed in a copy of Where's Wally? purchased in the children's book tent.