r/Scriptable • u/roflrolle • Mar 28 '23
Help Request: Binary watch
Does someon have a scriptable script to display a binary watch? Like the style of many binary watches put wasn’t really able to build one. Thanks und advance
r/Scriptable • u/roflrolle • Mar 28 '23
Does someon have a scriptable script to display a binary watch? Like the style of many binary watches put wasn’t really able to build one. Thanks und advance
r/Scriptable • u/smitchen0 • Mar 28 '23
I want to have an automation that slowly dims the brightness of my lights. I know you can manually do this but that’ll take a while and it’s not as customizable for future use.
I want to create a for loop (repeat loop) where I call the status of the lights, lower (or raise) it by 1%, then wait for 60 seconds. I also want to make if statements in it but that’s not important.
Basically is there a way to do this in scriptable? I’ll be honest, it’s been a while since I’ve done JS. So I don’t know if I can have the HomeKit automation call the Scriptable file, find the lights, adjust them, then it goes back into the HomeKit automation where the process is repeated until they are fully lit or unlit.
Or perhaps there’s a better way. Haha 😂
r/Scriptable • u/__Loot__ • Mar 26 '23
async function fetchData(api_url) {
const apiUrl = api_url;
let req = new Request(apiUrl);
req.headers = {
"Content-Type": "application/json"};
let json = await req.loadJSON();
return json;
}
const currentDate = new Date();
const sixDaysInMilliseconds = 6 * 24 * 60 * 60 * 1000;
const futureDate = new Date(currentDate.getTime() + sixDaysInMilliseconds);
const start = currentDate.toISOString();
const end = futureDate.toISOString();
const results = [];
async function main() {
const json = await fetchData(`http://192.168.1.5:7979/api/v3/calendar?apikey=key&start=${start}&end=${end}&includeEpisodeImages=true&includeSeries=true`);
let widget = new ListWidget();
widget.backgroundColor = new Color('#ffffff');
for (const item of json) {
const seriesTitle = item.series.title;
const posterImage = item.series.images.find((image) => image.coverType === 'poster');
const posterUrl = posterImage ? posterImage.url : 'No poster URL found';
const episodeTitle = item.title;
const episodeNumber = item.episodeNumber;
results.push({ seriesTitle, posterUrl, episodeTitle, episodeNumber });
const hStack = widget.addStack();
hStack.layoutHorizontally();
hStack.size = new Size(500, 50);
hStack.addSpacer(10);
let req = new Request(posterUrl);
let image = await req.loadImage();
hStack.addImage(image).leftAlignImage(image);
hStack.addSpacer(10);
const vStack = hStack.addStack();
vStack.layoutVertically();
let title = vStack.addText(seriesTitle);
title.font = Font.boldSystemFont(16);
title.textColor = Color.black();
let episodeInfo = `Episode #${episodeNumber}: ${episodeTitle}`;
let episodeText = vStack.addText(episodeInfo);
episodeText.font = Font.systemFont(14);
episodeText.textColor = Color.gray();
widget.addSpacer(20);
}
if (config.runsInWidget) {
Script.setWidget(widget);
Script.complete();
} else {
await widget.presentLarge();
}
}
main();
Heres a picture https://i.imgur.com/cMB6AN9.jpg
r/Scriptable • u/Pretty-Ad4969 • Mar 25 '23
Hi everyone
I’m trying to build my first advanced widget using scriptable. I’ve built basic widgets but nothing with any real depth and I’m struggling with stacks.
I posted this in another forum and I’ve spent days playing about trying to achieve the result but I can’t make it work and I’m starting to think it’s not possible so before I give up, I wanted to ask in here for help.
How can I create 2 rows with 3 columns per row with 1px line breaks between each column and each row while making all the text and line breaks cantered with each other?
L
r/Scriptable • u/userpremium • Mar 14 '23
Looking for a script to create a tide watch , clock style .
Found one that can display the tide but the API is linked to a website that has only stations around the US .
Anything for Europe for a start is much appreciated
Ideally having that run in a widget in clock style ( gauge style ) . That would be perfect .
Thanks in advance for any tips
r/Scriptable • u/casper_boy • Mar 13 '23
How can I send text messages via scriptable? Or, how can I read the last message from a particular thread? If Apple doesn’t let you do neither of that, are there any workarounds?
r/Scriptable • u/tobias_digital • Mar 12 '23
r/Scriptable • u/SnooDrawings728 • Mar 11 '23


I have created a script for formula 1 fans who wants to get race information and weather information
This script is currently at version 2 and I have added key features such as Auto-Updater and Offline Mode
I plan to work on version 3, to keep up to date do follow me on YouTube !
If you any suggestions or would like to learn more do leave a comment
Learn more about this script - https://youtu.be/aBVP9NzzzKU
Get this script now - https://github.com/ed246810/F1-IOS-WIDGET
r/Scriptable • u/tobias_digital • Mar 10 '23
r/Scriptable • u/Fancy-Ad-9685 • Mar 11 '23
r/Scriptable • u/IllogicallyCognitive • Mar 09 '23
It seems ` is used for thing like multiple line strings, I did just find out you can type it by switching to the number keyboard, pressing and holding the single quote button and, once the options appear, sliding over to it. Is this used enough and cumbersome enough that it should be added to the buttons scriptable adds to the top of the keyboard?
r/Scriptable • u/Bulky_Percentage5430 • Mar 07 '23
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 • u/H1pnose • Mar 03 '23
Hi all,I'm currently trying to create a widget like this one for france (with some modification):
https://github.com/Martlgap/SmarterTankenWidget
I'm not a developer and I don't know nothing about JS, but I have all I needs except the part to organize my widget. I've been trying to manage with addStack but I don't understand ..
Can anybody can help me, or give me some advice ? You can see my "blueprint" about it.Thanks a lot
r/Scriptable • u/JMarkyBB • Mar 01 '23
This is all very new to me, so pardon my ignorance, I want to learn how to write script for making my own Shortcuts, is there an app or a website that a beginner can use, learn & implement, if that’s sounds wrong, I apologise.
Which is the language that Shortcuts uses, is there several or just one particular language that I need to concentrate on?
r/Scriptable • u/_trace27 • Feb 27 '23
I want to make a simple widget that returns a countdown to a certain date in weeks with one decimal (e.G. „23.8“)
Ideally, I would like to just edit the text parameter of the sticky notes widget as I like the simplicity (and also that it’s basically a finished widget because I know nothing about this haha)
I’m a total newbie with Java script and basically programming as a whole and I’m looking for some advice on how to go about this. Thanks for any reply in advance :)
r/Scriptable • u/transilluminate • Feb 22 '23
I thought I'd share my Scriptable creation - may be useful if you have a Synology box running Download Station:


r/Scriptable • u/ntester2018 • Feb 22 '23
Hi, I am trying to get data from https://lcd-osmosis.keplr.app/bank/balances/osmo1nn5newmlgqmhpy93zawr3tc63lmrnvmd8z3efc
but all the time I got undefined. I want to get 1st and 2nd amounts. What is the issue? Thank you!
const url = 'https://lcd-osmosis.keplr.app/bank/balances/osmo1nn5newmlgqmhpy93zawr3tc63lmrnvmd8z3efc'
const url2 = 'https://lcd-osmosis.keplr.app/bank/balances/osmo1nn5newmlgqmhpy93zawr3tc63lmrnvmd8z3efc'
const req = new Request(url)
const req2 = new Request(url2)
const data = await req.loadJSON()
const data2 = await req2.loadJSON(2)
const atom = data.result[0].amount
const statom = data.result[0].amount2
const i = new Request('https://icons.iconarchive.com/icons/alecive/flatwoken/256/Apps-Atom-icon.png')
const img = await i.loadImage()
r/Scriptable • u/iiiKurt • Feb 19 '23
r/Scriptable • u/SaltedTit • Feb 18 '23
Context is unnecessary I think but in short I have made a script that implements a stack class and want to access that class for a different script.
So is there any way to access and use a script while running a different independent script?
I can clarify if need be
r/Scriptable • u/hbhaam • Feb 18 '23
Hi,
I’m wanting to create a Siri shortcut to do a recurring event so for example. Every third Sunday of the month for an event to happen.
I think I’d have to use scriptable to get it to work.
Can anyone help with this?
Thanks
r/Scriptable • u/loo5ygoo5y • Feb 17 '23
r/Scriptable • u/trivial_trivium • Feb 14 '23
I want to make a simple app or widget or script that allows me to put in an arrival time, and then asks me for various inputs about tasks before that time, eg driving time, time to get ready, and then subtracts those minutes from the original time to show me the time I need to leave at.
Is this something a widget, or Scriptable can do? I was trying to figure it out in Shortcuts but the calculation options aren't very good in there from what I was trying.
What would be the best way to accomplish this? I also thought maybe a web app, or coding an app would be better? I'm not sure lol, I'm just a beginner. Any help in the right direction would be appreciated!
r/Scriptable • u/Kakumbinia • Feb 13 '23
Hi! this is my first post on reddit. im very new at programming and im not managging to make this:
i want to make a shortcut that passes a phrase to chatgpt, and it to reply on scriptable