r/Scriptable • u/D0mC0m • Nov 05 '21
Help Clipboard to variable?
Hello,
I am searching for a way to fill a varaible with the content in the clipboard. Is this possible?
Thanks in advance.
r/Scriptable • u/D0mC0m • Nov 05 '21
Hello,
I am searching for a way to fill a varaible with the content in the clipboard. Is this possible?
Thanks in advance.
r/Scriptable • u/tzippy84 • Nov 05 '21
Hello!
I am quite new to Scriptable and JavaScript, however not to programming. I use Scriptable's Request because Shortcuts is very limited when it comes to cookies and that's a requirement for the API I am accessing.
Unfortunately it's not a real API, I have to parse a website that I retrieve from the Request:
let res = await request.loadString();
Now I understand that Scriptable is using Apples JavaScript Core and that DOMParser itself is some kind of extension or thrid party lib that's not included.
Since I want to access <table> elements within the HTML to retrieve data I am looking for a way to parse the html string so that I dont have to use ugly regex to get my data.
Is there a way in Scriptable that allows me to do this?
Thanks!
r/Scriptable • u/NaruOfDoom • Nov 04 '21
Hello! I want to automate a task, where if I connected with some bluetooth speakers my iphone will automatically open Spotify. If i use the 'standard' Method i have to manually activate the task esch time because one can't deactivate this... Now i wanted to use JS (or Pythonista?) to open the App so i don't have to confirm it.
I dont really know Javascript core for IOS (but a little JS for html purposes) If i use the open(); Function some error occurs...
Could some body help me please?
Thank you!
r/Scriptable • u/Withoutduerespect • Nov 04 '21
I use weathercal (and I love it, if you’re listening weathercal dev!) but I’m absolutely baffled by how it chooses to sort reminders. I have two lists that seem to just get mixed in together, not alphabetically, not by priority. https://imgur.com/a/3KSAKtv/
It doesn’t seem to be sorted by the parameters you set within the actual reminders app either, as I have mine set to sort by title. I don’t see any way within weathercal’s settings to change the order.
I’m not suuuuper comfortable with digging through the code but I’d be willing to make some small changes if anyone knows what to do to keep my two lists separate or sort alphabetically or by priority or something..?
Thanks y’all :)
r/Scriptable • u/eric_kwok • Nov 04 '21
I load an image from url and now I want to blur it as the background of my widget, or extract the main color from it and set it as the background color. I found some library in JavaScript for doing this, such as rgbaster, but that library relies on html canvas to work and there is no such thing in scriptable (or am I missing something?). Any suggestion would be appreciated!
r/Scriptable • u/dpopov44 • Nov 03 '21
Not much of a coder and this is referring to the Daily Logs V2 widget (created by u/randomo_redditor). I’m trying to set a background image for the widget without being prompted to select it from my camera roll every time I run it. Is this possible and if so what’s the code I need? Here is the area of the code that I think controls this: https://imgur.com/a/3BwVqsY .
Thanks in advance
P.S (Lines 182-184 is me trying something with no luck, given a ‘Cannot parse response to an image’ error)
r/Scriptable • • Nov 03 '21
My current code consists of:
let url = "https://www.google.com"; let web = new WebView(); await web.loadURL(url); let elm = 'document.getElementsByTagName("html")'; log(await web.evaluateJavaScript(elm, true));
I’m wondering how to get scriptable not to throw error messages saying that the evaluateJavaScript is returning an unsupported type.
r/Scriptable • u/hrb7 • Nov 01 '21
r/Scriptable • u/jayelevy • Nov 01 '21
I’m seeking a source for local allergen data (pollen counts, etc). Any recommendations?
I realize there is an example in the Scriptable gallery using PurpleAir.com. That data source does not seem to have the data of interest to me.
thanks
r/Scriptable • u/hrb7 • Oct 30 '21
It shows the actual Slack Status via API. It's available as small widget with simple status info or as medium/large widget which shows the current status in detail. Twitter Post
r/Scriptable • u/leo848blume • Oct 30 '21
r/Scriptable • u/wicke79 • Oct 28 '21
Hey guys,
I want to start a centralized place where all information in the context of scriptable will come together.
often I'm looking to get some help about scriptable, but often there are no examples or code snippets which I could adapt to my problem.
So there I am thinking about code snippets for scriptable, examples for widgets and other useful links. Maybe you have some more ideas for topics in this hub.
https://github.com/wickenico/scriptable-hub
For me Scriptable is one of the best apps for iOS and I want to grow the community and help others to create more beautiful and helpful widgets!
If you have ideas for content, code snippets or widgets you love just let me know right here in the comments or on the issues tab at GitHub :)
Everyone is welcome to be a part of it.
Maybe we can build it analogous to this similar page:
https://github.com/30-seconds/30-seconds-of-code
Thanks in advance to all!
r/Scriptable • u/legendgodgod • Oct 29 '21
It seems a simple request but I failed to find a sample script.
I need to download a mp3 file from url (e.g. https://targetsite.com/test.mp3) by using Scriptable.
Could you please advise?
r/Scriptable • u/robertandrews • Oct 27 '21
Are there any Scriptables to add blank icons to my Home Screen, as space fillers?
I know about apps for this purpose, but I don’t like that they basically use cutouts of wallpaper to make it happen. Predicting icon position is hard.
Surely Scriptable can leverage actual transparency?
r/Scriptable • u/kat0id • Oct 26 '21
Has anyone created a widget that counts down to the next event/ meeting in their calendar? I’m new to Scriptable so thought I’d ask in case something already exists.
I’m not looking for a countdown where you input a date - I would like something that syncs with my calendar (and updates if a meeting changes/ is cancelled).
I’m currently using a Spark app widget, but the sync is very iffy. Other than that it’s exactly what I’m hoping for - https://imgur.com/a/WDR7Tfp
r/Scriptable • u/wicke79 • Oct 25 '21
r/Scriptable • u/vgxx • Oct 25 '21
Anybody know of a scriptable widget for Apple Books?
r/Scriptable • u/zivi7 • Oct 21 '21
In Germany, the scriptable gallery includes a nice widget with the latest news from a popular broadcaster. However, it doesn’t hyphenate very long words in the news titles it pulls from the broadcaster‘s API. Is there a simple way a noob like me could add that?
r/Scriptable • u/hrb7 • Oct 17 '21
How do I add a image to a push notification? Especially in the shortcut function „Run Inline Script“. It looks like the options „Images“ and „Files“ don’t work.
r/Scriptable • u/Tasty-Albatross-5624 • Oct 17 '21
Hi,
I'm trying to understand Scriptable's memory limitation on the number of stacks. I did a simple test with this piece of code:
const max = 175; const widget = new ListWidget(); widget.setPadding(0, 0, 0, 0) widget.addText(max.toString()); let main = widget.addStack(); main.layoutHorizontally();
for(let i = 1; i < max; i++) { let s = main.addStack(); s.addText(i.toString()); s.borderWidth = 1; s.borderColor = Color.red(); main.addSpacer(1); }
Script.setWidget(widget);
When I exceed 165 stack the widget no longer updates.
I also use Widgy to make other widgets and we don't seem to face that kind of limitation.
Is the limit in memory or in number of layers?
Thanks.
r/Scriptable • u/psvburner • Oct 17 '21
Updated to a new iPhone 13 and after setting up, I’m getting this error for the Weather Cal Widget.
I’ve done some digging but can’t find any documentation on iOS issues or anything. I’ve also tried to use a new api key to no avail.
100% honesty I’m not savvy with JS at all, so any insight into what this means would be greatly appreciated.