Log in

View Full Version : New MB'er with some macro/HKN issues



WarBird69
04-06-2009, 06:01 AM
First of all, a big thanks to everyone who wrote any of the newbie guides. They have been a big help thus far, but I think I've reached a road block.



I'm running 2 shaman on one machine using HotKeyNet. Before 2 days ago, I'd never multi-boxed, used macros, or even remapped any keys. I think I've got most of the basics figured out, but I'm attaching my HKN script for review just incase there are any issues inside. I can get both shaman to cast lightning bolt based off a focus, but not much else. I can't seem to figure out a viable totem macro where ShamanA drops Totem A and shamanb drops totem b, not without placing the individual totems on the action bars but space seems like it will be a premium the higher I go. An interesting problem sorta related to this is I have Beserking (troll racial) in button 10, bound to Plus on ShamanA, with Blood Fury (orc racial) in the same spot bound to the same key on ShamanB. Pressing Plus fires off Beserking but not Blood Fury on the slave. Should I make a macro instead of just placing the desired spell in the slot?



A second issue is probably buried in my HKN script. I have PIP setup to activate when I press F1. It works mostly, but there is a large gap around window2 in which I can see my desktop. I've tried resizing/moving Window2, but doing so seemed to make things worse.



Again, thanks for any help! Here is my HKN script:





================================================== ==============
// 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 ('http://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>

//-----------------------------------------------------------
// SUBROUTINE TO LAUNCH AND RENAME A COPY OF WOW.
//-----------------------------------------------------------
<Command LaunchAndRename>
<SendPC %1%>
<Run "c:\Users\Public\Games\World of Warcraft\WoW.exe">
<RenameTargetWin %2%>

//-----------------------------------------------------------
// Shift-alt-L launches 2 instances and logs in
//-----------------------------------------------------------
<Hotkey Shift Alt L>
<LaunchAndRename Local WoW1>
<sendpc local>
<wait 1000>
<text login1>
<Key tab>
<text password1>
<wait 1000>
<Key Enter>
<LaunchAndRename Local WoW2>
<sendpc local>
<wait 1000>
<text login2>
<Key tab>
<text password2>
<wait 1000>
<Key Enter>

//-----------------------------------------------------------
// DEFINE MAIL LABELS FOR SENDING KEY STROKES
//-----------------------------------------------------------
<Label w1 Local SendWinM WoW1>
<Label w2 Local SendWinM WoW2>
//-----------------------------------------------------------
// 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, NumPad0-NumPad9, Space, 0-9, F4-F12, Plus, Minus, except w,a,s,d,q,e>
<SendLabel w1, w2>
<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>
<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>
<ClickMouse %TriggerMainKey%>

<UseKeyAsModifier Tab>

<Hotkey Tab LButton>
<SendWinM WoW1>
<ClickMouse LButton>
<SendWinM WoW2>
<ClickMouse LButton>

//----------------------------------------------------------------
// SET PIP CONFIGURATION
// Usage: <SetPip BigWindowName LittleWindowName>
// This command is called by <Hotkey F1> which is defined below.
//----------------------------------------------------------------
<Command SetPip>
<TargetWin %2%>
<SetWinSize 400 300>
<SetWinPos 775 515>
<TargetWin %1%>
<SetWinPos 0 0>
<SetWinSize 1200 900>
<TargetWin %2%>
<SetForegroundWin>
<UpdateWin>
<TargetWin %1%>
<SetWinRegion 775 515 400 300>
<SetForegroundWin>

//----------------------------------------------------------------
// TOGGLE PIP CONFIG WITH HOTKEY
//----------------------------------------------------------------
<Hotkey ScrollLockOn F1>
<Toggle>
<SetPip WoW1 WoW2>
<Toggle>
<SetPip WoW2 WoW1>

//================================================== ==============
// END OF FILE
//================================================== ==============

Kalikiano
04-06-2009, 08:37 AM
this is from another post so may wanna watch out for it.


<Hotkey Shift Alt Ctrl L>
<LaunchAndRename Local WoW1>
<sendpc local>
<wait 1000>
<text thomasadams33>
<Key tab>
<text fitou1357908642>
<wait 100>
<Key Enter>
<LaunchAndRename Local WoW2>
<sendpc local>
<wait 1000>
<text thomasadams32>
<Key tab>
<text fitou1357908642>
<wait 100>
<Key Enter>


hmmm... let's see, you hit one key, shift-alt-L, and you get 2 programs launched and...
4 delays of 2*1000 and 2*100 ms each
and 60 keys pressed.

yea. 100% certain that would get Blizzard freaking out.when I was messing around with PiP I changed the 1200 900 to actual screen resolution and it would always fill the entire screen. so that I could have a small area to click on other pgorams I set it as 1280 1014 which gave me a small section at the bottom also if you want to know how to change the position for PiP just use MSPaint and look at the x,y location on the bottom right.what resolution is your monitor set for and what res is wow set for?

WarBird69
04-06-2009, 09:24 AM
My monitor is set at 1400x900. I normally run WoW in full screen. When its windowed, I'm guessing it goes down to 1200x900 with the "PIP" being set at 400x300.

I'll try setting WoW1 to my screen size and the other a bit larger, thanks for the MSpaint tip! Be nice if I could get the PIP off the action bars, just incase I need 'em.

Freddie
04-06-2009, 10:10 AM
A second issue is probably buried in my HKN script. I have PIP setup to activate when I press F1. It works mostly, but there is a large gap around window2 in which I can see my desktop. I've tried resizing/moving Window2, but doing so seemed to make things worse.
If you remove the window frames with RemoveWinFrame (http://hotkeynet.com/ref/removewinframe) before resizing the windows, it will work fine. That's what most people do.

If you want to keep the window frames, let me know and I'll help you work out the numbers. It gets more complicated if you keep the frames.

WarBird69
04-09-2009, 06:31 AM
Thanks for the help Freddie! I did that and messed with the numbers a bit more, seem to have things a bit more under control.

Unfortunately, I'm still having trouble with some buttons. Under my definitions of which keys will be sent to both WoWs, do the keys around the NumPad (forward slash, star, minus, plus) have a different name than...uh...star, minus, plus? Perhaps this one reason things aren't working right.

For reference, here's the line defining key passes: <Hotkey ScrollLockOn A-Z, NumPad0-NumPad9, Space, 0-9, F4-F12, Plus, Minus, except w,a,s,d,q,e>



I'm having major issues getting macros to work as well, but I'll probably make a thread in the Macro forums asuming I can't figure it out in the next few days.

Freddie
04-09-2009, 06:35 AM
...do the keys around the NumPad (forward slash, star, minus, plus) have a different name than...uh...star, minus, plus?
Yes, that's right. If you're ever in doubt about the name of a key, look at the upper right corner of HotkeyNet's window while you press it. The name is displayed there.

Those keys are called Divide, Multiply, NumpadMinus, and NumpadPlus.

It's good that they have different names from the similar keys elsewhere on the keyboard because you can can define them differently and get more bindings out of them.

WarBird69
04-10-2009, 08:11 AM
Thanks again for the help Freddie. Got it to work! Then I made new problems (isn't that the way of life?)...



Bound some of the secondary action bars to LCtrl+Numpad and LAlt+Numpad. Work fine on main, but the additional key clicks aren't transfering over. It is currently set up to broadcast "LCtrl" and "LAlt", but do I need to specify "LCtrl+Numpad 0-9" or anything of the sort, or do "shift" commands not key across properly?

Freddie
04-10-2009, 09:37 AM
You're welcome. This can done but I need more info to see what's wrong. Could you paste the script and tell me an example of a specific hotkey that doesn't work so I can look at it in the script?

WarBird69
04-10-2009, 10:40 AM
Here's the section of the script concerning key passes. If you need the whole thing, let me know, but this is the area I've been fiddling with the most. Original post has everything else:






//-----------------------------------------------------------
// 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, NumPad0-NumPad9, Space, 0-9, LCtrl, LAlt, Divide, Multiply, NumpadMinus, NumpadPlus, except w,a,s,d,q,e>
<SendLabel w1, w2>
<Key %Trigger%>
Example: Holding down the LCtrl (or LAlt) plus numpad1 to fire off flame shocks on both shaman.

Freddie
04-10-2009, 10:57 AM
I see what you meant now. Yes, you had the right idea. Modifiers can't trigger hotkeys in this version of HotkeyNet. I made this limitation to try to prevent frustrating user errors, because if you make a hotkey that gets triggered by pressing LCtrl, then by default, you disable LCtrl on your keyboard, and I thought this would cause a lot of headaches for people.

Therefore, if you want LCtrl Numpad1 to trigger a hotkey, you have to tell HotkeyNet that the key combination LCtrl Numpad1 is a trigger. For convenience you can write a lot of trigger combinations at once. For example, suppose you want to define these three hotkeys.

LCtrl Numpad1
LCtrl Numpad2
LCtrl Numpad3

You can write that like this

<Hotkey LCtrl Numpad1 - Numpad3>

And suppose you want to define these additional three hotkeys

LAlt Numpad1
LAlt Numpad2
LAlt Numpad3

You can add them to the previous definition like this:

<Hotkey LCtrl Numpad1 - Numpad3; LAlt Numpad1 - Numpad3>

Here's how to apply this info. In this case, you want hotkeys for all the number pad keys with both LCtrl and LAlt. I'll write it as two separate definitions to make it easier to read, but it could also be combined in one definition. I'll remove LCtrl and LAlt from your original definition and add a new definition.


<Hotkey ScrollLockOn A-Z, NumPad0-NumPad9, Space, 0-9, Divide, Multiply, NumpadMinus, NumpadPlus, except w,a,s,d,q,e>
<SendLabel w1, w2>
<Key %Trigger%>

<Hotkey ScrollLockOn LCtrl Numpad0 - Numpad9; ScrollLockOn LAlt Numpad0 - Numpad9>
<SendLabel w1, w2>
<Key %Trigger%>

WarBird69
04-10-2009, 12:04 PM
Perfect! Thank you so much! I think I've got all the tools I need for the moment. Thanks!



Now on to the macro forums to try and figure out how to get those working properly. :)