Audio Hijack Pro doesn't stop VLC

I am recording broadcasts with Audio Hijack Pro and VLC 2.0.2.
When recording >1 broadcast VLC doesn’t quit after the first one (“Quit source” is set in AHP) and AHP can’t catch VLC for the second recording.

This problem doesn’t happen with other software like iTunes, RealPlayer, QuickTime et.al.

Neither Rogue Amoeba nor Videolan offered any help.

So I tried an AppleScript to be called from Audio Hijack Pro:

tell application “VLC”
activate
end tell
tell application “VLC” to quit

It didn’t work but by accident I found out that moving the mouse completed the job.
I tried several mouse and key code/ keystroke routines but didn’t succeed.
Could a kind soul help me?
Thank you in advance.

Peter

Model: MacBook Pro 2012
AppleScript: 2.4.3
Browser: Safari 534.57.2
Operating System: Mac OS X (10.7)

Tom -

VLC is tough,-) it didn’t work.
This is most probably a bug in VLC but I have to work around that.
I can quit VLC with “cmd q” but i couldn’t manage to script that with keystroke/code.

Regards

Peter

Model: MacBook Pro 2012
AppleScript: 2.4.3
Browser: Safari 534.57.2
Operating System: Mac OS X (10.7)

Thank you, Tom -

I already tried something similar

I tried several mouse and key code/ keystroke routines but didn’t succeed.

This leaves key code and kill.
As you certainly have realized I’m not a programmer but I try my best,-)

Regards

Peter

Model: MacBook Pro 2012
AppleScript: 2.4.3
Browser: Safari 534.57.2
Operating System: Mac OS X (10.7)

Thank you, Tom -

sorry, it didn’t work.

I wrote:

but by accident I found out that moving the mouse completed the job.

I didn’t manage to move the mouse in AppleScript so I searched and found

http://www.hamsoftengineering.com/assets/MouseTools.zip

and made this script:

tell application “System Events” to set frontmost of process “VLC” to true
tell application “VLC” to quit
do shell script “MouseTools -x 300 -y 300”

It already worked several times with one exception, so I have to observe it for some time.

I would appreciate your opinion.

Regards

Peter