scriptable icon indicating copy to clipboard operation
scriptable copied to clipboard

Quotes not showing

Open Beastlynoob opened this issue 4 years ago • 8 comments
trafficstars

Hello, when I set the layout to the motivation one and run the shortcut all I see at the bottom of the screen is the military time in the bottom left. The quote does not seem to appear. I have also enabled it in the script. Everything is working great and i am loving this script but can figure out the quote thing. Any ideas?

Beastlynoob avatar Feb 17 '21 22:02 Beastlynoob

Whenever I do the layout feelMotivated, in shortcuts i get the following error in shortcuts. ( image below). When I run it in scriptable I get the following error (image below. Note that the line it tells me is different since I added code to the custom section to fit my preferences. Any ideas on how to fix?.

Uploading image.png… Uploading image.png…

Beastlynoob avatar Feb 18 '21 06:02 Beastlynoob

Hi @Beastlynoob: I am glad you like the script. Make sure QUOTE_SHOW_QUOTES is set to true.

ajatkj avatar Feb 18 '21 07:02 ajatkj

I have set it to true but it still doesn't work

Beastlynoob avatar Feb 18 '21 15:02 Beastlynoob

I used your default script and made sure to set that to true as well but no luck.

Beastlynoob avatar Feb 18 '21 17:02 Beastlynoob

Can you share a screen shot of error (if you are getting an error) or screen shot of your lock screen?

ajatkj avatar Feb 19 '21 12:02 ajatkj

I used the default code that you provided and I still receive these errors. I set QUOTE_SHOW_QUOTES to true. I have attached pictures.

IMG_9951 IMG_9953

Beastlynoob avatar Feb 19 '21 16:02 Beastlynoob

Thanks for the screenshot. I will check and get back to you.

ajatkj avatar Feb 20 '21 05:02 ajatkj

@ajatkj,

great Script and awesome idea in first place. Did you found the problem, yet?

I discovered the same problem and I was just trying to track the problem down, when I thought I might have a look here first. There is an issue with with source: "quote". key: "quote" and key: "author" work fine, but key: "quoteWithAuthor" ist not working.

quoteWithAutor got set in fetchQuotes as ["You win the victory when you yield to friends.",{"rsize":1,"title":"[Sophocles]"}]

(This is different to what you set as "unknownQuotesData" btw.)

Later on in createOverlay the following error is raised: ReferenceError: Can't find variable: overridePrefix

in Line: imgCanvas = await placeDataElement(imgCanvas, rect, e0, suffix, overridePrefix, prefixColor, align, fontName, color, x,y,w,h, bold);

Also "bold" is not defined in this case.

The problem is, that the element is an array, but the quote-line(s) are no Objects, only the author is. So it goes to the else, where the two variables are not set. After setting them, everything seems to work fine now.

icsAT avatar Dec 22 '21 18:12 icsAT