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

    Question [HKN] 2 code snippets not working...

    Hey guys, needing some help on finishing off this script for 3 clients, with automated drop in of bnet email & pw, so hitting the launch hotkey starts 3 clients and drops in everything, when the dust settles you just pick the team you want and hit enter to log them in. That's problem 1. Problem 2 I'm having is getting the windows to line up properly. It should be, WoW1 in maximized mode on monitor1 and WoW2 & WoW3 in 640x508 window size on the left side of monitor2.

    Code:
    //================================================================
    // SAMPLE SCRIPT FOR TWO WOW'S ON ONE PC
    //
    // Instructions: Copy this entire script (all the blue writing
    // on gray background including comments). Save it in a file.
    // Load it into HotkeyNet.
    //
    // Toggle the scroll lock key to turn hotkeys off and on. (You
    // can change this if you want, just like you can change
    // everything else with HotkeyNet.)
    //
    // Requires HotkeyNet build 147 or higher.
    //
    // For more info, go to www.hotkeynet.com
    //================================================================
    
    //-----------------------------------------------------------
    // PRESS CTRL R TO RENAME WOW'S IF YOU LAUNCH THEM MANUALLY
    //-----------------------------------------------------------
    <Hotkey ScrollLockOn Ctrl R>
        <SendPC local>
            <RenameWin "World of Warcraft" WoW1>
            <RenameWin "World of Warcraft" WoW2>
            <RenameWin "World of Warcraft" WoW3>
    
    //-----------------------------------------------------------
    // SUBROUTINE TO LAUNCH AND RENAME A COPY OF WOW.
    //-----------------------------------------------------------
    <Command LaunchAndRename>
       <SendPC %1%>
          <Run "c:\WoW1\Wow.exe">
            <RenameTargetWin %2%>
    
    //-----------------------------------------------------------
    // HOTKEY TO LAUNCH AND RENAME BOTH WOW'S.
    //-----------------------------------------------------------
    <Hotkey ScrollLockOn Alt Ctrl L>
        <LaunchAndRename Local WoW1>
        <LaunchAndRename Local WoW2>
        <LaunchAndRename Local WoW3>
    //-----------------------------------------------------------
    // Initial window positions
    //-----------------------------------------------------------
    <Hotkey F1>
       <TargetWin WoW1>
          <SetWinPos 0 0>
          <SetWinSize 1280 666>
          <RemoveWinFrame>
      <TargetWin WoW2>
           <SetWinPos 1280 0>
           <SetWinSize 640 508>
           <RemoveWinFrame>
      <TargetWin WoW3>
           <SetWinPos 1280 508>
           <SetWinSize 640 508>
           <RemoveWinFrame>
    //-----------------------------------------------------------
    // Shift-alt-L launches both instances and logs in
    //-----------------------------------------------------------
    <Hotkey Alt Ctrl L>
        <LaunchAndRename Local WoW1 0 0 1280 1024 email1 password1>
        <LaunchAndRename Local WoW2 1280 0 640 508 email2 password2>
        <LaunchAndRename Local WoW3 1280 508 640 508 email3 password3>
    //-----------------------------------------------------------
    // DEFINE MAIL LABELS FOR SENDING KEY STROKES
    //-----------------------------------------------------------
    <Label w1 Local SendWinM WoW1>
    <Label w2 Local SendWinM WoW2>
    <Label w3 Local SendWinM WoW3>
    //-----------------------------------------------------------
    // DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
    // SENT TO BOTH WOWS. ADD MORE KEY COMBO'S IF YOU WANT.
    //-----------------------------------------------------------
    <Hotkey ScrollLockOn A-Z, 0-9, Plus, Minus, Tab, Esc, F1-F12 except W, A, S, D, Q, E>
    <SendLabel w1, w2, w3>
    <Key %Trigger%>
    //-----------------------------------------------------------
    // DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW'S.
    // ADD MORE KEYS IF YOU WANT.
    //-----------------------------------------------------------
    <MovementHotkey ScrollLockOn up, down, left, right>
    <SendLabel w1, w2, w3>
    <Key %Trigger%>
    
    //-----------------------------------------------------------
    // BROADCAST MOUSE CLICKS. HOLD DOWN OEM3 (ON U.S. KEYBOARDS,
    // THAT'S THE SQUIGGLE KEY IN UPPPER LEFT CORNER) WHEN YOU
    // WANT TO BROADCAST.
    //-----------------------------------------------------------
    <UseKeyAsModifier Oem3>
    
    <Hotkey ScrollLockOn Oem3 LButton, MButton, RButton, Button4, Button5>
       <SendLabel w1, w2, w3>
          <ClickMouse %TriggerMainKey%>
    There's my full code. Right now, the three clients launch, all in 640x508 window size smack in the middle of monitor1. When I had in the actual emails and passwords, they didn't drop in either... all 3 clients had my primary email and no passwords in them. Note: I run with three seperate emails, passwords, and battle.net accounts I'm not sure how much of a difference this would make to anyone trying to help, but there you have it. Hence why it's email1 email2 and email3 (same for passwords). Oh yes, I dual monitor 19' both at desktop resolution of 1280x1024. If you need any more info, please let me know. Thanks!

    P.S. I'm in no way a coder btw... peanut-butter n jelly terms work best for me. =)

    Tovya

  2. #2

    Default

    If a mod could delete this topic, I would appreciate it. I think I'm going to stick with the easier setup of IS. With school and work, I just don't have the time to dedicate to learning the HKN syntax (to HKN - It was easy to install and get running though, just the specific more advanced options I wanted to use I need to learn the code syntax!)

    Tov

  3. #3

    Default

    sorry you feel HKN is not the answer for you. I like what they offer.

    I see you screens were not set to how you wanted:

    Code:
     
    I think you want :      | 2
                          1 |--
                            | 3
    Your script is like: 1
                       2 | 3
    Others can load your script and help other who like to use 3 toons on two monitors. I took the lazy way and set up for 5 and left 4 & 5 blank.
    Last edited by alcattle : 11-16-2009 at 03:41 AM
    RAF Tour Guide files are obsolete, I went to Zygor
    MultiBoxers play with themselves

  4. #4

    Default

    Well i dont use HKN2 I use HKN also dont really use subroutine
    But this is what i have
    use 2 directories so the main is in 1 by him self and the 2 slaves on the other
    so the master only needs the password and the 2 slaves use the account name and password

    and ive writen this to rename the windows send the usernames and passwords and then rename the window again so that there can never be a mistake made where your account name or password is sent into the ingame chat they will only work at the log in screen
    it positions the windows as such
    main is on left screen full screen and slaves each take up 1 quarter of the right screen top left corner for slave 1 and bottom left corner for slave 2

    The f12 hotkeys are never meant to be used alone they are always triggered by the Rctrl apps hotkey and it all goes to work

    and if 1 or more windows crash ive set it up so that you can trigger rctrl apps hotkey again with the window or windows that have not crashed still running and it will find the missing window and replace it and log you in again but do nothing to the windows that are still running


    so here is my code
    Code:
    <Hotkey rctrl f12>
     <sendpc Local>
      <If WinDoesNotExist "wow1">
       <Run "C:\program files\World of Warcraft\wow.exe">
        <RenameTargetWin WOW1>
         <RemoveWinFrame>
          <SetWinPos 0 0>
         <SetWinSize 1280 1024>
        <sendwin WOW1>
       <text Password>
      <key enter>
     <renamewin WOW1 wow1>
    <Label w1 Local SendWinM wow1>
    
    <Hotkey ralt f12>
     <sendpc local>
      <If WinDoesNotExist "wow2">
       <Run "c:\Program Files\World of Warcraft 2\wow.exe">
        <RenameTargetWin WOW2>
         <RemoveWinFrame>
          <SetWinSize 640 500>
           <SetWinPos 1290 10>
            <wait 4000>
             <sendwin WOW2>
              <text User name>
               <wait 1000>
              <key tab>
             <wait 1000>
           <text Password>
          <key enter>
         <wait 3000>
        <key down>
       <wait 1000>
      <key enter>
     <renamewin WOW2 wow2>
    <Label w2 Local SendWinM wow2>
    
    <Hotkey rshift f12>      
     <sendpc local>
      <If WinDoesNotExist "wow3">
       <Run "c:\Program Files\World of Warcraft 2\wow.exe">
        <RenameTargetWin WOW3>
         <RemoveWinFrame>
          <SetWinSize 640 500>
           <SetWinPos 1290 520>
            <wait 4000>
             <sendwin WOW3>
              <text User name>
               <wait 1000>
               <key tab>
              <wait 1000>
             <text Password>
            <key enter>
           <wait 3000>
          <key down>
         <wait 1000>
        <key down>
       <wait 1000>
      <key enter>
     <renamewin WOW3 wow3>
    <Label w3 Local SendWinM wow3>
    
    
    <Hotkey rctrl Apps>
     <If WinDoesNotExist "wow1">
      <DoHotkey Hotkey rctrl f12>
       <wait 1000>
    <If WinDoesNotExist "wow2">
     <DoHotkey Hotkey ralt f12>
      <wait 1000>
    <If WinDoesNotExist "wow3">
     <DoHotkey Hotkey rshift f12>
    I may also post this in its own thread to help some others with the new Bnet loggin problems they r having
    Last edited by Boogieman : 12-11-2009 at 03:08 AM

  5. #5

    Default

    Very slick solution, thanks for sharing!
    Team Riff Raff
    Scoundrel
    Nasty
    Delinquent
    Juvenile

    Four Orcs with an Attitude!

Posting Rules

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