Describe the bug
When defining a JS script using "External file (Create New)", the Custom Context Menu doesn't reflect updates made to the external script.
Steps to reproduce
Create a "Show Custom Context Menu (NEW)".
Toggle on "Retrieve Contents Dynamically Via JavaScript / JSON"
Select "External File (Create New).
Modify the JS script such that the Custom Context Menu shows different output. e.g. uppercase all titles:
Triggering the Custom Context Menu doesn't show the updated JSON:
Change the "External file (Create New)" setting to "Inline".
Triggering the Custom Context Menu now correctly shows the updated JSON:
If you delete the "Custom Context Menu (NEW)" Action, create a new one, and then select "External File (Choose Existing)", the Custom Context Menu still doesn't reflect the update JSON:
Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):
Keyboard Shortcut
Device information:
Device : MacBook Pro (14-inch, 2021)
macOS : 15.2 (24C5073e)
BTT Version : 4.881 (2024111705)
Alpha : 0 update(s) behind latest Alpha version 4.881 (2024111705).
Regular : Installed version is ahead of latest Regular version 4.839.
Additional information (e.g. crash logs, related issues, etc.):
Describe the bug:
Changes in AppleScripts are saved, but the previous version is still executed. A restart does not help.
The only option is to delete the entry and create a new one.
Device information:
Type of Mac: MacBook Pro M2 Max
macOS version: 15.0.1
BetterTouchTool version: 4.811
I'm reporting two issues with the "Real JavaScript" action configuration UI:
When you choose an Existing File to save your action to, the file gets overwritten with the boilerplate contents of the inline text field.
The contents of the "Async function to call" field don't get saved when the field loses focus. Instead, the field often resets to its previous value.
Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.): N/A
Screenshots
Device informatioβ¦
Downloaded version 4.881 and the problem has been fixed. Great!!
If I select "Source Type: Apple Script" option, I select "External File (Choose existing)", and I select the external scpt file in the desktop, it doesn't work.
I have not yet implemented the simple format support for external files so it will just fallback to the default code.
I'll work on this later!
1 Like
Support for external scripts is now added to floating menus, custom context menus and the choose from list action in 4.882 (uploading)
1 Like
Thanks @Andreas_Hegenberg !
Based on my testing of custom context menus:
"External File (Create New) " works
"External File (Choose Existing) " does not work
Do you see the same behavior?
Device information:
Device : MacBook Pro (14-inch, 2021)
macOS : 15.2 (24C5073e)
BTT Version : 4.882 (2024111801)
Alpha : 0 update(s) behind latest Alpha version 4.882 (2024111801).
Regular : Installed version is ahead of latest Regular version 4.839.
you are right! Fixed in 4.883 (uploading)
Confirmed that "External File (Create New) " and "External File (Choose Existing) " both work for Custom Context Menus on 4.883
!
Thank you Andreas!
1 Like