r/Scriptable • • Apr 30 '26

Help Made a Scriptable app launcher! Need feedback

Post image
26 Upvotes

Is there any way to open apps directly without triggering the scriptable app? If I open an app it 1st opens scriptable and then redirect it to the selected app! That's the only downside!

Would you guys be interested to use this? Plz Lemme know!

EDIT : check out the script here


r/Scriptable • • Oct 26 '23

Widget Sharing Tomorrow.io Widget

Post image
26 Upvotes

(Making a new post for this and removing the old one as things have changed significantly)

I really like the Tomorrow.io weather app, but their widgets leave something to be desired. Specifically the medium-size widget, which for some reason completely drops the current conditions. So I decided to make my own.

The widget is fairly simple: it displays the current weather conditions based on your location, as well as the forecast for a few hours ahead. When you tap on it, it will open up the Tomorrow.io app.

Download the widget here

You will need to sign up for a free Tomorrow.io API key, which can be done from their website.

This widget is designed to be medium-sized. It probably won’t display correctly at other sizes.

Enjoy!


r/Scriptable • • Feb 27 '21

Request I have ablosutely no clue how to script, but an idea

Post image
26 Upvotes

r/Scriptable • • Jan 22 '21

Script I thought that Reddit’s own widget was lacking, so made my own!

Thumbnail
gallery
26 Upvotes

r/Scriptable • • Jan 16 '21

Request Netatmo Weather Station Widget

Post image
26 Upvotes

r/Scriptable • • Dec 14 '20

Solved anyone have this widget with size iphone 12 pro max ??

Post image
26 Upvotes

r/Scriptable • • Nov 12 '20

Widget Tankstellenpreise Widget / Gas Station Prices Widget

26 Upvotes

Download:
https://github.com/Necriso/ScriptableWidgets/blob/main/tankstellenpreise.js

Widget Image:

Get more Widgets at www.scriptables.net


r/Scriptable • • Nov 01 '20

Script Widget Hub

26 Upvotes

Hi everyone, I have publish the BETA Version of Widget Hub: https://widget-hub.app/

Widget Hub will allow you to discover new widgets and load them directly into Scriptable. For the beginning I will only support my own Scriptable widgets in the catalog, but in the next step I will allow other Developer to add there widget-scripts.

The Catalog is based on the Shortcuts App (to make the installation easier) and Scriptable App.

What I have planned:

  • Other developers can add their widget scripts

  • Review process to protect the users for bad scripts, e.g. those who steal login credentails

  • Sign scripts after the review process to prevent scripts from being changed afterwards

What do you think about this? Maybe you have other cool ideas for the Widget Hub. I am looking forward to your feedback.


r/Scriptable • • Sep 19 '21

Discussion Home Screen Weather Station

25 Upvotes

r/Scriptable • • Dec 07 '20

Widget My widget that I made for my cross country team pulls training info from a custom api

Post image
25 Upvotes

r/Scriptable • • Oct 25 '20

Script Football fans would like it to view match day by widget. Script at comment area

Post image
25 Upvotes

r/Scriptable • • Oct 08 '20

Script Time progress widget

Post image
25 Upvotes

r/Scriptable • • Oct 05 '20

Script Simple, easy to customise countdown widget

Post image
25 Upvotes

r/Scriptable • • May 25 '20

Repository of scriptable scripts

25 Upvotes

Is there any website I can get scriptable scripts like there is for the Shortcuts app


r/Scriptable • • Jul 16 '22

Widget Sharing TrainingPeaks widget (my first time using JavaScript!)

Post image
24 Upvotes

r/Scriptable • • Dec 09 '21

Widget Create Widget Horizontal Rules

Post image
24 Upvotes

r/Scriptable • • Oct 07 '21

Widget Exchange Rates Widget in the making (Link in comments)

Post image
24 Upvotes

r/Scriptable • • Aug 02 '21

Discussion Documenting the Undocumented, Part 2: prototype-extensions.js

24 Upvotes

One of the files in the ScriptableKit.framework resources folder is called prototype-extensions.js. The contents of this file are executed every time before your script runs.

Here’s the file on Pastebin in its original form: https://pastebin.com/gmDc1EZm

And here’s a prettified (and slightly edited to separate things for even better readability) version of the same code: https://pastebin.com/bxR9Z0Wa

The code is very lengthy, but it essentially defines the same things for each of the documented APIs in Scriptable. I’ll use Alert as the example, but the same thing applies to the other APIs (excluding args, config, console, and module, since those are simple objects and not types/classes).

toString()

Overrides the default toString() method for the class. For example, this is what it looks like for Alert:

Alert.toString = function() {
    return "function Alert() {\n    [native code]\n}"
}

This returns:

function Alert() {
    [native code]
}

If you run console.log(Alert), the console will show the customized return value of Alert.toString().

Why is this needed? When the bridge to the native Alert API is created, the default toString() method returns the following:

function ScriptableKit.AlertBridge() {
    [native code]
}

That’s not particularly useful for when you’re writing a script. So the custom toString() function exists to make things make a little more sense.

prototype.toString()

Similarly, this overrides the toString() method for any instance of the type. For Alert:

Alert.prototype.toString = function() {
    return "[object Alert]"
}

This returns

[object Alert]

which makes sense when you’re trying to debug your script.

The default Alert.prototype.toString() method returns

[object ScriptableKit.AlertBridge]

which, again, is not particularly helpful for normal usage.

prototype._scriptable_keys()

This returns an array of keys, which you see when you call Object.keys() on a type instance. For Alert:

Alert.prototype._scriptable_keys = function() {
    return [
        "title",
        "message",
        "addAction",
        "addDestructiveAction",
        "addCancelAction",
        "addTextField",
        "addSecureTextField",
        "textFieldValue",
        "present",
        "presentAlert",
        "presentSheet"
    ]
}

This is needed because Object.keys() is redefined elsewhere in the execution environment to depend on this method to print the keys correctly:

let orgKeys = Object.keys
Object.keys = function(obj) {
  if (typeof obj._scriptable_keys == "function") {
   return obj._scriptable_keys()
  } else {
   return orgKeys(obj)
  }
}

If we delete the _scriptable_keys() method, the result of Object.keys(new Alert()) is an empty array, which is rather misleading since those properties are available but just not used. I think Scriptble’s “bridge” setup, which connects the JS environment to native Swift code for APIs like Alert, uses something very much like getters and setters to pass values back and forth between the two environments. That would explain why they can’t be seen by default.

prototype._scriptable_values()

Much like prototype._scriptable_keys() and Object.keys(), but for Object.values().

For Alert:

Alert.prototype._scriptable_values = function() {
    return [
        this.title,
        this.message,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null
    ]
}

Object.values() is redefined this way:

let orgValues = Object.values
Object.values = function(obj) {
  if (typeof obj._scriptable_values == "function") {
    return obj._scriptable_values()
  } else {
    return orgValues(obj)
  }
}

Using the original Object.values() function (renamed orgValues) on an Alert object returns an empty array.

prototype.toJSON()

Last but certainly not least, this instance method returns a simplified JS object that can be used by JSON.stringify(). When this instance method is deleted and JSON.stringify() is called directly on the object, an empty object (or rather, a string representation thereof) is returned.

For Alert:

Alert.prototype.toJSON = function() {
    return {
        title: this.title,
        message: this.message
    }
}

The purpose of prototype-extensions.js, in a nutshell, is to make life a little bit easier for users when debugging scripts. The native ScriptableKit bridges can be rather unintuitive when you’re working in a JavaScript context, so prototype-extensions.js overrides some of those default behaviors to be more useful for developers.

If you’d like to see the effects of these prototype extensions for yourself, here’s a little script that shows off the differences in functionality:

log("With the prototype-extensions.js overrides")
const alert1 = new Alert()
log(Alert)
log(alert1.toString())
log(Object.keys(alert1))
log(Object.values(alert1))
log(JSON.stringify(alert1))

delete Alert.toString
delete Alert.prototype.toString
delete Alert.prototype._scriptable_keys
delete Alert.prototype._scriptable_values
delete Alert.prototype.toJSON

log("Without the prototype-extensions.js overrides")
const alert2 = new Alert()
log(Alert)
log(alert1.toString())
log(Object.keys(alert1))
log(Object.values(alert1))
log(JSON.stringify(alert1))

This is the second installment in my series of posts exploring what goes on behind the scenes when you run a script in Scriptable. The next several posts will dive into exactly how the process of running a script works. Here’s the first post in this series, detailing what’s inside the console object: https://www.reddit.com/r/Scriptable/comments/ov18pe/documenting_the_undocumented_part_1_inside_the/


Posts in this series:


r/Scriptable • • May 03 '21

Script BMW Lease Lense

Thumbnail
github.com
24 Upvotes

r/Scriptable • • Apr 05 '21

Widget Crypto ticker widget

Post image
24 Upvotes

r/Scriptable • • Mar 22 '21

Request has anyone created an apple watch widget? if no, could someone pls create one? i really want this and would be really grateful. looks something like this:

Post image
24 Upvotes

r/Scriptable • • Nov 25 '20

News Competition: Top 5 Best Widgets

24 Upvotes

EDIT: ENTRIES HAVE BEEN ENTERED.... ALL THE BEST!! NO MORE ENTRIES WILL BE TAKEN!

Channel name: TechUnited (Blue and White icon)

Put your best creation in the comments below and I’ll pick the best 5 of them! They will feature in my video with full credit in the scenes as well as the description!

Submit your Scripts quickly!!!


r/Scriptable • • Oct 30 '20

Script Portainer (Docker) Widget

24 Upvotes

👋

I would like to share another one widget with the community. This one uses the api of portainer and shows the state of all containers. It keeps rotating randomly which will be shown, if yo got more containers than the widget has size.

Feel free to use it and have fun! https://gist.github.com/malesfth/38885be4617f61913af74a695be82b07

https://imgur.com/a/hSJlCOX


r/Scriptable • • Oct 14 '20

Help Is there a way to make a circle chart like this that tracks battery %? I was thinking a path.addArc method but it doesn't exist

Post image
24 Upvotes