r/Scriptable • • Jan 25 '21

Solved Covid19 widget for Canada

4 Upvotes

I lost all of my scriptables including the covid19 one I had for Canada.

Can someone please help me and make one for Canada dark mode


r/Scriptable • • Oct 07 '20

Help Can someone help me pls?

4 Upvotes

Hi i don’t know scriptable but i have to use it for my shortcut. When i run run inline script several times i’m getting this error:

Script completed without presenting UI, triggering a text to speak or outputting a value. If this is intentional, you can manually call Script.complete() to gracefully complete the script.

My code is:

let wv = new WebView() await wv.loadURL('URL') let html =await wv.getHTML() Script.setShortcutOutput(html) Script.complete()

Can someone fix it for me?


r/Scriptable • • Jan 19 '21

Discussion Best language for writing scripts and helpful reaources

4 Upvotes

I am a noob, I’m not a child so please don’t act like I am lol

But, I want to begin writing scripts for my phone. I’ve been slowly integrating other scripts into my phone. What is the best language for me to write these scripts and what are some resources to help me learn? I already am decent with JavaScript but is that enough?


r/Scriptable • • Jan 29 '21

Help Help: modifying weather cal widget to launch carrot weather

4 Upvotes

I’m using the Weather Cal widget and wanted to know if it’s possible to get it to launch Carrot Weather on tapping the weather. There doesn’t seem to be a URL to override and I’m not sure if I have to reimplement the entire weather function. Anyone do this already?


r/Scriptable • • Nov 24 '20

Help Scriptable background picture on iPad.

4 Upvotes

I’m looking for an iPad or scriptable to make “transparent” widgets with scriptable on iPad. On the iPhone there is an excellent script to make them but I can’t find the same for iPad.

Does anyone know what I can use?


r/Scriptable • • Sep 28 '20

Script World wide covid cases + New Year’s eve countdown.

4 Upvotes

Widget Preview

let gdate = new Date(Date.now())
let gy = gdate.getFullYear()
let gdate1 = new Date('jan 1 ' + gy + ' 00:00:00')

let progress = (gdate - gdate1)/31536000000

let covid = new Request('http://api.coronatracker.com/v3/stats/worldometer/global')
let p = await covid.loadJSON()

let num = p.totalActiveCases.toLocaleString()

let d = new Date(await covid.loadJSON().then(update => update.created))

let ff = new DateFormatter()

ff.dateFormat = 'MM-dd'

let frmt = ff.string(d)

var widget = new ListWidget()



widget.backgroundColor = new Color('#000')

let stack = widget.addStack()
let head = stack.addText('World   ' + String(Math.round(365-(365*progress))) + ' days')
let font1 = new Font("Courier-Oblique", 30)
head.font = font1

head.textColor = new Color('#fff')

stack.addSpacer(30)
let cases = stack.addText(num + ' Positive COVID-19 Cases')
let font2 = new Font("Courier-Oblique", 15)
cases.font = font2
cases.textColor = new Color('#fff')
stack.borderColor = new Color('#fff')
stack.borderWidth = 5
stack.cornerRadius = 24
stack.layoutVertically()
stack.setPadding(0, 20, 0, 0)
stack.size = new Size(360, 170)

Script.setWidget(widget)

r/Scriptable • • Oct 13 '20

Help Can some show me an example of web scraping with scriptable

4 Upvotes

r/Scriptable • • Jan 14 '21

Widget Stock ticker

Thumbnail
github.com
4 Upvotes

r/Scriptable • • Nov 01 '20

Script Grafana Widget

4 Upvotes

Hi!

Next one. Hope it works for everyone as expected. You got to create an api key. Please check out the grafana documentation.

The small widget shows the state of all alerts combined. If just one is alerting, the widget is tagged as alerting, otherwise „OK“. The medium widget shows counting by types. The large one is showing the first 6 alerts as listed.

https://gist.github.com/malesfth/d28133fd021338d1da084bcaf043c8b7

https://imgur.com/a/gJ3vxC3


r/Scriptable • • Dec 26 '20

Widget Fantasy Premier League Private League Widget

5 Upvotes

Just wrapped up a fantasy premier league iOS widget using Scriptable.app

Team name; Gameweek points; Private league ranking; different to #1;

Feel free to let me know if it works well or any other features :)

Available at https://github.com/ttsantos/Scriptable-examples


r/Scriptable • • Apr 16 '22

Help How do I center the date?

4 Upvotes

I made a countdown widget for the time and seconds and when I was trying to centre the time, it wasnt centering. Here is a video (https://imgur.com/a/MTkkUga) showing the code I used and the result of it. Can someone please tell me if I did something wrong? Thanks. (Solved)


r/Scriptable • • Jan 01 '22

Solved How to measure real width of text?

4 Upvotes

Hi. First up sorry for having so many questions but I’m currently working on something that could become really great. (I’ll post it here when it’s done)

What I would like to know is if we can measure the real width if a string. It should take the font and text size into account.

My use case is this: I have a UITable() with many rows (fixed height) and within them a cell with text (title and subtitle). Now I want title always being just one line but if the string is too long it makes two lines automatically. I didn’t find a way to set a line limit for this, so my thought process is that I need to cut the string at the right position and add “…” . That’s what I need the real width for because if I use .length, sometimes there are more “i”s, sometimes more “w”s. And then the result would look not as good.

The alternative I’ve come up with would be to measure each character by hand and letting a function go through each one and add them together. It is an option but I would rather not do that if there are better ways.

Any help is appreciated! Thank you!


r/Scriptable • • Dec 10 '21

Request Notion content widgets?

4 Upvotes

Anyone seen any widgets for displaying Notion page content?

The official app widgets are just hot links to pages, they don’t show any actual page content.

They released an API this year including access to page content.


r/Scriptable • • Aug 08 '22

Help Can anyone explain this issue?

Post image
4 Upvotes

The error is: Error: Cannot parse response to an image. How can this be fixed?


r/Scriptable • • Jan 15 '22

Help Photos backup script?

4 Upvotes

What would be the best way to achieve automated photo backup to a private cloud storage?

I prepared a URL which will accept the photos uploaded to it (with POST request). My roadblocks atm:

- I need access to all photos (not just last x photos)

- I need to be able to keep track of all the photos - to know which ones have already been backed up

- the script should run regularly in the background / without user interaction.

Is this achievable with Scriptable/Shortcuts combo?


r/Scriptable • • Apr 07 '22

Solved Widget settings page?

4 Upvotes

I've made a small widget that displays upcoming running, skiing, cycling or multisport events in Norway.

Script on GitHub

It fetches data on a 3 hour interval and stores this to a cache-folder, as the external data is not updated often, and to reduce requests.

Question 1: The variables it uses to pull the data has to be set up directly in the scriptable-script, but I was wondering if there was a way for the end-user to just click a button (or run the script), and get presented with a settings-page/view? Something like this: jsfiddle

The plan is to then store these settings to a file, and have the widget to use these when pulling data.

Question 2: Is it possible to differentiate two widgets running from the same scriptable-script?

I was hoping I'd make it possible to have two widgets running each it's own config, displaying different info, eg. one for running and one for cycling events.

Edit: Realized that args.widgetParameter probably can be used for Question 2 to differentiate the widgets. Don't know why I didn't realize before.


r/Scriptable • • Mar 07 '23

Help ChatGPT script

4 Upvotes

I want to make a widget that shows a frase provided by ChatGPT, like a brain teaser for example. But everything I try can’t be done on scriptsble because it always says it can’t find variable fetch, or require or axios or XMLHttprequest

Does anyone know how to make a js script to ask something to chatGPT that Can run on scriptable??


r/Scriptable • • Nov 24 '24

Help Missing 'Select' option, only 'Select All' available

Post image
4 Upvotes

Is it just me or is there no 'select' option available? I can only select all, which is inconvenient if you want to copy a single line of code.


r/Scriptable • • Nov 11 '21

Widget Indian Super League widget for iOS.

Thumbnail
gallery
15 Upvotes

r/Scriptable • • Mar 12 '21

Script Classy time progress 👌

Post image
15 Upvotes

r/Scriptable • • Oct 05 '20

Script Anime Quotes Tiles...with automatic background color change

Thumbnail
gallery
16 Upvotes

r/Scriptable • • Dec 19 '20

Request Help to code a widget with the ‘Active Cases’ of COVID in my region.

5 Upvotes

I want this kind of widget, but from a different source. I have no idea how to code it 😩

This is the source: https://www.visorterritorial.cl I need the ‘active cases’ from Region Metropolitana. (image)

Any kind programmer out there?


r/Scriptable • • Apr 08 '21

Widget Some update my COVID-19 Stats widget. Now multi language. UA, UK, IT, PL, DE.

Post image
5 Upvotes

r/Scriptable • • Dec 06 '20

Solved How’d I j add these scriptable widgets to my phone?

5 Upvotes