Log in

View Full Version : Pip script help



whitewolf007
07-07-2009, 12:11 AM
Can someone help me out with a working pip script i'm running 1024x769 on my screen i'm boxing 5 toons id like wow1 to be the big screen and the other 4 to be along the right side of the screen. I've tried to do this myself but I keep messing up and its not working i'm not used to using this program i've been using keyclone. I've managed to get the switching between windows working but not the pip screens they are aways screwed up.so if anyone can help me or give me a script to add to my own it would be very much appreciated Thank You.

alcattle
07-07-2009, 02:58 AM
The key is to have all 5 screens at the same ratio. When HKN swaps PiP, it does nothing but redraw the PiP at one size. So your Height is almost 800 so each small PiP will be 200 high. Width is 1024, Pip should be about 255. main 800x600 pip 255x200 and you might have to play if you use windowed mode (I do)

olipcs
07-07-2009, 03:26 AM
funny resolution :)

Well for this screen I also would recommend 800x600 as the (internal and external) resolution for the 'big window', and maybe 224x168 for the little windows, to get exactly to 1024 in a 4:3 ratio.

A script for this could look like (straight from the sticky):


//-----------------------------------------------------------
// SUBROUTINE TO Position Windows for 5 boxing.
//-----------------------------------------------------------
<Command ResizeAndPosition>
<SendPC Local>
<SendWin %1%>
<SetWinRect 0 0 800 600>
<SendWinM %2%>
<SetWinRect 800 0 224 168>
<SendWinM %3%>
<SetWinRect 800 168 224 168>
<SendWinM %4%>
<SetWinRect 800 336 224 168>
<SendWinM %5%>
<SetWinRect 800 504 224 168>

//----------------------------------------------------------------
//Window Switching
//----------------------------------------------------------------
<Hotkey F1>
<ResizeAndPosition WoW1 WoW2 WoW3 WoW4 WoW5>
<Hotkey F2>
<ResizeAndPosition WoW2 WoW1 WoW3 WoW4 WoW5>
<Hotkey F3>
<ResizeAndPosition WoW3 WoW2 WoW1 WoW4 WoW5>
<Hotkey F4>
<ResizeAndPosition WoW4 WoW2 WoW3 WoW1 WoW5>
<Hotkey F5>
<ResizeAndPosition WoW5 WoW2 WoW3 WoW4 WoW1>


...here of course you would have to change the window Names WoW1-WoW5 to the ones you use....

Freddie
07-07-2009, 04:53 AM
Seems to me the ideal layout does the following three things:

1. Fills the entire screen (in other words, maximizes the sizes of the windows).

2. Uses the same aspect ratio for all five windows (this is essential for mouse broadcasting in WoW).

3. Doesn't distort the shapes of WoW's graphics.

Here's the closest you can come to satisfying those three conditions on 1024 x 768:

1. Arrange the little windows in a horizontal row instead of a vertical column. The row can be at the top or bottom of the screen.

2. Using the WoWs' in-game video settings, choose a resolution with an aspect ratio of 16:10 like 1440 x 900 or 1680 x 1050.

3. Using the third-party program of your choice, set the size of the big window to 1024 x 614.

4. Using the third-party program of your choice, set the size of the little windows to 256 x 154.

If you do it that way, the aspect ratio of each window will be 1.67. (I'm rounding slightly.) This is a distortion of only four percent.

This is the least distortion you can have on 1024 x 768 if you fill the screen with five WoWs.

alcattle
07-07-2009, 05:13 AM
no fair using real math skills and all. I was using my best off the top of my head figgurin! :whistling: Anyhow we all gave you the same idea and a couple different ways to do it. Let us know if you need more help with HKN.

Freddie
07-07-2009, 05:19 AM
Aw c'mon, it's high school algebra. :)

(Actually I wrote a program to do this because it needs to go in HKN2.)

whitewolf007
07-07-2009, 01:44 PM
interesting ima try to do this every time i do it i get just 5 big windows and i can switch with f1-f5 when i switch i see a pip for like 1 sec then it gos away. and freddy why not vertical its much less cluttered looking

Freddie
07-07-2009, 04:03 PM
and freddy why not vertical its much less cluttered looking
Of course you can arrange the windows however you like.

The advantage of a horizontal row is that the windows can cover the entire display with practically no distortion.

If you arrange them vertically, either you can't use the entire display or there's a lot of distortion.

Edit: This comment applies to a 4:3 display which is what you asked about.

whitewolf007
07-07-2009, 06:55 PM
olipcs ive tried using that script but no dice it still stays the same size but he switch works

alcattle
07-07-2009, 08:45 PM
Very Odd, could you post the part of your script you changed with OLipcs info.

whitewolf007
07-07-2009, 11:46 PM
ok ima say this now im a noob at this boxing software and ive got low understanding of what im trying to do ive got a understading of how to get everything but the pip working ive read tuts but i still dont understand ive copied that script he gave me and put it in my script but it wont work right what do i have to change in it

alcattle
07-08-2009, 12:35 AM
take all parts that are not about hoykeys. It has to be in the first section where it sets up WoW1-WoW5. If all are set to the main screen size, what is in the PiP area?

olipcs
07-08-2009, 02:58 AM
I think the simplest for us, to help you, would be if you post your entire script, so that we can see if something is wrong with it, or if this must have another reason, like maybe: not running in window mode, setting to use a fixed size in wow etc...

Freddie
07-08-2009, 05:49 AM
It might also help to see the messages that HotkeyNet displays when the hotkey is pressed, because they show the actual commands that the program is executing. (The new program doesn't do this because its scripts are compiled, and I dread the thought of answering customer service questions.)

whitewolf007
07-08-2009, 02:35 PM
theres my script im just trying to get everything working right only thing im haveing trubble with is the PIP and yes i run in windowed mode its much easyer and it crashes at least 1 wow when i lanch them if im in fullscreen


//-----------------------------------------------------------
// PRESS CTRL R TO RENAME WOW'S IF YOU LAUNCH THEM MANUALLY.
//-----------------------------------------------------------
<Hotkey Alt Ctrl R>
<SendPC local>
<RenameWin "World of Warcraft" WoW1>
<RenameWin "World of Warcraft" WoW2>
<RenameWin "World of Warcraft" WoW3>
<RenameWin "World of Warcraft" WoW4>
<RenameWin "World of Warcraft" WoW4>

//-----------------------------------------------------------
// 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%>

//-----------------------------------------------------------
// HOTKEY TO LAUNCH AND RENAME YOUR WOW WINDOWS
//-----------------------------------------------------------
<Hotkey Alt Ctrl L>
<LaunchAndRename Local WoW1>
<LaunchAndRename Local WoW2>
<LaunchAndRename Local WoW3>
<LaunchAndRename Local WoW4>
<LaunchAndRename Local WoW5>

//-----------------------------------------------------------
// DEFINE MAIL LABELS FOR SENDING KEY STROKES.
//-----------------------------------------------------------
<Label w1 Local SendWinM WoW1>
<Label w2 Local SendWinM WoW2>
<Label w3 Local SendWinM WoW3>
<Label w4 Local SendWinM WoW4>
<Label w5 Local SendWinM WoW5>

//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO BOTH WOWS. ADD MORE KEY COMBO'S IF YOU WANT.
//-----------------------------------------------------------
<Hotkey A-Z, 0-9, Plus, Minus, F6-F11 except W, A, S, D, Q, E>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>

//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey up, down, left, right>
<SendLabel w1, w2, w3, w4, w5>
<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 Oem3 LButton, MButton, RButton, Button4, Button5>
<SendLabel w1, w2, w3, w4, w5>
<ClickMouse %TriggerMainKey%>

//-----------------------------------------------------------
// PiP settings
//-----------------------------------------------------------
<Command ResizeAndPosition>
<SendPC Local>
<SendWin %1%>
<SetWinSize 1024 1200>
<SetWinPos 0 0>
<SetWinRegion 160 1620 300 200>
<SetWinRegion 560 1620 300 200>
<SetWinRegion 960 1620 300 200>
<SetWinRegion 1360 1620 300 200>
<SendWinM %2%>
<SetWinSize 300 200>
<SetWinPos 160 1620>
<SendWinM %3%>
<SetWinSize 300 200>
<SetWinPos 560 1620>
<SendWinM %4%>
<SetWinSize 960 1620>
<SetWinPos 1920 0>
<SendWinM %5%>
<SetWinSize 1460 1620>
<SetWinPos 1920 512>

//----------------------------------------------------------------
//Window Switching
//----------------------------------------------------------------
<Hotkey F1>
<ResizeAndPosition WoW1 WoW2 WoW3 WoW4 WoW5>
<Hotkey F2>
<ResizeAndPosition WoW2 WoW1 WoW3 WoW4 WoW5>
<Hotkey F3>
<ResizeAndPosition WoW3 WoW2 WoW1 WoW4 WoW5>
<Hotkey F4>
<ResizeAndPosition WoW4 WoW2 WoW3 WoW1 WoW5>
<Hotkey F5>
<ResizeAndPosition WoW5 WoW2 WoW3 WoW4 WoW1>

//----------------------------------------------------------------
// pause hotkeys
//----------------------------------------------------------------
<Hotkey F12>
<sendpc local>
<ToggleHotkeys>

this is what happend when i try to switch from wow 5 to wow 1 it got bigger and didnet go into pip heres the info on it

From this pc: <SendWin WoW1><SetWinSize 1920 1200><SetWinPos 0 0><SetWinRegion 160 1620 300 200><SetWinRegion 560 1620 300 200><SetWinRegion 960 1620 300 200><SetWinRegion 1360 1620 300 200><SendWinM WoW2><SetWinSize 300 200><SetWinPos 160 1620><SendWinM WoW3><SetWinSize 300 200><SetWinPos 560 1620><SendWinM WoW4><SetWinSize 960 1620><SetWinPos 1920 0><SendWinM WoW5><SetWinSize 1460 1620><SetWinPos 1920 512>
<SendWin WoW1> completed: Window found. Target set to 0xB0ADE "WoW1"
<SetWinSize 1920 1200> completed
<SetWinPos 0 0> completed
<SetWinRegion 160 1620 300 200> completed
<SetWinRegion 560 1620 300 200> completed
<SetWinRegion 960 1620 300 200> completed
<SetWinRegion 1360 1620 300 200> completed
<SendWinM WoW2> completed: Window found. Target set to 0xD0AA6 "WoW2"
<SetWinSize 300 200> completed
<SetWinPos 160 1620> completed
<SendWinM WoW3> completed: Window found. Target set to 0x190962 "WoW3"
<SetWinSize 300 200> completed
<SetWinPos 560 1620> completed
<SendWinM WoW4> completed: Window found. Target set to 0x270AE4 "WoW4"
<SetWinSize 960 1620> completed
<SetWinPos 1920 0> completed
<SendWinM WoW5> completed: Window found. Target set to 0x100A22 "WoW5"
<SetWinSize 1460 1620> completed
<SetWinPos 1920 512> completed

olipcs
07-08-2009, 02:55 PM
ok, the answer why this isn't workin is, because you using wrong parameters for <SetWinSize>, <SetWinPos>.
You said your screen has an resolution of 1024x768 (and you are only using one screen).
To fix your script for example simply try to replace the hole '<Command ResizeAndPosition>'-section, with the following block Imentioned above:


<Command ResizeAndPosition>
<SendPC Local>
<SendWin %1%>
<SetWinRect 0 0 800 600>
<SendWinM %2%>
<SetWinRect 800 0 224 168>
<SendWinM %3%>
<SetWinRect 800 168 224 168>
<SendWinM %4%>
<SetWinRect 800 336 224 168>
<SendWinM %5%>
<SetWinRect 800 504 224 168>

..and try this out (and change the window resolutions later if you want others).
I fixed some other 'errors' in your script, so simply try the following script:
(fixed a typo in the renaming routine, removed the borders of the windows, set the initial sizes of the windows)


//-----------------------------------------------------------
// 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%>
<RemoveWinFrame>

//-----------------------------------------------------------
// PiP settings
//-----------------------------------------------------------
<Command ResizeAndPosition>
<SendPC Local>
<SendWin %1%>
<SetWinRect 0 0 800 600>
<SendWinM %2%>
<SetWinRect 800 0 224 168>
<SendWinM %3%>
<SetWinRect 800 168 224 168>
<SendWinM %4%>
<SetWinRect 800 336 224 168>
<SendWinM %5%>
<SetWinRect 800 504 224 168>

//-----------------------------------------------------------
// HOTKEY TO LAUNCH AND RENAME YOUR WOW WINDOWS
//-----------------------------------------------------------
<Hotkey Alt Ctrl L>
<LaunchAndRename Local WoW1>
<LaunchAndRename Local WoW2>
<LaunchAndRename Local WoW3>
<LaunchAndRename Local WoW4>
<LaunchAndRename Local WoW5>
<ResizeAndPosition WoW1 WoW2 WoW3 WoW4 WoW5>

//-----------------------------------------------------------
// DEFINE MAIL LABELS FOR SENDING KEY STROKES.
//-----------------------------------------------------------
<Label w1 Local SendWinM WoW1>
<Label w2 Local SendWinM WoW2>
<Label w3 Local SendWinM WoW3>
<Label w4 Local SendWinM WoW4>
<Label w5 Local SendWinM WoW5>

//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO BOTH WOWS. ADD MORE KEY COMBO'S IF YOU WANT.
//-----------------------------------------------------------
<Hotkey A-Z, 0-9, Plus, Minus, F6-F11 except W, A, S, D, Q, E>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>

//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey up, down, left, right>
<SendLabel w1, w2, w3, w4, w5>
<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 Oem3 LButton, MButton, RButton, Button4, Button5>
<SendLabel w1, w2, w3, w4, w5>
<ClickMouse %TriggerMainKey%>



//----------------------------------------------------------------
//Window Switching
//----------------------------------------------------------------
<Hotkey F1>
<ResizeAndPosition WoW1 WoW2 WoW3 WoW4 WoW5>
<Hotkey F2>
<ResizeAndPosition WoW2 WoW1 WoW3 WoW4 WoW5>
<Hotkey F3>
<ResizeAndPosition WoW3 WoW2 WoW1 WoW4 WoW5>
<Hotkey F4>
<ResizeAndPosition WoW4 WoW2 WoW3 WoW1 WoW5>
<Hotkey F5>
<ResizeAndPosition WoW5 WoW2 WoW3 WoW4 WoW1>

//----------------------------------------------------------------
// pause hotkeys
//----------------------------------------------------------------
<Hotkey F12>
<sendpc local>
<ToggleHotkeys>


would be nice if you can tell us, if the above script worked for you, when you start your WoWs with 'ctrl + alt + l'

whitewolf007
07-08-2009, 03:50 PM
woot it works great and yes ctrl+alt+l works i was wondering why you guys all put scroll lock in there i just thought it was a inconvinionce to have that so i took it out and yes it all works great thank you now i need a way to figure out how to bind macros to numberpad keys like on pwnboxer cus im to lazy to buy it and i figured why not just use this ware im in charge of the script

olipcs
07-08-2009, 03:59 PM
glad you got the pip working :)
i was wondering why you guys all put scroll lock - well, its in most HKN scripts, because Freddie uses it in his sample scripts, and most people copy/customize them.
Me personal never liked the ScrolllockOn approach, but defined a seperate key to toggle HKN on/off as you did.
But this simply comes down to personal choice..

regarding the numpad: the keynames for the Numpad are:
-if NumLock is on: NumPad0 - NumPad9
-if Numlock is off: NumpadHome,NumpadUp,NumpadPgUp,NumpadLeft,Clear,Nu mpadright,NumpadEnd,NumpadDown,NumpadPgDn
...if this is helping you.

whitewolf007
07-08-2009, 04:05 PM
i know the names ive looked them up im saying a way to bind macros to them lol

olipcs
07-08-2009, 04:13 PM
ah ok, sorry.
If you can't do it with your BarMod, I would try to do it with script commands like:
/script SetBindingMacro("KEYORBUTTON","MacroName")
/script SaveBindings(GetCurrentBindingSet())

with something like 'numpad3' as KEYORBUTTON. (this is a guess, so not tested)

whitewolf007
07-08-2009, 04:18 PM
ah ok, sorry.
If you can't do it with your BarMod, I would try to do it with script commands like:
/script SetBindingMacro("KEYORBUTTON","MacroName")
/script SaveBindings(GetCurrentBindingSet())

with something like 'numpad3' as KEYORBUTTON. (this is a guess, so not tested)

is it possable to make all my windows but my main cast the spell in the 1 action slot by pressing the 1 number pad key and the same for all the other number pad keys and is there a way i can close all my wow windows at 1 time

Freddie
07-08-2009, 07:07 PM
glad you got the pip working :)because Freddie uses it in his sample scripts, and most people copy/customize them.
Me personal never liked the ScrolllockOn approach, but defined a seperate key to toggle HKN on/off as you did. But this simply comes down to personal choice..
It was probably a bad choice because it turned out to be a big source of customer-support questions. I thought it would be a nice touch because it creates a visible on-or-off light on the keyboard. The sample scripts should probably be rewritten.

whitewolf007
07-08-2009, 07:25 PM
yea agreed my keyboard don't even have a scroll lock lol nor dus it have a light but i fixed my hotkey problem i just got bartender and binded keys to itso now i have all my toons with spells on the number pad and i have my mains spells on the "1 to =" keys

http://www.grabup.com/uploads/270008230754200944186033B527.png

hears my setup i was trying to look nooby lol

alcattle
07-08-2009, 10:54 PM
LOOKS well setup. Do you use a mouse to move or WASD? Looks like you want to type everything. Not sure what all the vertical rows are for but it still pretty clean. Happy you got things working.

whitewolf007
07-08-2009, 11:07 PM
i move with wsad and i can control the subs with the arrows the vertical boxes are just to make it look cleaner i added another small row above the chat box for totoms and stuff the left box is binded to my numberpad so i can cast spells on my subs with the number pad and cast for myself with 1 to = i made this setup for a tank or a healer say 4 mages and a priest or 1 warror and 4 hunters or somthing like that im gona remake it for my 5 shammys