Question

I have a .qtz that loads the last line of the latest .log file, to show the currently played song from a player.

Here is the source, with 2 .log files as an example: LastTrack.zip (read the instructions inside the .zip)

It works, but manually. You need to run it again from the Viewer to get the last played song. If you don´t do that, it always shows the same text, even if in the .log was a new track.

I would like to know if there is a way to make it work automatically (I have tried with LFO and Pulse with no results and making the script outputting some errors).

I have tried unplugging the LFO/Pulse and Enable/Disable by hand continuosly both Command Line Tool patches.

When doing it in "Get lastest .log file" patch, it outputted this error:

An exception was raised:

* -[NSConcreteTask terminationStatus]: task still running

0x85b9bc55: -[QCContext nextExecutionTimeForPatch:time:arguments:] 0x85b9b9fe: -[QCGraphicsContext nextExecutionTimeForPatch:time:arguments:] 0x85b9b7e1: -[QCOpenGLContext nextExecutionTimeForPatch:time:arguments:] 0x0000d5f2 0x85be372d: -[QCView render:arguments:] 0x84ad6c49: -[NSView _drawRect:clip:] 0x84ad58bc: -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] 0x84ad5c26: -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] 0x84ad3f8e: -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 0x84ad4e5a: -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 0x84ad4e5a: -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 0x84ad3ab0: -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 0x84ad0362: -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] 0x84a49b9a: -[NSView displayIfNeeded] 0x84a44a46: _handleWindowNeedsDisplay 0x85471b37: __CFRunLoopDoObservers 0x8544d464: __CFRunLoopRun 0x8544cdbf: CFRunLoopRunSpecific 0x8470591a: RunCurrentEventLoopInMode 0x8470567d: ReceiveNextEventCommon 0x847055d8: BlockUntilNextEventMatchingListInMode 0x84a19e64: _DPSNextEvent 0x84a197a9: -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] 0x849df48b: -[NSApplication run]

When doing it in "Get the last line of the .log file" patch, it outputted this error (i think is the same):

An exception was raised:

* -[NSConcreteTask terminationStatus]: task still running

0x85b9bc55: -[QCContext nextExecutionTimeForPatch:time:arguments:] 0x85b9b9fe: -[QCGraphicsContext nextExecutionTimeForPatch:time:arguments:] 0x85b9b7e1: -[QCOpenGLContext nextExecutionTimeForPatch:time:arguments:] 0x0000d5f2 0x85be372d: -[QCView render:arguments:] 0x84ad6c49: -[NSView _drawRect:clip:] 0x84ad58bc: -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] 0x84ad5c26: -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] 0x84ad3f8e: -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 0x84ad4e5a: -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 0x84ad4e5a: -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 0x84ad3ab0: -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 0x84ad0362: -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] 0x84a49b9a: -[NSView displayIfNeeded] 0x84a44a46: _handleWindowNeedsDisplay 0x85471b37: __CFRunLoopDoObservers 0x8544d464: __CFRunLoopRun 0x8544cdbf: CFRunLoopRunSpecific 0x8470591a: RunCurrentEventLoopInMode 0x8470567d: ReceiveNextEventCommon 0x847055d8: BlockUntilNextEventMatchingListInMode 0x84a19e64: _DPSNextEvent 0x84a197a9: -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] 0x849df48b: -[NSApplication run]

Thank you in advance for your help.

Was it helpful?

Solution

The Command Line Tool patch updates only when its input ports change. So, in your case, you could attach something that changes periodically (the Signal private patch, for example) to an unused input, such as "Standard In".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top