r/Scriptable • • Oct 13 '22

Help Url schemes of ios apps

Post image
17 Upvotes

Hi,l wanna open a different app by tapping scriptable widget but l cant find url schemes.Where can l find?


r/Scriptable • • Jan 18 '22

Script Dynamic Word Cloud Script! Link in comments

Thumbnail
imgur.com
17 Upvotes

r/Scriptable • • Nov 28 '21

Script Hacked together a random Reddit viewer widget from the random scriptable API

17 Upvotes

Widget Example/Comparison Can’t find the author to thank for the contribution but thank you! GitHub RandomReddit


r/Scriptable • • Jul 18 '21

Solved Remove top padding on widget? It’s even worse on large widget

Post image
17 Upvotes

r/Scriptable • • May 27 '21

Widget Hello everyone. This is my first widget and unfortunately only available in German at the moment. I will continue to work on the widget and translate it into English and publish it at a later date. Let me know if you like it and give me some feedback. (: (link in the first comment)

Post image
17 Upvotes

r/Scriptable • • Apr 11 '21

Widget Special Days Widget

Thumbnail
gallery
17 Upvotes

r/Scriptable • • Feb 11 '21

Script LSForecast

Thumbnail
imgur.com
17 Upvotes

r/Scriptable • • Dec 06 '20

Discussion What Scriptable widgets do you actually use?

17 Upvotes

Scriptable was covered a lot on some german blogs and a lot looks fun widgets were presented (toilet paper counter for a popular german drug store), but mostly something I constantly need to see on my homescreen.

Do you actually use a lot of Scriptable widgets on your homescreen or do you rather use finished widgets that are provided from apps itself or other "widget making" apps like Widgy?

What Scriptable widgets do you use?

I really want to get to know the app better and see or read useful setups.


r/Scriptable • • Nov 28 '20

News Widget-Hub.app is now open for any widget developer 🎉

17 Upvotes

Widget Hub is now open for all widget developer 🎉 If you are a widget developer, you are now able to add your widget script to Widget Hub.You will find a "Sign Up" Button on https://widget-hub.appIf you have any question to this feature, you are welcome to join the Widget Hub Community on discord: https://discord.com/invite/AdrxCUednz Also feature ideas are welcome.

You will find the current roadmap of Widget Hub here: https://www.notion.so/bennysworkspace/393ff201943245499831db8852df96dd?v=c01f29b3747e48539f44a54bc0ae3e4a


r/Scriptable • • Nov 18 '20

Widget Günstigste Tankstelle // Cheapest Gas Station

17 Upvotes

Hello again.

I created another widget which displays the cheapest gas station next to your location.You can choose the fuel type which you car needs, it displays next 3 stations which are open, in a selected radius ordered by cheapest first.

Code: https://github.com/Necriso/ScriptableWidgets/blob/main/guenstigsteTankstelle.js

Configuration: https://github.com/Necriso/ScriptableWidgets (check readme)


r/Scriptable • • Aug 22 '20

Script IP Address Widget

17 Upvotes

This will get your external IP Address and display it on your home screen

// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: blue; icon-glyph: magic;
let widget = await createWidget();
Script.setWidget(widget);

async function createWidget() {
  const req = new Request("http://ipinfo.io/json");
  const data = await req.loadJSON();
  let IPHeader = "Current IP Address:"
  let IP = data.ip
  let w = new ListWidget()
  w.backgroundColor = new Color(color2())
  let titleTxt = w.addText(IPHeader)
  titleTxt.applyHeadlineTextStyling()
  titleTxt.textColor = new Color(color1())
  let bodyTxt = w.addText(IP)
  bodyTxt.applyBodyTextStyling()
  bodyTxt.textColor = new Color(color1())
  return w
}

function color1() {
  let mode = Device.isUsingDarkAppearance()
  if (mode == "true") {
    return "#f2f2f2";
  }
  else {
    return "#191919";
  }
}

function color2() {
  let mode = Device.isUsingDarkAppearance()
  if (mode == "true") {
    return "#191919";
  }
  else {
    return "#f2f2f2";
  }
}

r/Scriptable • • Sep 02 '26

Widget Sharing A vibe-coded widget showing your last played game on Steam/Xbox/PS

Post image
16 Upvotes

r/Scriptable • • Aug 30 '26

Widget Sharing Daily Essential Tracker for Trader

Post image
16 Upvotes

r/Scriptable • • Jan 10 '26

Widget Sharing Habit Tracking

Thumbnail
gallery
16 Upvotes

Built a habit and Task tracking widget that runs off of iOS reminders. Allows for filtering based on title for recurring reminders or all items for a general view. Clicking the widget shows the list of reminders that are summarized by the widget

The widget parameter string contains 5 semicolon separated parameters

  1. Search Term - word to find in the title or the name of a list depending on parameter 5

  2. Widget Title

  3. Theme color - predefined colors are purple, blue, red, orange, yellow, green

  4. Recurrence - options are ”everyday”, comma separated abbreviated 3 character day names such as mon,tue or an integer such as 3. Providing an integer will change the streak calculations to weekly instead of daily.

  5. Search type - options are title or list

// ================================
// Interactive Reminders Heatmap
// ================================

let rawParam = args.widgetParameter || args.queryParameters.p || ""

let TASK_FILTER = null
let CHART_TITLE = "Reminders"
let THEME_COLOR = "purple"
let RECURRENCE_INPUT = "everyday" 
let SEARCH_TYPE = "title" 
let DAYS = 42 

if (rawParam) {
  const parts = rawParam.split(";").map(p => p.trim())
  if (parts[0] && parts[0] !== "") { TASK_FILTER = parts[0]; CHART_TITLE = parts[0]; }
  if (parts[1] && parts[1] !== "") CHART_TITLE = parts[1]
  if (parts[2]) THEME_COLOR = parts[2].toLowerCase()
  if (parts[3]) RECURRENCE_INPUT = parts[3].toLowerCase()
  if (parts[4] && parts[4].toLowerCase() === "list") SEARCH_TYPE = "list"
}

const PALETTES = {
  purple: ["#E0B0FF","#D670FF","#B030FF","#9400D3","#7A00AD","#4B0082"],
  blue:   ["#B9E2FF","#6ABFFF","#0091FF","#006AD1","#004A99","#002D5E"],
  green:  ["#D4FC79","#96E6A1","#43E97B","#00D084","#008F68","#005F4B"],
  red:    ["#FFD1D1","#FF7A7A","#FF3D3D","#E60000","#B30000","#800000"],
  orange: ["#FFE0B2","#FFB74D","#FF9800","#F57C00","#E65100","#BF360C"],
  yellow: ["#FFF9C4","#FFF176","#FFEA00","#FFD600","#FFAB00","#FF6D00"]
}
const gradientColors = PALETTES[THEME_COLOR] || PALETTES.purple

// --- DATA FETCHING ---
const endFetch = new Date()
const startFetch = new Date()
startFetch.setDate(endFetch.getDate() - 43)

let allNative = []

if (SEARCH_TYPE === "list" && TASK_FILTER) {
  // Use Calendar.forReminders() to get all reminder lists
  const lists = await Calendar.forReminders()
  const targetCal = lists.find(c => c.title.toLowerCase() === TASK_FILTER.toLowerCase())
  
  if (targetCal) {
    allNative = await Reminder.completedBetween(startFetch, endFetch, [targetCal])
  } else {
    // Fallback if list not found: fetch all and filter by calendar title
    const tempFetch = await Reminder.completedBetween(startFetch, endFetch)
    allNative = tempFetch.filter(r => r.calendar.title.toLowerCase() === TASK_FILTER.toLowerCase())
  }
} else {
  const tempFetch = await Reminder.completedBetween(startFetch, endFetch)
  allNative = tempFetch.filter(r => {
    return !TASK_FILTER || r.title.toLowerCase().includes(TASK_FILTER.toLowerCase())
  })
}

const filteredData = allNative.map(r => {
  const d = r.completionDate
  const localKey = `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`
  let hours = d.getHours()
  let mins = String(d.getMinutes()).padStart(2, '0')
  let ampm = hours >= 12 ? "PM" : "AM"
  hours = hours % 12 || 12
  return {
    title: r.title,
    dateKey: localKey,
    timeLabel: `${hours}:${mins} ${ampm}`,
    rawDate: d
  }
}).sort((a, b) => b.rawDate - a.rawDate)

// --- TAP WIDGET ACTION ---
if (!config.runsInWidget) {
  let table = new UITable()
  table.showSeparators = true
  let titleRow = new UITableRow()
  titleRow.isHeader = true
  titleRow.backgroundColor = new Color(gradientColors[2], 0.3)
  titleRow.addText(`Activity: ${CHART_TITLE}`, `Total completions: ${filteredData.length}`)
  table.addRow(titleRow)
  
  let groups = {}
  filteredData.forEach(item => {
    if (!groups[item.dateKey]) groups[item.dateKey] = []
    groups[item.dateKey].push(item)
  })

  let sortedDates = Object.keys(groups).sort((a,b) => b.localeCompare(a))
  for (let date of sortedDates) {
    let dateRow = new UITableRow()
    dateRow.backgroundColor = new Color("#f2f2f7") 
    let df = new DateFormatter()
    df.dateFormat = "EEEE, MMM d, yyyy"
    dateRow.addText(df.string(groups[date][0].rawDate)).font = Font.boldSystemFont(14)
    table.addRow(dateRow)
    for (let task of groups[date]) {
      let taskRow = new UITableRow()
      taskRow.addText("    ").widthWeight = 5 
      taskRow.addText(task.title).widthWeight = 70
      let timeCell = taskRow.addText(task.timeLabel)
      timeCell.rightAligned(); timeCell.widthWeight = 25
      table.addRow(taskRow)
    }
  }
  await table.present(false); Script.complete()
}

// --- DATA PROCESSING HELPERS ---
function getWeekKey(date) {
  let d = new Date(date.getFullYear(), date.getMonth(), date.getDate())
  d.setDate(d.getDate() - d.getDay()); return `${d.getFullYear()}-W${d.getMonth()}-${d.getDate()}`
}

let dailyCounts = {}, weeklyCounts = {}, maxCountInPeriod = 0
for(const r of filteredData){
    const key = r.dateKey
    dailyCounts[key] = (dailyCounts[key]||0)+1
    if (dailyCounts[key] > maxCountInPeriod) maxCountInPeriod = dailyCounts[key]
    const weekKey = getWeekKey(r.rawDate); weeklyCounts[weekKey] = (weeklyCounts[weekKey]||0)+1
}

// --- UNIVERSAL PROGRESS LOGIC ---
let now = new Date(); let today = new Date(now.getFullYear(), now.getMonth(), now.getDate())
const dKey = (d) => `${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,'0')}-${String(d.getDate()).padStart(2,'0')}`

let totalSegments = 7; let completedSegments = 0
const isFreqGoal = !isNaN(parseInt(RECURRENCE_INPUT))

if (isFreqGoal) {
  totalSegments = parseInt(RECURRENCE_INPUT)
  completedSegments = weeklyCounts[getWeekKey(today)] || 0
} else {
  let startOfWeek = new Date(today); startOfWeek.setDate(today.getDate() - today.getDay())
  if (RECURRENCE_INPUT.toLowerCase() === "everyday" || RECURRENCE_INPUT === "") {
    totalSegments = 7
    for(let i=0; i<7; i++) {
      let d = new Date(startOfWeek); d.setDate(startOfWeek.getDate() + i)
      if (dailyCounts[dKey(d)]) completedSegments++
    }
  } else {
    const lookup = {"sun":0,"mon":1,"tue":2,"wed":3,"thu":4,"fri":5,"sat":6}
    const targetDays = RECURRENCE_INPUT.toLowerCase().split(",").map(s => lookup[s.trim()]).filter(v => v != null)
    totalSegments = targetDays.length
    targetDays.forEach(dayIndex => {
      let d = new Date(startOfWeek); d.setDate(startOfWeek.getDate() + dayIndex)
      if (dailyCounts[dKey(d)]) completedSegments++
    })
  }
}

// --- STREAK CALCULATIONS ---
function calculateStreaks() {
  let current = 0, longest = 0, tempLongest = 0
  if (isFreqGoal) {
    let currentWeekDate = new Date(today); let target = parseInt(RECURRENCE_INPUT)
    while (true) {
      const wKey = getWeekKey(currentWeekDate); const count = weeklyCounts[wKey] || 0
      if (wKey === getWeekKey(today)) { if (count >= target) current++ } 
      else if (count < target) break 
      else current++
      currentWeekDate.setDate(currentWeekDate.getDate() - 7)
      if (current > 100) break
    }
    let sortedWeeks = Object.keys(weeklyCounts).sort()
    for (let w of sortedWeeks) {
      if (weeklyCounts[w] >= target) { tempLongest++; longest = Math.max(longest, tempLongest); }
      else { tempLongest = 0; }
    }
    return { cur: current, max: longest }
  } else {
    function isRequiredDay(date) {
      const dayName = ["sun","mon","tue","wed","thu","fri","sat"][date.getDay()]
      const input = RECURRENCE_INPUT.toLowerCase()
      if (input === "everyday" || input === "") return true
      return input.includes(dayName)
    }
    let allKeys = Object.keys(dailyCounts).sort()
    if (allKeys.length > 0) {
      let checkDate = new Date(today)
      if (!dailyCounts[dKey(today)]) checkDate.setDate(checkDate.getDate() - 1)
      while(true) {
        if (dailyCounts[dKey(checkDate)]) current++ 
        else if (isRequiredDay(checkDate)) break 
        checkDate.setDate(checkDate.getDate() - 1)
        if (current > 1000) break 
      }
      let allSorted = Object.keys(dailyCounts).sort()
      let scanStart = new Date(allSorted[0].split("-")[0], allSorted[0].split("-")[1]-1, allSorted[0].split("-")[2])
      let scanPtr = new Date(scanStart)
      while(scanPtr <= today) {
        if (dailyCounts[dKey(scanPtr)]) { tempLongest++; longest = Math.max(longest, tempLongest); }
        else if (isRequiredDay(scanPtr) && dKey(scanPtr) !== dKey(today)) { tempLongest = 0; }
        scanPtr.setDate(scanPtr.getDate() + 1)
      }
    }
    return { cur: current, max: longest }
  }
}
const streaks = calculateStreaks()

// --- WIDGET UI ---
const widget = new ListWidget()
widget.backgroundColor = Color.white()
widget.url = `scriptable:///run/${encodeURIComponent(Script.name())}?p=${encodeURIComponent(rawParam)}`
widget.setPadding(10, 14, 10, 14)

const headerStack = widget.addStack(); headerStack.layoutHorizontally(); headerStack.centerAlignContent()
const titleTxt = headerStack.addText(CHART_TITLE); titleTxt.font = Font.boldSystemFont(20); titleTxt.lineLimit = 1
headerStack.addSpacer()
const streakDisp = headerStack.addText(`🔥 ${streaks.cur}  🏆 ${streaks.max}`)
streakDisp.font = Font.systemFont(20); streakDisp.textColor = Color.gray()

widget.addSpacer(6)

const barStack = widget.addStack(); barStack.layoutHorizontally()
const TOTAL_WIDTH = 312; const GAP = 5
const segmentWidth = (TOTAL_WIDTH - (GAP * (totalSegments - 1))) / totalSegments
for (let i = 0; i < totalSegments; i++) {
  let segment = barStack.addStack()
  segment.size = new Size(segmentWidth, 9) 
  segment.backgroundColor = i < completedSegments ? new Color(gradientColors[2]) : new Color(gradientColors[0])
  segment.cornerRadius = 2.5
  if (i < totalSegments - 1) barStack.addSpacer(GAP)
}

widget.addSpacer(10)

const mainStack = widget.addStack(); mainStack.layoutHorizontally()
const totalWeeks = Math.ceil(DAYS / 7) + 1; const CELL_GAP = 5; const LABEL_WIDTH = 36
let baseSize = Math.floor((340 - LABEL_WIDTH - (totalWeeks * CELL_GAP)) / totalWeeks)
const CELL_SIZE = Math.floor(baseSize * 0.82) 

const labelStack = mainStack.addStack(); labelStack.layoutVertically()
const WKDAYS = ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]
for(let i=0; i<7; i++){
  const lb = labelStack.addStack(); lb.size = new Size(LABEL_WIDTH, CELL_SIZE); lb.centerAlignContent()
  const txt = lb.addText(WKDAYS[i]); txt.font = Font.systemFont(11); txt.textColor = new Color("#8e8e93")
  if(i < 6) labelStack.addSpacer(CELL_GAP)
}
mainStack.addSpacer(6)

let startDate = new Date(today); startDate.setDate(startDate.getDate() - DAYS + 1)
let anchorDate = new Date(startDate); anchorDate.setDate(anchorDate.getDate() - anchorDate.getDay())
let cursor = new Date(anchorDate)

for(let w=0; w < totalWeeks; w++){
    const col = mainStack.addStack(); col.layoutVertically(); col.spacing = CELL_GAP
    for(let r=0; r<7; r++){
        let box = col.addStack(); box.size = new Size(CELL_SIZE, CELL_SIZE); box.cornerRadius = 2.5
        const dK = dKey(cursor); const val = dailyCounts[dK] || 0
        if (cursor > today || cursor < startDate) box.backgroundColor = new Color("#ebedf0", 0.3) 
        else {
          if (val === 0) box.backgroundColor = new Color("#ebedf0")
          else {
            if (maxCountInPeriod <= 1) {
              box.backgroundColor = new Color(gradientColors[2])
            } else {
              let colorIndex = Math.floor((val - 1) / 2)
              box.backgroundColor = new Color(gradientColors[Math.min(colorIndex, gradientColors.length - 1)])
            }
          }
        }
        cursor.setDate(cursor.getDate() + 1)
    }
    mainStack.addSpacer(CELL_GAP)
}

Script.setWidget(widget)
Script.complete()

r/Scriptable • • Jul 06 '25

Widget Sharing Cuban Peso

Post image
16 Upvotes

CUP=X is a simple, fast, and real-time web app that shows the latest exchange rates for the Cuban Peso (CUP) against major currencies like the Euro (EUR), US Dollar (USD), and MLC. It offers a clean interface, daily updates, and essential tools like a currency converter — all in one place.

https://peso-cubano.com/


r/Scriptable • • Sep 24 '23

Solved “Script not found.” error on iOS 17 Home Screen Widgets

16 Upvotes

Since the new app update came out to add support for iOS 17, I’ve been getting “Script not found” in my homescreen widgets. It was working fine before that app updated earlier today.

Anybody having the same issue? Any idea how to fix it?


r/Scriptable • • Feb 08 '23

Script Sharing I ported TinyGL.js to Scriptable

16 Upvotes

r/Scriptable • • Aug 11 '21

Discussion Documenting the Undocumented, Part 3: _scriptable_run() and __scriptable_import()

16 Upvotes

Two more undocumented functions, both crucial to the way Scriptable executes scripts.

_scriptable_run()

_scriptable_run is the asynchronous function that runs your code in the script execution environment. Its body is simply whatever code you write—the script you see in the editor. When _scriptable_run() is called, your script is executed. Since your code becomes the body of an asynchronous function, you can use await and return at what appears to be the top level.

Calling _scriptable_run directly in your script risks putting the app into an infinte loop, since your code is itself wrapped by _scriptable_run.

For example, if your script is console.log("hello world!"), _scriptable_run would look like this:

async function _scriptable_run() {
console.log("hello world!")
}

There is one major flaw with the way Scriptable handles scripts, however. _scriptable_run is assembled by string concatenation, rather than using the AsyncFunction constructor. Like this:

'async function _scriptable_run() {\n' + (Your script’s code, as you would see it in the script editor) + '\n}'

This means that it is trivial to escape _scriptable_run and work directly at the top level. If you put a lone closing curly brace (}) near the top of your script, whether at the very beginning or after a few lines of other code, that marks the end of _scriptable_run. This puts you in the top level of the execution environment. In this environment, you can only use async inside asynchronous functions and return inside functions, as you would normally expect JavaScript to behave. Other than that, you can do just about anything like normal outside of the scope of _scriptable_run, and it will work—as long as you remember to finish your script with a lone opening curly brace ({) to complement the automatically added closing brace, otherwise you will get a syntax error. (You can also write more of your script after that, but it will simply execute as a code block.)

If you trick the string concatenation method this way to work at the top level of the execution environment, whatever you write outside of _scriptable_run is executed before whatever is inside _scriptable_run, since _scriptable_run() is called somewhere below the contents of your script.

Here’s a script that shows off all of those things, since code is probably easier to understand than two rambling paragraphs:

  // This is inside _scriptable_run
  console.log("Hello from _scriptable_run! This will be logged last.")
}

// Top level of the execution environment, outside _scriptable_run
console.log("Hello from the top level! This will be logged first.")

{
  // This is inside a code block.
  // This exists to avoid a syntax error,
  // since Scriptable already supplies a closing curly brace
  // that would normally close _scriptable_run.
  // This code is just here for demonstration and can be omitted.
  console.log("Hello from a code block! This will be logged second.")

If you run this, the console will show the following:

Hello from the top level! This will be logged first.
Hello from a code block! This will be logged second.
Hello from _scriptable_run! This will be logged last.

Another neat little trick is replacing _scriptable_run with another asynchronous function from outside of its scope (such as at the top level). This overrides the initial declaration of _scriptable_run. Note that this doesn’t have much of an effect without escaping _scriptable_run, since _scriptable_run would just replace itself but never be called again by the execution environment.

For example:

  console.log("I’m inside the original _scriptable_run and will never be printed.")
}
_scriptable_run = async function() {
  console.log("This is the replacement for _scriptable_run.")
}
{

The console would show:

This is the replacement for _scriptable_run.

Note that _scriptable_run always has to be an asynchronous function. Assigning a regular function to that name throws an error because _scriptable_run is called and followed with a .then, like this:

_scriptable_run().then(…)

(I will describe what else happens in the script execution sequence in another post.)

__scriptable_import()

__scriptable_import() (that’s two underscores at the beginning of the name, not just one) is sort of like _scriptable_run(), but inside imported modules. Inside modules, _scriptable_run() does not exist, but __scriptable_import() does exist. (The opposite is true for non-modules; those have _scriptable_run() but not __scriptable_import().) This seems to be the only difference between the global objects of modules and main scripts. Imported modules do not support top-level await because __scriptable_import() is a regular function rather than an asynchronous function.

__scriptable_import() is assembled using string concatenation, much like _scriptable_run():

'function _scriptable_run() {\n  ' + (Your module’s code, as you would see it in the script editor) + '\n}'

It’s subtle and has no effect on the functionality as far as I know, but the first line of a module is indented by two spaces inside __scriptable_import(). No such indentation happens in _scriptable_run().

Since __scriptable_import() is created in the same way as _scriptable_run(), the same technique of using closing and opening curly braces can be used to escape it. Anything outside of __scriptable_import() is executed before the code inside of __scriptable_import(). You can also replace __scriptable_import() with any custom function this way. There’s not much use for this though, since anything added to module.exports outside of __scriptable_import() will still be passed as part of the module’s output.

For example, this module would work:

  log("Inside __scriptable_import() - logged third")
  module.exports.foo = "hello"
}
module.exports.bar = "world"
log("Outside __scriptable_import() - logged first")
log(__scriptable_import)
{
  log("After the curly brace to avoid a syntax error - logged second")

And given this main script:

const i = importModule('module filename');
log("Main script - logged last")
log(i)

The console would show:

Outside __scriptable_import() - logged first
function __scriptable_import() {
    log("Inside __scriptable_import() - logged third")
  module.exports.foo = "hello"
}
After the curly brace to avoid a syntax error - logged second
Inside __scriptable_import() - logged third
Main script - logged fourth
{"bar":"world","foo":"hello"}

I haven’t done much research into the finer points of how modules work, but here’s what I’ve been able to ascertain so far. When you call the importModule() function from your script, the __scriptable_import() function is created with the contents of the module, as described above, in its own JS execution context, completely separate from the main script. Then __scriptable_import() is called, still in that module’s context. module.exports is passed through the app (the native part) from the module’s context to the main script’s context, where it becomes the output of importModule().

While you can use return in a module at what appears to be the top level (without escaping __scriptable_import), it will simply stop execution of the module. It does not have any connection to module.exports, which is the only thing that is passed to the importing script. This is very different from using return in a main script, where you can use return to specify a shortcut output.


TL;DR Everything you write in Scriptable is automatically wrapped in functions that make life a little easier. _scriptable_run() is for scripts that you run directly, enabling that lovely top-level await, and __scriptable_import() is for modules that you import.

As with the underlying console functions, I don’t know if there’s a practical use for manipulating _scriptable_run or __scriptable_import directly, other than understanding how the execution environment works.


Posts in this series:


r/Scriptable • • May 25 '21

Solved Weather Cal transparent background issue

Post image
16 Upvotes

r/Scriptable • • Apr 25 '21

Widget Islamic Prayer Widget

16 Upvotes

This is a Scriptable widget that lets you display Islamic Prayer times based on your location in iOS 14 widgets

Setup:

Add Prayer-time.js and no-background.js to the Scriptable app on your device by downloading the file into the Scriptable folder in iCloud Drive or copying and pasting the code into a new Scriptable script.

Data:

Data is taken from Aladhan Api.

Credit:

Thanks to Frazeiy for sharing the basic widget on reddit.

Download:

You can get the widget from here

Screenshot


r/Scriptable • • Feb 13 '21

Discussion Working on JSX Widget Parser

16 Upvotes

Since I'm a big fan of React, and creating widgets is very exhausting this way, I got an idea to create something like JSX widget helper for Scriptable. This is still work in progress, but I would love to get some feedback, or even some help if someone with good JavaScript skills is interested.

Who knows, maybe event Simon like this idea, and give us official support for this.

Here is the gist link, the preview, and the code example to see how easily the widget from the preview can be made:

widgetJSX(`
  <Widget size="medium" background="#1b1b1b:0.5,#1b1b4b:1">
    <Stack layout="vertical">
      <Image
        src="https://docs.scriptable.app/img/glyph.png"
        size="32,32"
        align="center"
      />
      <Spacer length="15" />
      <Text string="Hello World" align="center" />
      <Spacer length="5" />
      <Text
        string="Scriptable JSX Widget v0.1"
        size="14"
        opacity="0.5"
        align="center"
      />
    </Stack>
  </Widget>
`)

Available components are Widget (required), Stack, Image, Spacer and Text.

Edit 1:

Updated demo code and added new screenshot preview.
Added gradient or image url option for for Widget and Stack background.
Added border otpion for Stack (for instance border="#ff0000:1").
Updated Text for easier alignment, without need to wrap it in Stack.
Added Image component with same align option as Text.


r/Scriptable • • Feb 09 '21

Widget Made a widget to monitor my Ethereum mining

16 Upvotes

I've been using Hive OS to mine Ethereum, so I used their API and Ethermine's to make this.

Link to Source


r/Scriptable • • Jan 14 '21

Widget [Release] Upcoming Calendar Indicator v1.5

16 Upvotes

I've made some improvements and new implementations based on some various feedback I have received both here in the sub and also on GitHub and Discord.

New changes are:

  • add in reminder support

  • add in setup question for reminder support

  • add option during setup for displaying the calendar color in the event list

  • reminder emoji added to reminder title

  • reminder list color added to display text color

  • adjust current date indicator font size to better align with the other dates

  • add in AM/PM indicator to the date shown in event list

  • add ability to change the base text color between for each mode (light/dark)

  • add setting for 24hr time vs 12hr for event list

An example of what v1.5 could look like with the new base color changes is like this image. This is utilizing base text color changed to red and the 24 hour time format.

As before, you can see information and get the script from here on my GitHub


r/Scriptable • • Oct 25 '20

Script iPhone Scriptable Widget :countdown-election-biden-harris

Post image
16 Upvotes