"Takin the mickey" is making mock of, or making a fool of, either to a person's face or without their knowledge.It's a UK-wide expression not just Scottish, and is sometimes abbreviated to "taking the mick", or even "extracting the Michael..."
Cheers
Steven