
Originally Posted by
Freddie
You can't use <If> in a command. It can only go in a hotkey. You can call a hotkey from a command with <DoHotkey> .
Yeah I found that out right after i posted that sorry. What i did instead was just do
Code:
<Command AutoExec>
<CreatePanel HKN 0 35 45 55>
<TargetWin HKN>
<AlwaysOnTop on>
<CreateColoredButton ON 0 0 30 30 0xff0f0f 0x000000 ???>
<AddButtonToPanel ON HKN>
// i added below
<TurnHotkeysOn>
<SetButtonColors ON 0x00FF00 0x0F0F0F>
<SetButtonText ON HKN>
<TargetWin HKN>
<AlwaysOnTop on>
<UpdateWin>
<hotkey pause>
<sendpc local>
<If HotkeysAreOff>
<TurnHotkeysOn>
<SetButtonColors ON 0x00FF00 0x0F0F0F>
<SetButtonText ON HKN>
<Else>
<TurnHotkeysOff>
<SetButtonColors ON 0x0F0F0F 0x00FF00 >
<SetButtonText ON off>
<endif>
<TargetWin HKN>
<AlwaysOnTop on>
<UpdateWin>
So that it turns them on if there off which if i am loading script i want them enabled anyway so. Course it gives error if there already on but no biggy. Also changed pause hoykey to not need the dohotkey.
Thanks for the help
Connect With Us