Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Having problems with quickly closing a macro
#1
Im trying to learn LibreAutomate. I created small macro to spam spacebar every 20 milliseconds. I set it to toggle on hotkey press (Shift + Numpad+). It works and runs as intended, but if i run it for longer than a few seconds it takes multiple attempts to toggle it off. I'm not sure what im doing wrong here or if this is a limitation of the LibreAutomate itself?
 
Code:
Copy      Help
/*/ ifRunning end; /*/
script.setup(trayIcon: true, sleepExit: true, exitKey: KKey.MediaStop, pauseKey: KKey.MediaPlayPause);

sound.speak("Toggle On");
bool toggle = false;
while (!toggle)
{
    keys.send("Space");
}
The hotkey is assigned in the "hotkey triggers" file
 
Code:
Copy      Help
using Au.Triggers;

partial class Program {
    [Triggers]
    void HotkeyTriggers() {
        var hk = Triggers.Hotkey;
        
        //Add hotkey triggers here.
        //To add triggers can be used triggerSnippet or menu TT > New trigger.
        //To add trigger scopes (window, program) can be used Ctrl+Shift+Q.
        //Click the Run button to apply changes after editing.
        //More info in Cookbook.
        
        hk["Ctrl+Shift+T"] = o => Triggers.ShowTriggersListWindow();

        hk["Shift+Add"] = o => script.run(@"Game Spacebar.cs");

..........
Any help would be appreciated.


Messages In This Thread
Having problems with quickly closing a macro - by AshesOfHegemony - 10-17-2025, 05:30 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)