OSX bundle id collides with base electron app, making basic applescript automations open the Electron starter app.
See original GitHub issueAttempting to automate windows with applescript causes the base electron app on the system to run, making it difficult to make VSCode an active window. VSCode shares a bundle ID with the base electron app “com.github.electron”, which causes OSX System Events to be confused with which app to activate.
- VSCode Version: 1.21.1
- OS Version: High Sierra 10.13.3
Steps to Reproduce:
- Have a project with electron in its node_modules somewhere on your system.
- Start VSCode
- Run this applescript which gets processes, and checks for windows. The variable appa gets set to the bundle ID “Electron” which confuses OSX.
on getWindows(appa)
tell application appa
set idList to null
set nameList to null
try
set idList to the id of every window
end try
try
set nameList to the name of every window
end try
end tell
return idList & nameList
end getWindows
tell application "System Events"
set openApps to {name, unix id, title} of (processes where background only is false)
end tell
set processList to item 1 of openApps
repeat with i from 1 to length of item 1 of openApps
set item i of processList to {|name|:item i of processList, title:item i of item 3 of openApps, pid:item i of item 2 of openApps, |windows|:getWindows(item i of processList), id:id of application (item i of processList)}
end repeat
processList
Does this issue occur when all extensions are disabled?: Yes
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Mac Automation Scripting Guide: Automating the User Interface
In System Events, the process class represents a running app. Listing 37-1 shows how to target an app using this class. APPLESCRIPT. Open...
Read more >Mac App Store Submission Guide - Electron
Mac App Store Submission Guide. This guide provides information on: How to sign Electron apps on macOS;; How to submit Electron apps to...
Read more >Need to ask for AppleScript permissions in an electron app
All I am using these permissions for are to get URL's so if there is a simpler way to do that I am...
Read more >Mac problem-solving - The Eclectic Light Company
For older articles about previous versions of OS X, see this article. For basic help with managing problems, see my Mac Troubleshooting Summary....
Read more >Script to open url in browser - Caritas Castellaneta
Mac : Command + Shift + C. start https://stackoverflow. ... If you hate using Electron-based applications, perhaps you can still read about Min...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Got it, we can change that.
Unfortunately I’m going to have to close this as I can’t get a successful update flow working with Squirrel after renaming the executable. I do want this fixed, but not at the cost of breaking the updates for every macOS user. It’s too late. 😢