Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Having problems with quickly closing a macro
#5
Thank you very much!
This one works flawlessly:
Quote:This should work.
 
Code:
 
Code:
Copy      Help
// script "BF6 spacebar.cs"
/*/ ifRunning end; /*/
script.setup(trayIcon: true, sleepExit: true, exitKey: KKey.MediaStop);

opt.key.KeySpeed = 15;
opt.key.NoBlockInput = true;
opt.key.NoModOff = true;

while (true)
{
    keys.send("Space");
}
My next and final question is; how do i get the sound.speak("Toggle Off"); to play after the macro is toggled off in this code?
 
Code:
Copy      Help
/*/ ifRunning end; /*/
script.setup(trayIcon: true, sleepExit: true, exitKey: KKey.MediaStop);

opt.key.KeySpeed = 15;
opt.key.NoBlockInput = true;
opt.key.NoModOff = true;

while (true)
{
    keys.send("Space");
}
sound.speak("Toggle Off");
Im getting a compilation error at sound.speak();
Compilation: 1 warnings >>
    Warnings can be disabled with C# #pragma warning or in Properties.
BF6 Spacebar2.cs(12,1): warning CS0162: Unreachable code detected

The sound effect is not being read before the script closes.


Messages In This Thread
RE: Having problems with quickly closing a macro - by AshesOfHegemony - 10-17-2025, 04:09 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)