Thanks for all your help. I have UAC switched off. I've never seen that tray balloon pop up, but then I only managed to execute the script twice so far, and after both instances things got messed up.
I'm starting to think that the problem may have to do with some conflict with my Apple keyboard remapping. For example, I get different behaviour with clipboard related shortcuts depending on the types of shortcut keys I use. Also, when I tried to set up a hotkey for the ArsClip macro and hit Command, which is mapped as Win, it showed up as Win+CTRL. So I suspect a lot more is happening when I press certain keys than I'm able to see.
Anyway, here is my keyboard remapping script, in case anyone might be able to spot the culprit in there:
;---------------------------------
; Apple Keyboard remapping |
;---------------------------------
; Function Keys
+F3::Send {PrintScreen}
+F7:
IfWinExist, ahk_class iTunes
ControlSend, ahk_parent, ^{LEFT} ; < previous
return
+F8::
IfWinExist, ahk_class iTunes
ControlSend, ahk_parent, {SPACE} ; play/pause toggle
return
+F9::
IfWinExist, ahk_class iTunes
ControlSend, ahk_parent, ^{RIGHT} ; > next
return
+F10::Send {Volume_Mute}
+F11::Send {Volume_Down 3}
+F12::Send {Volume_Up}
#Left::SendInput {Home}
#Right::SendInput {End}
#+Left::sendInput +{Home}
#+Right::SendInput +{End}
!Left::SendInput ^{Left}
!Right::SendInput ^{Right}
!+Left::SendInput ^+{Left}
!+Right::SendInput ^+{Right}
^Backspace::SendInput {Del}
; copy, paste, save, select all etc
#c::^c
#x::^x
#v::^v
#s::^s
#a::^a
#z::^z
#b::^b
#i::^i
; Keyboard Characters
^3::Send {Raw}#
^2::Send {Raw}@
^'::Send {Raw}"
I also have this at the top of my main AutoHotkey script (I don't know what it does. I inherited it from someone):
SetTimer,UPDATEDSCRIPT,1000
UPDATEDSCRIPT:
FileGetAttrib,attribs,%A_ScriptFullPath%
IfInString,attribs,A
{
FileSetAttrib,-A,%A_ScriptFullPath%
SplashTextOn,,,Updated script,
Sleep,500
Reload
}
return
#Persistent ; Keep the script running until the user exits it.
#SingleInstance force
#MaxHotkeysPerInterval 200