254 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-1
votes
1
answer
48
views
Remove sheet from Excel with JXA
Trying to remove a sheet using JavaScript for Automation on macOS
These:
var removeSheets = (sheet_names) => {
var Excel = Application("Microsoft Excel");
Excel.activate();
...
1
vote
0
answers
52
views
Equality between objects in Applescript and JXA (trying to find the current slide in Keynote)
I am trying to find what is the selected slide in the active Keynote presentation via scripting. Just using the slide number does not work, because it's -1 on ANY hidden slide.
Things work ok in ...
0
votes
1
answer
54
views
How to convert "count of displays" from AppleScript to JXA?
I am learning JXA and I am a bit confused about even basic syntax.
I want to convert this very basic code from AppleScript to JXA. What to do?
tell application "Image Events"
set ...
0
votes
1
answer
96
views
How do I export a photo from apple photos using JXA?
I'm trying to use javascript-for-automation on my Mac to export images from Apple Photos but I can't get around a Can't convert types error.
The problematic line in my code is Photos.export( { export: ...
0
votes
1
answer
60
views
JXA Javascript-automation parse CSV file into array
I'm using JXA in Script Editor on a Mac. I'm trying to parse a CSV file into an array. I am able to do it with the code below, however the array includes all the formatting information of the CSV ...
2
votes
1
answer
3k
views
Mac Automation - AppleScript, JavaScript for Automation (.JXA), and JavaScript (.JS)
I learned AppleScript last year and it's gone pretty well. After discovering BetterTouchTool, I learned about utilizing JXA or JS for automating tasks.
I can make sense of the .jxa documentation on ...
1
vote
1
answer
794
views
Delete metadata descriptions with a Photoshop Script?
Is there an equivalent of deleteProperty(XMPConst.NS_DC, "description") or some way to clear out EXIF:ImageDescription, XMP-dc:Description and IPTC:Caption-Abstract with a Photoshop Script (ie, ...
0
votes
1
answer
101
views
Check if background value exists for JXA/Applescript for Numbers
I'm using JavasScript to write the script for Numbers automation. I believe its called JXA in this context? Based on: https://leancrew.com/all-this/2022/05/javascript-vs-applescript/
Anyway here's a ...
0
votes
1
answer
129
views
Delete Subfolders in Photos via Applescript or JXA not possible?
I'm stuck, since I found no way to delete a subfolder in Apple's Photos. Neiter via Applescript nor with JXA.
The deletition of folders on top level is no problem, but trying to delete subfolders (...
-1
votes
1
answer
83
views
escaping an apostrophy in a jxa doshellscript
in a jxa script i am running a shell script that runs osascript with mulitple -e arguments containing a multiline applescript which normally work just fine. this one will not work however. the ...
0
votes
1
answer
404
views
JXA keystroke does not work with numbers?
I would like to trigger a keyboard shortcut using JXA.
This works:
system.keystroke('d', {
using: ['control down', 'option down']
})
But this does not:
system.keystroke('3', {
using: ['control ...
3
votes
2
answers
1k
views
Webdriver.IO[7] : SwitchToFrame with css selector is not working
I want to click web element inside the iframe and trying to switch to respective iframe before clicking to web element.
browser.switchToFrame(number) - switch to iframe with number is working but ...
0
votes
1
answer
458
views
Webdriver.IO[7] : How to check current iframe context before switching to any other iframe
I want to click element inside the iframe.
I would like to know the current iframe context or How many iframe present before switching to any other iframe.
How to check current iframe context in WDIO[...
0
votes
0
answers
1k
views
Adding a music to Apple Music Library using Apple Script
I have an AppleScript, which duplicates the currentTrack to my AppleMusic Library. Although, it seems that the Library has a capacity of (length of the library + 1), and whenever I add a new track ...
0
votes
1
answer
378
views
JXA: Manipulating windows by their ID
Instead of
Application("Preview").windows[0].bounds = {"x": 1440, "y":25, "width":1440, "height": 2535}
I'd like to move the window but instead of ...