Floating HTML Settings Menu

in-progress
feature-request

#41

do you have an easy example for something that doesn't update correctly?


#42

Sure. The menu bar is a key thing to watch, because several items change when applying a preset.

GC's GC-BTT has Caffeinate and Connect AirPods enabled, which the Default preset does not. So, you should be able to see these two menu bar items appear after applying the preset if the "Check All Settings" script is running correctly.

If I click GC's GC-BTT in the settings web view, BTT crashes. If I run the script manually, nothing seems to happen. Eventually, upon BTT restart, it will have been partially applied.


#43

Ah that is probably not related to the performance improvements. I think there might be a dead lock somewhere due to how macOS executes Apple Script. I'll check how/if this can be fixed.

Is this only when executing it from the Web View or have there been other changes in the script?


#44

Unfortunately I think there is no easy solution to this problem.
In v2.685 alpha I added a new trigger function "trigger_named_async_without_response" that can be accessed using apple script or using the webview. If possible always use that instead of "trigger_named". It will not be able to get the result of the apple script attached to a named trigger, but it should not hang when calling apple script inside of apple script.


#45

If I understand correctly, as of v2.685 it'll be better to always use trigger_named_async_whitout_response when we don't care about what is returned by particular trigger? I dont' understand the issue completely and I'm trying to get the bottom line of it :thinking:


#46

Honestly, that's fine because I can always just get the value of the variable after the script runs, right? Gonna try this out now, step one is just making sure the buttons work at all lol.

EDIT: Okay, looks like it's working! I was able to successfully switch to GC's GC-BTT. The process was very slow, and I haven't gotten the progress bar working yet, but it finished running and refreshed the display of everything at the end. I'm curious if this behavior will prevent me from being able to display the progress bar? We'll find out...

EDIT2: Seems to only work some of the time. Try swapping escape key styles in this latest working copy @Andreas_Hegenberg: GoldenChaos-BTT.bttpresetcompressed.bttpresetcompressed (20.1 MB)

(On an unrelated note, can the bug that appends "bttpresetcompressed" twice be fixed? It's very annoying :P)


#47

The first version of this is now out! I still haven't hooked up everything, but all the buttons should trigger their respective actions, making it technically usable!

If you wanna give it a shot, head over to the release thread and grab the latest experimental version.