jagt / clumsy

clumsy makes your network condition on Windows significantly worse, but in a controlled and interactive manner.
http://jagt.github.io/clumsy/
Other
5.22k stars 516 forks source link

Hotkey Help #53

Open Masterofthiefs opened 6 years ago

Masterofthiefs commented 6 years ago

Can someone please make a hotkey for the start/stop button, I have tried Autohotkey but with my extremely limited knowledge of coding in any sense or form. I can't figure it out myself thanks in advance if this is possible and if not sorry for the bother.

ghost commented 5 years ago

For autohotkey. isEnabled = 1

NoEnv

InstallKeybdHook

UseHook On

Warn ; Enable warnings to assist with detecting common errors.

SingleInstance

SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. Process, Priority,,H If not A_IsAdmin { Run *RunAs "%A_ScriptFullPath%" ExitApp Sleep, 3000 }

v:: ControlClick,Button2,clumsy 0.3,,,, ControlGet, gt, Enabled ,, Button2, clumsy 0.3 if (gt=1) { Soundbeep,1000,200 } else { Soundbeep,500,200 }

For autoit3.

RequireAdmin

HotKeySet("!v",Clumsy)

Func Clumsy() ControlClick("clumsy 0.3","","Button2") if ControlCommand("clumsy 0.3","","Button2","isEnabled") = 1 then Beep(500,100) Else Beep(100,100) EndIf EndFunc

While(1) Wend

Late but!. Recently discovered my inner power i could write sh*t like this in 1 day I recommend to use the autoit script as i see autohotkey as an inferior language btw the hotkey is alt+v edit: nvm in some aspects autohotkey is superior edit2: got back into uh editing and somehow i got better by doing absolutely nothing the only reason i used autoit was becuz it was faster searching pixels lul edit3: ah yes ignore the autoit3 one it is obsolete now unless the program doenst allow autohotkey also i dont know how to use comas

yakubxyz commented 3 years ago

@Lasloow is the code still functional? I had some problems running it if you could help

Auzgame commented 6 months ago

For those looking for hotkeys I posted a version of Clumsy with hotkeys built in: [here](https://github.com/Auzgame/clumsy0.3-with-keybinds)