r/Scriptable • u/Bulky_Percentage5430 • Sep 04 '24
Help Does scriptable hace support for Dynamic Island?
I want to Make a Counter that sticks to the Dynamic Island, to keep score in games. Is it posible?
r/Scriptable • u/Bulky_Percentage5430 • Sep 04 '24
I want to Make a Counter that sticks to the Dynamic Island, to keep score in games. Is it posible?
r/Scriptable • u/Karimawii • Aug 25 '24
Hello, I have a pretty simple widget that pulls a photo from a URL, I had already written my code with Python and I'm running it on a Vercel web server that processes everything and returns the image, I'm using iPhone 8 Plus, which has a small widget size of 157x157 and a medium widget size of 348x157, I have my server return an image of 2x the scale, so 314x314 and 696x314 respectively.
The problem is, when the photos are displayed on the widget it's a little blurry, it looks so bad and I really don't know how to fix it, I tried DrawContext and it somehow made it more blurry.
Here's a cropped screenshot with one of the medium widgets compared to a PhotoLink widget pulling from the same exact URL:

And here's the code with added comments for context:
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: purple; icon-glyph: globe-asia;
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: purple; icon-glyph: globe-asia;
// Scriptable widget that displays an image from a URL and keeps it updated
const smallWidgetURLs = {
sp: "https://example.com/spotify",
te: "https://example.com/te"
};
const mediumWidgetURLs = {
vf: "https://example.com/vf",
vl: "https://example.com/valorant",
ll: "https://example.com/lol"
};
// Function to create and update the widget
async function createWidget(
widgetSize
,
parameter
) {
let imageURL;
// Select the correct URL and size based on the widget size and parameter
if (
widgetSize
=== "small") {
imageURL = smallWidgetURLs[
parameter
] || smallWidgetURLs.sp;
} else if (
widgetSize
=== "medium") {
imageURL = mediumWidgetURLs[
parameter
] || mediumWidgetURLs.vf;
}
const widget = new ListWidget();
try {
// Fetch the image from the URL
const req = new Request(imageURL);
const image = await req.loadImage();
widget.backgroundImage = image;
// Use backgroundImage to ensure clarity
// Log the update
logUpdate(
parameter
);
} catch (error) {
// Handle connection error
widget.addText("No Internet Connection");
console.error("Failed to load image:", error);
}
// Randomize the refresh interval between 5 to 7 minutes
const minRefreshMinutes = 5;
const maxRefreshMinutes = 7;
const refreshInterval = Math.floor(Math.random() * (maxRefreshMinutes - minRefreshMinutes + 1) + minRefreshMinutes);
widget.refreshAfterDate = new Date(Date.now() + refreshInterval * 60 * 1000);
// Return the widget for display
return widget;
}
// Check if running in the widget
if (config.runsInWidget) {
// Create and set the widget based on the current widget size
const widget = await createWidget(config.widgetFamily, args.widgetParameter);
Script.setWidget(widget);
} else {
// Run manually: update all widgets
await createWidget("small", "sp");
await createWidget("medium", "vf");
await createWidget("medium", "vl");
}
// Complete the script
Script.complete();
// Function to log updates with local time
function logUpdate(
parameter
) {
try {
const fm = FileManager.iCloud();
// Use iCloud for saving the file
const filePath = fm.joinPath(fm.documentsDirectory(), "log.txt");
// Get the current date and time in local time
const now = new Date();
const localTime = now.toLocaleString();
// Convert to local time string
const logEntry = `${localTime} - Widget updated with parameter: ${
parameter
}\n`;
// Append the log entry to the file
if (fm.fileExists(filePath)) {
fm.writeString(filePath, fm.readString(filePath) + logEntry);
} else {
fm.writeString(filePath, logEntry);
}
console.log("Log entry written to iCloud successfully:", filePath);
} catch (error) {
console.error("Failed to write log to iCloud:", error);
}
}r/Scriptable • u/Agitated-Anteater302 • Aug 24 '24
right now when I tap the widget it briefly shows the script in scriptable before executing it. Is there a way around this ?
r/Scriptable • u/heyprashant • Aug 24 '24
App is not opening and crashing. All the widgets are not responding. Does anyone facing similar issue?
r/Scriptable • u/wamuusubi • Aug 23 '24
Hello!
I’m working on a shortcut that will randomly select N photos from my reference collection based on input tags and place them in a cached folder.
Shortcuts doesn’t support tag access so I opted to use Scriptable as the FileManager type supports this via the allTags method.
However, if one of my files has a custom tag, I get the following error:
2024-08-23 15:50:39: Error on line 15:26: The tags has an unexpected property. This may be because the format was changed in a recent iOS release. Please contact the developer.
Has anybody else tried allTags? Or has anybody observed this error?
Note: I have fileExist checks and have downloaded the file from iCloud as recommended by the docs.
r/Scriptable • u/giuliomagnifico • Aug 18 '24
Thanks to u/lollokara who shared this GitHub repo. I got inspired by those widgets and redesigned mine.
As I mentioned in the previous post, I'm happy to share it (I just need to clean up the code a bit). However, it has a specific use: I'm monitoring energy consumption using a Shelly EM. Since it exposes the JSON data at http://<shelly-lan-ip>/status, you need to read the data from there. For me, even when I'm outside, I'm still connected to my home LAN using WireGuard ('active on demand' in split tunnel). Otherwise, it won't work once you leave the home WiFi.
tl;dr requirements:
r/Scriptable • u/sryo • Aug 15 '24
I recently created a dumbphone menu thing. It’s similar to apps like Blank Spaces or Dumbify, but free and themable. You can check it out on GitHub. I’d love to hear your thoughts!
r/Scriptable • u/giuliomagnifico • Aug 14 '24
I created a widget that uses the Shelly EM API to monitor my home power.
But there are a few downsides:
It’s a first version, and if anyone finds it useful, I'd be happy to share it.
Maybe it could also work with a remote URL if Shelly’s API exposes the status to a custom URL, but I’m not sure (I'm new to the Shelly brand).
r/Scriptable • u/AntexStudio • Aug 11 '24
my baterry says 26 but scriptable says 25
r/Scriptable • u/user172625 • Aug 11 '24
As the title says. I’m looking for display an HTML code on my scriptable widget.
I can see the contents of the code when running it inside scriptable, but I am getting these errors when trying to view it as a widget.
Is there a work around to this??
r/Scriptable • u/PA28181 • Aug 11 '24
I use the apple shopping list reminders but find I keep get duplicates in it. For instance I add milk. Later my wife adds milk. This kind of thing is constantly happening. When I open the list I see a lot of duplication. Can anyone point me in the the direction of a shortcut or scriptable that can remove duplicates?
r/Scriptable • u/NiqhtsFall • Aug 10 '24
I’m trying to create a widget to show my mobile data usage and decided to add a nice looking SF Symbol and whenever previewing it looks like the first image, pretty neet but whenever I actually add it to the Home Screen (picture 2) it shows a lot darker then the preview. I’m using DrawContext to show the symbol, has anybody else ran into this issue or is it on me?
r/Scriptable • u/sohojmanush • Aug 09 '24
Does anyone has any working BCD clock script for scriptable?
r/Scriptable • • Aug 09 '24
One year ago I made this script ( https://github.com/LeonardoVezzani/Calendar2Remiders ) And I wanted to share it.
This allows you to sync your calendar event in your reminder lists to create a daily todo list.
I just read that new IOS version will have that built in but if you, like me, stop updating to prevent programmed obsolescence, I believe you might need this.
Hope you enjoy!
r/Scriptable • u/user172625 • Aug 08 '24
Maybe a simple question.
I am wondering how to skip this pop up, or have it automatically click “done” when I’m running my script in shortcuts.
r/Scriptable • u/ZoRaC_ • Aug 08 '24
Just updated from 17.6 to 17.6.1 and now there are no scripts listed in the app anymore.
Anyone else experiencing this and have a solution?
r/Scriptable • u/AromaticStatus3070 • Aug 08 '24
I have a widget that displays the food menu of my university dining hall. I want to force two lines of the stack to the top (information about the widget), while keeping the menu dynamic in the center.
Bonus help: if I can have the top two lines of information vertical and the menus horizontal AND vertical to fit more menu items, that would be literally insane but it doesn't appear you can mix and match horizontal and vertical widgets.
Source code is available here: Squidnugget77/tamu-food-finder-widget: widget using scriptable (github.com)
r/Scriptable • u/Robby3St • Aug 07 '24
Wärt ihr interessiert an diesem Widget (wenn ich noch ein bisschen mehr Arbeit ins UI stecke)?
Hab leider nur die historischen stündlichen Daten aus Dortmund.
r/Scriptable • • Aug 05 '24
I looked at this sub and found posts dated to many months/years ago saying that with iOS17 there would be extended widget functionality. Since I haven't found any new documentation or advice on the matter, can any of you please point me to how to add buttons to my widget? Thank you!
r/Scriptable • u/feroon • Aug 04 '24
Has to run in the app once for the setup, the timer shows how long it’s been since the last refresh.
r/Scriptable • u/dpfahadqb1 • Aug 03 '24
I have used a code in scriptable for making a nice ios widget. However, recently the code doesn’t work for this reason:
Fetching url: https://api.todoist.com/rest/v2/tasks?filter= Error: The data couldn’t be read because it isn’t in the correct format. Fetching url: https://api.todoist.com/rest/v2/projects
Any solution?
r/Scriptable • u/Party_Cold_4159 • Jul 29 '24
Just wrapped up the development of our new Random George Costanza widget.
Wanted to keep the team updated, but we will circle back in the next quarterly meeting.
Code Need google cloud api and search engine key.
r/Scriptable • u/epcotlegacy • Jul 27 '24
has anyone built a tracker for the top countries during the 2024 Olympics?
Thanks in advance!
r/Scriptable • u/PA28181 • Jul 23 '24
Can anyone help me with a script to take the iphone reminders shopping list and export it to a 2 column note or into a 2 column list that can be opened in some other app that reads text? My wife wants the list into 2 columns so everything fits on one page when printed. She's handicapped and only has use of one arm and flipping pages is very difficult for her to manage.
Thanks for the help!