applescript - Cursor disappears in screen recordings after typing into text field using Quartz-based scripts -
i'm seeking clarity on problem encountering while building semi-automated screencasting & video encoding pipeline. solid technique addressing lovely :-)
the problem
the setup: quartz-based + applescript library enacts screencast script triggers screenrecording in application quicktime, interacts website, afterwards exports screenrecording target location.
this pipeline works. 1 exception: mouse cursor disappears in resulting screen recording after using either quartz-based library or applescript type text field. note when watch screencast acted out live, see mouse cursor whole time.
restoring cursor
i have found techniques restore mouse cursor while screencast being enacted:
- manually type after input text box loses focus (doesn't work programmatically)
- switching different application via cmd-tab (works manually , programmatically via applescript)
- launching new application applescript, if comes foreground (the mechanism why works same switching different application)
- doing right-click trigger context menu appear. can done programmatically, , can within same application.
my temporary workaround issue 2 quick cmd-tab commands via applescript after every time script types text. works alright, though leave minor artifacts in resulting screencast.
details of setup & experiments
a few more details technology i'm using here.
- the machine 2013 mbp running yosemite
- i have used 2 independent quartz-based libraries simulating user actions: osxautomation , cliclick, both of exhibit same issue.
- i have used 3 different techniques doing screenrecoding: quicktime, camtasia, , ffmpeg (ffmpeg -f avfoundation -i "1:0" out.avi). these use av foundation under hood, though i'm not sure that.
- i have used safari, firefox, , chrome target browser interactions
any insights might causing problem and/or ideas better workaround appreciated!!
p.s. i'm not familiar of technologies involved, quartz , av foundation, apologies in advance if description fundamentally flawed, or if i've tagged technology doesn't bear @ upon problem.
i use in 1 of cocoa applications hide cursor.
[nscursor sethiddenuntilmousemoves:yes]; you might give try see if unhides cursor setting "no" or maybe toggling first "yes" , "no". maybe other nscursor commands well.
hope helps. luck.
Comments
Post a Comment