Close
Showing results 1 to 1 of 1
  1. #1

    Default HotKeyNet Additions

    There are a few things I am working on. For now figured I would share the following. This is for HotKeyNet like the title says.

    What these do:

    * Creates a menubar with the buttons [ Create | Assign | Order | [X] ]

    * Create - Automatically launches, creates windows for two instances of WoW. If You close one WoW just click 'Create' to only create the missing one.

    * Assign - Puts the two instances of WoW in a mini side-by-side view with the button 'Master' across both windows. Selecting either button puts that window as Master. Renaming them both appropriately in that change.

    * Order - Puts the two instances of WoW in a given order on the screen.

    * [X] - Terminates the script.

    I tried to add checks and balances across buttons and functions. So if someone or something goes out of order from the expected. That it handles it with grace. If there are ways to make it nicer please feel free to modify it. Even though this is using just two instances. It was my hope to create a flexible framework. That would extend to multi-boxers of all types. For now the main Assign function is just 'Master'. I will later on add more to all this. For example:

    [ Master, Clone1, Clone 2, Clone 3, Clone 4 ]

    Then just re-assigning things based on what is selected from that menu. For now it just says 'Master'.
    Code:
    <Command AutoExec>
       <CreatePanel P1 0 0 0 0>
          <SetPanelLayout P1 4 0 50 35>
             <CreateButton B1 0 0 0 0 Create>
             <CreateButton B2 0 0 0 0 Assign>
             <CreateButton B3 0 0 0 0 Order>
             <CreateButton B4 0 0 0 0 [X]>
                <AddButtonToPanel B1 P1>
                <AddButtonToPanel B2 P1>
                <AddButtonToPanel B3 P1>
                <AddButtonToPanel B4 P1>
                   <SetPanelStyle P1 Frameless>
                      <SetButtonHotkey B1 Hotkey Ctrl Alt F1>
                      <SetButtonHotkey B2 Hotkey Ctrl Alt F2>
                      <SetButtonHotkey B3 Hotkey Ctrl Alt F3>
                      <SetButtonHotkey B4 Hotkey Ctrl Alt F4>
                         <TargetWin P1>
                            <ClickMouse Screen 25 15>
                               //<HideWin>
    
    <Command LaunchAndRename>
       <SendPC %1%>
          <Run %2%>
             <RenameTargetWin %3%>
    
    <Command BHide>
       <TargetWin M1>
          <AlwaysOnTop off>
             <HideWin>
       <TargetWin M2>
          <AlwaysOnTop off>
             <HideWin>
    
    <Command MasterPos> // Master Window
       <SetWinRect 210 10 1200 1000>
    
    <Command WinPos> // Ordered Windows
       <TargetWin WoW2> // right
          <SetWinRect 180 40 900 700>
       <TargetWin WoW1> // left
          <MasterPos>
    
    <Hotkey Ctrl Alt F1>
       <If ActiveWinIs P1>
          <If WinDoesNotExist WoW1>
             <LaunchAndRename Local "C:\Users\Public\Games\World of Warcraft\Wow.exe" WoW1>
          <Endif>
          <If WinDoesNotExist WoW2>
             <LaunchAndRename Local "C:\Users\Public\Games\World of Warcraft\Wow.exe" WoW2>
          <Endif>
          <Wait 5>
             <WinPos>
    
    <HotKey Ctrl Alt F2>
       <If ActiveWinIs P1>
          <If WinDoesNotExist WoW1>
             <LaunchAndRename Local "C:\Users\Public\Games\World of Warcraft\Wow.exe" WoW1>
          <Endif>
          <If WinDoesNotExist WoW2>
             <LaunchAndRename Local "C:\Users\Public\Games\World of Warcraft\Wow.exe" WoW2>
          <Endif>
          <Wait 5>
          <TargetWin WoW2> // right
             <SetWinRect 720 50 700 600>
                <If WinDoesNotExist M2>
                   <CreateButton M2 720 80 50 35 Master>
                <Endif>
          <TargetWin M2>
             <ShowWin>
                <AlwaysOnTop on>
                   <SetButtonHotkey M2 Hotkey Ctrl Alt F10>
          <TargetWin WoW1> // left
             <SetWinRect 5 50 700 600>
                <If WinDoesNotExist M1>
                   <CreateButton M1 5 80 50 35 Master>
                <Endif>
                   <TargetWin M1>
                      <ShowWin>
                         <AlwaysOnTop on>
                            <SetButtonHotkey M1 Hotkey Ctrl Alt F9>
    
    <HotKey Ctrl Alt F3>
       <If ActiveWinIs P1>
          <If WinDoesNotExist M1>
             // do something
          <Else>
             <BHide>
          <Endif>
             <WinPos>
    
    <HotKey Ctrl Alt F4>
       <If ActiveWinIs P1>
          <WinPos>
             <UnloadScript>
    
    <HotKey Ctrl Alt F10> // right
       <If ActiveWinIs M2>
          <TargetWin M1>
             <AlwaysOnTop off>
                <HideWin>
          <TargetWin M2>
             <AlwaysOnTop off>
                <HideWin>
                   <RenameWin WoW1 BWoW>
                   <RenameWin WoW2 AWoW>
                   <RenameWin AWoW WoW1>
                   <RenameWin BWoW WoW2>
          <WinPos>
    
    <HotKey Ctrl Alt F9> // left
       <If ActiveWinIs M1>
          <BHide>
             <WinPos>
    Personally. And some may freely disagree the flexibility in design is far greater in AutoHotKey. Though HotKeyNet has better interactivity with WoW itself than the former. If AutoHotKey had this better interactivity. Truthfully I feel there would be no use or need for HotKeyNet. Yes it allows for some shorthand scripting to take place. However, the greater scope of AutoHotKey is well in place. They both have their ups and downs. Like any program. HotKeyNet right now seems to work more fluid especially with WoW. On my machine the noted was very true. HotKeyNet has a more up and running feel. It also allowed for greater shorthand scripting to keep with the up and running feel. I just sort of miss the flexibility of AutoHotKey.
    Last edited by Darkreign11 : 09-18-2012 at 03:17 AM

Posting Rules

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