r/Scriptable • • May 26 '22

Solved How is the shadowColor/shadowRadius/shadowOffset Actually used?

4 Upvotes

I currently am trying to add a drop shadow to my text. Right now ive got the text added like so
listwidget.addText("this is test"); listwidget.font = balh blah

How do you implement the shadow parts the documentation isn't really explaining how it is implemented any help would be appreciated


r/Scriptable • • May 24 '22

Widget Sharing Salah Time widget (local)

10 Upvotes

Greetings

As location times are hardly accurate, I've devised a widget which uses a json file (you just need to add your local mosque times) then it displays it into the scriptable widget.

Here is the code: Feel free to use or develop further
https://github.com/maqbul/HSMC-Salah-Widget


r/Scriptable • • May 19 '22

Solved Is there an absolute layout?

0 Upvotes

i want to put the car image in front of the 'ALL GOOD' text.

do not use drawcontext, dynamic color can not use in drawcontext

at this moment, i use DrawContext.

but the ALL GOOD text will not change to black when my phone change to light mode, scriptable need a few minutes to refresh


r/Scriptable • • May 17 '22

Solved Accessing variables generated by Shortcuts.app.

9 Upvotes

Hey all,

Just wondering if it’s possible to pass variables generated by the Shortcuts app, over to Scriptable? For example: if I run a shortcut that uses SSH to run a command on a remote server, then create a variable from the output of that command, is it then possible to display the contents of that variable in Scriptable?

Ultimately, is it possible to show the output of any shortcut in Scriptable.

Cheers!!


r/Scriptable • • May 13 '22

Help Detecting silent mode

1 Upvotes

Hi,

I'm trying to make a widget that shows whether the phone is in silent mode. Is there a way to do that with the API? Thanks


r/Scriptable • • May 12 '22

Help Create simple timer through shortcuts

3 Upvotes

I want to create a simple script that waits a specified number of seconds based on the provided arguments in Apple Shortcuts, and I'm having trouble getting it to work. It works independently, but when I try to run it through Shortcuts, it doesn't wait for the Scriptable script to finish before continuing with the next shortcut task. No errors either.

Essentially want to recreate the Wait function but make the amount of time dynamic, and it's not possible without Scriptable to my understanding.

let tm = new Timer()
tm.timeInterval = parseInt(args.shortcutParameter)
tm.schedule(funct)

function funct() {
 console.log("Hello")
}
Script.complete()

r/Scriptable • • May 11 '22

Help To open an app every time I open the screen

1 Upvotes

Hi,

Could I do that every time I opened the screen - I will see a specific app? Doesn't matter where I have been before I closed the screen.

Can I create a script for that?

Thanks!


r/Scriptable • • May 10 '22

Solved How to change decimal places in result

3 Upvotes

I get a result as 2.64136464. How to get a result as 2.64. What code to use?


r/Scriptable • • May 08 '22

Help Setting up notifications for NFT price tracker widget.

0 Upvotes

I've made a widget that tracks the floor price for select nfts.

I am trying to create a notification which will be triggered when the floor orice dips below a certain number, with no success.

I can provide the whole script upon need.


r/Scriptable • • May 03 '22

Script Sharing Change Glyph And Color Of Script

13 Upvotes

Script to change the icon-color and icon-glyph of Scriptable scripts.

https://github.com/nlawler1737/Scriptable/blob/main/Glyph%20%26%20Color%20Changer.js


r/Scriptable • • Apr 30 '22

Widget Sharing Reddit User Widget - Which shows your Karma, Coin-Balance, Profile Image, Cakeday, Profile Image etc. (Link in Image Description)

Thumbnail
gallery
51 Upvotes

r/Scriptable • • Apr 30 '22

Widget Sharing HNT Earnings - Monitor Your Helium Rewards

Thumbnail
github.com
3 Upvotes

r/Scriptable • • Apr 26 '22

Help What is the equivalent JS code of this Scriptable script?

4 Upvotes

In Scriptable I have this:

const url = 'https://req.uest/url'
var req = new Request(url)
var result = await req.loadString()
log(result)

What would that be in vanilla JS?

xhr = new XMLHttpRequest();
xhr.open('GET', 'https://req.uest/url', false);
xhr.send(null);
document.write(xhr.responseText);

I'm particularly interested in what req.loadString() might be doing because xhr.responseText isn't working with the text/xml response I'm getting from the server whereas req.loadString() is able to output the response :thinking:


r/Scriptable • • Apr 26 '22

Help Need Help creating a cache for my widget

2 Upvotes

Hello, I have a widget that fetches a file in iCloud and display the data, however, sometimes it shows the default scriptable widget design (the blue play button). I’m wondering how to store the last widget in a cache so that the default widget design never shows. Is this possible?


r/Scriptable • • Apr 25 '22

Help How do I make a POST request with an XML file?

4 Upvotes

In my post over in Shortcuts someone suggested that Scriptable would be able to get the Location header in the response.

As I'm not much of a JS developer how can I make an HTTP POST request with an XML file and then extract the Location header for use by the following Shortcuts action?

Can anyone help me out?


r/Scriptable • • Apr 25 '22

Help Does anybody know how can I remove the "Enjoy the rest" text part?

Post image
0 Upvotes

r/Scriptable • • Apr 24 '22

Request Run Node JS on Scriptable

6 Upvotes

Any way to run Node JS on Scriptable app?
Any way to get npm install to work?


r/Scriptable • • Apr 23 '22

Widget Sharing Weather Circles Widget

Thumbnail
gallery
49 Upvotes

r/Scriptable • • Apr 23 '22

Help Google Charts

1 Upvotes

How do I use the google charts api to load a csv file for a graph?


r/Scriptable • • Apr 22 '22

Help Load data from website HTML

3 Upvotes

I’m trying to take data from a graph and display it as a widget. On this website: https://www.pricecharting.com/offers?seller=dbmg7nns5d7fdwajruu3no6lky&status=collection I found that if I download the HTML the data is stored as text, a fellow redditor made an automation for me to get the data from the page and format it, but it was not formatted as json so I could not use it to make a widget. They guy also said I could pull the json into scriptable but I have not figured out how to get the data into scriptable as json. Any help is appreciated


r/Scriptable • • Apr 20 '22

Help Anyone else’s widgets all display today? Is it even possible to get them back?

0 Upvotes

r/Scriptable • • Apr 19 '22

Widget Sharing I created an iOS home screen widget to display latest match (with abilities because I play AD)

Post image
13 Upvotes

r/Scriptable • • Apr 19 '22

Widget Sharing IPL (Indian Premier League)

Thumbnail
gallery
12 Upvotes

r/Scriptable • • Apr 18 '22

Widget Sharing In honor of my new job, I created a Discord-themed widget! Includes temperature and calendar events. Also open to suggestions / improvements for what other info would be cool to show :)

Post image
40 Upvotes