warlock pet macro
Macros can't interact with the world like that.
to expand on this completely correct answer, macros can do that cast part but not the click part. Blizzard clearly doesn't want this happening, since they have fixed a number of workaround for it in the past (through minimap code hacks and other means).
Please report any Code of Conduct violations, including:
Threats of violence. We take these seriously and will alert the proper authorities.
Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.
Harassing or discriminatory language. This will not be tolerated.