ajatkj / scriptable

Scriptable scripts for iOS
308 stars 62 forks source link

Quotes not showing #13

Open Beastlynoob opened 3 years ago

Beastlynoob commented 3 years ago

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 commented 3 years ago

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…]()

ajatkj commented 3 years ago

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

Beastlynoob commented 3 years ago

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

Beastlynoob commented 3 years ago

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

ajatkj commented 3 years ago

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

Beastlynoob commented 3 years ago

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

ajatkj commented 3 years ago

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

icsAT commented 2 years ago

@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.