Close
Page 2 of 2 FirstFirst 1 2
Showing results 11 to 12 of 12
  1. #11

    Default

    Quote Originally Posted by Freddie View Post
    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
    Last edited by lorddread : 03-04-2010 at 03:32 AM

  2. #12

    Default

    Quote Originally Posted by Freddie View Post
    This is a well known workaround. Many people do this, and I've been recommending it for a long time. Thanks for suggesting that it should be documented.. I just added it to five or six pages on the website.

    Here's a useful, related trick. Both the operating system and HotkeyNet recognize dozens of keys that don't exist on Western keyboards. People can use these keys as triggers when they define hotkeys that will be used as subroutines with DoHotkey. That way they don't "lose" any real key combinations that they might want to press with their fingers. Here are some keys that can be used this way. If people define some of these "non-existent" keys as modfiers, they can make millions of hotkey triggers. (Triggers can contain up to sixteen modifiers.)

    Code:
    OemAX
    Oem102
    IcoHelp
    Ico00
    ProcessKey
    IcoClear
    Packet
    OemReset
    OemJump
    OemPa1
    OemPa2
    OemPa3
    OemWsCtrl
    OemCuSel
    OemFinish
    OemCopy
    OemAuto
    OemEnlw
    OemBackTab
    Attn
    CrSel
    ExSel
    EREOF
    WOOT!!

    Cool, there is a good solution for my nested If-Cases
    I haven't found this info on hotkeynet.com.
    I don't suffer from Schizophrenia, I enjoy every moment of it !

Tags for this Thread

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •