Changed macro API and implemented mouse locater