Apple Script Issue from Qlab Cookbook

173 views
Skip to first unread message

Kevin August Landesman

unread,
Jun 19, 2018, 7:00:01 PM6/19/18
to QLab

Hi,

I have been playing around with some of the awesome stuff on Qlab Cookbook which is great. But I ran into a strange issue where some of the apple scripts they provide will not work on one of the Qlab computers at work. This is from the article "Captin Slog" where you can record times into a text file to track the start and end times of your show. There is a calculator function script that will convert seconds into minutes and hours but that fails on the 2014 mac desktop. It works perfectly fine on two other laptops. All are running 10.13.5 and Qlab 4.2.3. The code is below. When run I get an error saying it can't find the length of 0.


If anyone has any insight I would appreciate it.



set mycue to "CALC1"
tell application id "com.figure53.QLab.4" to tell front workspace
try
set thesecs to notes of cue mycue
set theHours to (thesecs div 3600)

set theRemainderSeconds to (thesecs mod 3600) as integer
set theMinutes to (theRemainderSeconds div 60)
set theRemainderSeconds to (theRemainderSeconds mod 60)

if length of (theHours as text) = 1 then
set theHours to "0" & (theHours as text)
end if

if length of (theMinutes as text) = 1 then
set theMinutes to "0" & (theMinutes as text)
end if
if length of (theRemainderSeconds as text) = 1 then
set theRemainderSeconds to "0" & theRemainderSeconds as text
end if
set notes of cue mycue to (theHours & ":" & theMinutes & ":" & theRemainderSeconds)
end try
end tell


Chris Ashworth

unread,
Jun 20, 2018, 1:06:58 PM6/20/18
to Kevin August Landesman, ql...@googlegroups.com
Hi Kevin,

Could you send the full workspace to try?  When I copy/paste this into a fresh workspace and create a memo cue with number “CALC1” I don’t encounter an error.

-C

Chris Ashworth

unread,
Jun 20, 2018, 1:20:33 PM6/20/18
to Kevin August Landesman, ql...@googlegroups.com
Hm, running from 4.2.3 on my 2013 Mac Pro it runs fine. I also tried changing the region to Germany, to get an alternate numerical format, but it worked there too.

Perhaps worth checking your language anyway?

Also generally worth updating to the current version, which is 4.2.4.


On June 20, 2018 at 1:11:16 PM, Kevin August Landesman (kevinla...@gmail.com) wrote:

Here is the full workspace. It works just fine on another computer, the issue is with this one computer. 

Waschfeld, Maik

unread,
Jun 20, 2018, 7:07:11 PM6/20/18
to ql...@googlegroups.com

Hi,

 

Tried it with both QLab 3.2.14 and 4.2.4 on macOS 10.12.6 and 10.13.5, both as “separate process” and not, on a MBPro, a MBAir and the dustbin.

 

It just works on german Macs.

 

 

Regards…

 

…Maik Waschfeld

(from Germany, too)

--
Contact support anytime: sup...@figure53.com
Follow Figure 53 on Twitter: https://twitter.com/Figure53
User Group Code of Conduct: https://figure53.com/help/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/etPan.5b2a8cdd.7f8cacb.5c6%40chris-mac-pro-2.local.
For more options, visit https://groups.google.com/d/optout.

micpool

unread,
Jun 21, 2018, 4:22:47 AM6/21/18
to QLab
I can't break this either, and there are very few things I can't break if I put my mind to it!

However, I don't think your post can be a full account of what you are doing as the code you included couldn't result in any error as it's all inside a try block and would fail silently.


Mic
Reply all
Reply to author
Forward
0 new messages