Macro for AP & trinket

Hi!
i've been looking for a macro that casts arcane power and uses a trinket that is spammable, well at least in the sense that one extra accidental click doesnt dispell AP.
I've been trying with supermacros /in functions etc but to no luck.
Just wondering if someone has any better ideas eg. a script which checks if AP is up in the buffbar and given that return decides if AP should be cast or not, followed by trinket use.
I appriciate any help and i'm sure im not the only one with this issue
Kind regards
P.S here are some supermacro functions i found, not sure if they all work
http://wow.stfu.ca/ADDONS/s/SuperMacro/functions.txt
i've been looking for a macro that casts arcane power and uses a trinket that is spammable, well at least in the sense that one extra accidental click doesnt dispell AP.
I've been trying with supermacros /in functions etc but to no luck.
Just wondering if someone has any better ideas eg. a script which checks if AP is up in the buffbar and given that return decides if AP should be cast or not, followed by trinket use.
I appriciate any help and i'm sure im not the only one with this issue

Kind regards
P.S here are some supermacro functions i found, not sure if they all work
http://wow.stfu.ca/ADDONS/s/SuperMacro/functions.txt