PDA

View Full Version : share with you something interesting via HotKeyNet



micharl
05-12-2010, 09:34 PM
hey, I've read forum for long time, it's a great forum! And I find HKN is really good software for multi-boxer(although I start with keyclone). here is a little example for HKN, I'd like to share with you all, maybe it's helpful for you.

These days I am interesting with inner-space and I think repeat-region is a great idea, so I think whether I can do it with HKN. I find the feature of HKN: Panel & Button, with it I can do similar work , here is the steps.

This example is for the user of HKN, you will be confused if you don't know it at all, I take 5 PAL team for example.

1) we have 5 toons: toon1, toon2,toon3,toon4,toon5, each toon's wow window id: wow1,wow2,wow3,wow4,wow5
2) for each toon, we have following macro: heal toon1, heal toon2, heal toon3, heal toon4, heal toon5
my example for heal toon1:
#showtooltip
/stopcasting
/cast [target=toon1,exists]heal
3) for each toon, drag the macro in action bar, bind it with hotkey, here is mine:
ctrl+alt+6 heal toon1
ctrl+alt+7 heal toon2
ctrl+alt+8 heal toon3
ctrl+alt+9 heal toon4
ctrl+alt+0 heal toon5
4) in HKN's script, create buttons and panel, assign command to buttons, here is the script:

<Command Create_Panel>

<CreatePictureButton TOON1_L 300 15 "d:\game\HKN\heal.png">
<CreatePictureButton TOON1_M 300 15 "d:\game\HKN\ds.png">
<CreatePictureButton TOON1_R 300 15 "d:\game\HKN\clean.png">

<CreatePictureButton TOON2_L 330 15 "d:\game\HKN\heal.png">
<CreatePictureButton TOON2_M 330 15 "d:\game\HKN\ds.png">
<CreatePictureButton TOON2_R 330 15 "d:\game\HKN\clean.png">

<CreatePictureButton TOON3_L 360 15 "d:\game\HKN\heal.png">
<CreatePictureButton TOON3_M 360 15 "d:\game\HKN\ds.png">
<CreatePictureButton TOON3_R 360 15 "d:\game\HKN\clean.png">

<CreatePictureButton TOON4_L 360 15 "d:\game\HKN\heal.png">
<CreatePictureButton TOON4_M 360 15 "d:\game\HKN\ds.png">
<CreatePictureButton TOON4_R 360 15 "d:\game\HKN\clean.png">

<CreatePictureButton TOON5_L 360 15 "d:\game\HKN\heal.png">
<CreatePictureButton TOON5_M 360 15 "d:\game\HKN\ds.png">
<CreatePictureButton TOON5_R 360 15 "d:\game\HKN\clean.png">

//<X, Y, WIDTH, HEIGHT, INTERVAL>
// 0 0 %3 %4 %3+%5 0 %3 %4 %3*2+%5*2 0 %3 %4
//0 %4+%5 %3 %4 %3+%5 %4+%5 %3 %4 %3*2+%5*2 %4+%5 %3 %4
//0 %4*2+%5*2 %3 %4 %3+%5 %4*2+%5*2 %3 %4 %3*2+%5*2 %4*2+%5*2 %3 %4
//0 %4*3+%5*3 %3 %4 %3+%5 %4*3+%5*3 %3 %4 %3*2+%5*2 %4*3+%5*3 %3 %4
//0 %4*4+%5*4 %3 %4 %3+%5 %4*4+%5*4 %3 %4 %3*2+%4*2 %4*4+%5*4 %3 %4
<CreatePanel LeftPanel 500 500 81 132>
<AddButtonToPanel TOON1_L LeftPanel 0 0 25 24>
<AddButtonToPanel TOON1_M LeftPanel 28 0 25 24 >
<AddButtonToPanel TOON1_R LeftPanel 56 0 25 24 >
<AddButtonToPanel TOON2_L LeftPanel 0 27 25 24 >
<AddButtonToPanel TOON2_M LeftPanel 28 27 25 24 >
<AddButtonToPanel TOON2_R LeftPanel 56 27 25 24 >
<AddButtonToPanel TOON3_L LeftPanel 0 54 25 24 >
<AddButtonToPanel TOON3_M LeftPanel 28 54 25 24 >
<AddButtonToPanel TOON3_R LeftPanel 56 54 25 24 >
<AddButtonToPanel TOON4_L LeftPanel 0 81 25 24 >
<AddButtonToPanel TOON4_M LeftPanel 28 81 25 24 >
<AddButtonToPanel TOON4_R LeftPanel 56 81 25 24 >
<AddButtonToPanel TOON5_L LeftPanel 0 108 25 24 >
<AddButtonToPanel TOON5_M LeftPanel 28 108 25 24 >
<AddButtonToPanel TOON5_R LeftPanel 56 108 25 24 >

<SetPanelLayout LeftPanel 3 2>
<SetPanelStyle LeftPanel Frameless>
<TargetWin LeftPanel>
<AlwaysOnTop on>
<SetWinOpacity 80>
<Command toon1_heal>
<SendPC local>
<SendWinM wow1> <Key Alt Ctrl 6>
<SendWinM wow2> <Key Alt Ctrl 6>
<SendWinM wow3> <Key Alt Ctrl 6>
<SendWinM wow4> <Key Alt Ctrl 6>
<SendWinM wow5> <Key Alt Ctrl 6>
<Command toon2_heal>
<SendPC local>
<SendWinM wow1> <Key Alt Ctrl 7>
<SendWinM wow2> <Key Alt Ctrl 7>
<SendWinM wow3> <Key Alt Ctrl 7>
<SendWinM wow4> <Key Alt Ctrl 7>
<SendWinM wow5> <Key Alt Ctrl 7>
<Command toon3_heal>
<SendPC local>
<SendWinM wow1> <Key Alt Ctrl 8>
<SendWinM wow2> <Key Alt Ctrl 8>
<SendWinM wow3> <Key Alt Ctrl 8>
<SendWinM wow4> <Key Alt Ctrl 8>
<SendWinM wow5> <Key Alt Ctrl 8>
<Command toon4_heal>
<SendPC local>
<SendWinM wow1> <Key Alt Ctrl 9>
<SendWinM wow2> <Key Alt Ctrl 9>
<SendWinM wow3> <Key Alt Ctrl 9>
<SendWinM wow4> <Key Alt Ctrl 9>
<SendWinM wow5> <Key Alt Ctrl 9>
<Command toon5_heal>
<SendPC local>
<SendWinM wow1> <Key Alt Ctrl 0>
<SendWinM wow2> <Key Alt Ctrl 0>
<SendWinM wow3> <Key Alt Ctrl 0>
<SendWinM wow4> <Key Alt Ctrl 0>
<SendWinM wow5> <Key Alt Ctrl 0>
<Hotkey ScrollLockOn Alt Ctrl 2>
<Create_Panel>
<SetButtonCommand TOON1_L toon1_heal>
<SetButtonCommand TOON1_M toon1_ds>
<SetButtonCommand TOON1_R toon1_clean>
<SetButtonCommand TOON2_L toon2_heal>
<SetButtonCommand TOON2_M toon2_ds>
<SetButtonCommand TOON2_R toon2_clean>
<SetButtonCommand TOON3_L toon3_heal>
<SetButtonCommand TOON3_M toon3_ds>
<SetButtonCommand TOON3_R toon3_clean>
<SetButtonCommand TOON4_L toon4_heal>
<SetButtonCommand TOON4_M toon4_ds>
<SetButtonCommand TOON4_R toon4_clean>
<SetButtonCommand TOON5_L toon5_heal>
<SetButtonCommand TOON5_M toon5_ds>
<SetButtonCommand TOON5_R toon5_clean>
5) after press ctrl+alt+2, you will get an panel with buttons(in attachment), normally I will move the panel near healbot, I will clike the heal button in case one toon is needed to heal. of course, another 2 buttons is used to perform Divine Shield and purge, I didn't input the macros and script, you can do it by yourself.

You can also add more buttons or panels for other job, it depend on your need.

Thanks for reading, I hope it's useful for you.

micharl
05-12-2010, 09:56 PM
in order to create panel and button, HKN can't compile correctly for following issue:
example:
<Command f>
<<AddButtonToPanel TOON1_L LeftPanel %1 %2 %1+%3 %2+%4>
So we have to manually generate the script one by one, but it's not easy , I make a simple c script to do it. in script, it need you to input 3 parameters, the width is button's width, the height is button's height, and the interval is the interval between 2 buttons. you can manually modify the (x,y) when CreatePanel in case you want to re-locate the panel's position.

#include "stdio.h"

void main(){

FILE *p;
int w,h,i;
char str[500];

printf("please input width=\n");
scanf("%d",&w);
printf("input height=\n");
scanf("%d",&h);
printf("input interval value\n");
scanf("%d",&i);

p=fopen("_test.txt","w+");
if(p==NULL){
printf("error to open file\n");
return;
}

/*/<X, Y, WIDTH, HEIGHT, INTERVAL>
// 0 0 %3 %4 %3+%5 0 %3 %4 %3*2+%5*2 0 %3 %4

//0 %4+%5 %3 %4 %3+%5 %4+%5 %3 %4 %3*2+%5*2 %4+%5 %3 %4

//0 %4*2+%5*2 %3 %4 %3+%5 %4*2+%5*2 %3 %4 %3*2+%5*2 %4*2+%5*2 %3 %4

//0 %4*3+%5*3 %3 %4 %3+%5 %4*3+%5*3 %3 %4 %3*2+%5*2 %4*3+%5*3 %3 %4

//0 %4*4+%5*4 %3 %4 %3+%5 %4*4+%5*4 %3 %4 %3*2+%4*2 %4*4+%5*4 %3 %4
*/
sprintf(str,"<CreatePanel LeftPanel %d %d %d %d>\n", 500,500,w*3+i*2,h*5+i*4);
fputs(str,p);
sprintf(str,"<AddButtonToPanel TOON1_L LeftPanel 0 0 %d %d>\n",w,h);
fputs(str,p);
sprintf(str,"<AddButtonToPanel TOON1_M LeftPanel %d %d %d %d >\n", w+i, 0, w ,h);
fputs(str,p);
sprintf(str,"<AddButtonToPanel TOON1_R LeftPanel %d %d %d %d >\n" , w*2+i*2, 0 ,w, h);
fputs(str,p);
sprintf(str,"<AddButtonToPanel TOON2_L LeftPanel %d %d %d %d >\n" , 0, h+i, w, h);
fputs(str,p);
sprintf(str,"<AddButtonToPanel TOON2_M LeftPanel %d %d %d %d >\n" , w+i, h+i ,w ,h);
fputs(str,p);
sprintf(str,"<AddButtonToPanel TOON2_R LeftPanel %d %d %d %d >\n" , w*2+i*2 ,h+i, w ,h);
fputs(str,p);
sprintf(str,"<AddButtonToPanel TOON3_L LeftPanel %d %d %d %d >\n" , 0, h*2+i*2 ,w, h);
fputs(str,p);
sprintf(str,"<AddButtonToPanel TOON3_M LeftPanel %d %d %d %d >\n" , w+i ,h*2+i*2, w, h);
fputs(str,p);
sprintf(str,"<AddButtonToPanel TOON3_R LeftPanel %d %d %d %d >\n" , w*2+i*2 ,h*2+i*2, w ,h);
fputs(str,p);
sprintf(str,"<AddButtonToPanel TOON4_L LeftPanel %d %d %d %d >\n" , 0 ,h*3+i*3 ,w ,h);
fputs(str,p);
sprintf(str,"<AddButtonToPanel TOON4_M LeftPanel %d %d %d %d >\n" , w+i ,h*3+i*3 ,w ,h);
fputs(str,p);
sprintf(str,"<AddButtonToPanel TOON4_R LeftPanel %d %d %d %d >\n" , w*2+i*2 ,h*3+i*3, w, h);
fputs(str,p);
sprintf(str,"<AddButtonToPanel TOON5_L LeftPanel %d %d %d %d >\n" , 0, h*4+i*4 ,w ,h);
fputs(str,p);
sprintf(str,"<AddButtonToPanel TOON5_M LeftPanel %d %d %d %d >\n" , w+i, h*4+i*4, w ,h);
fputs(str,p);
sprintf(str,"<AddButtonToPanel TOON5_R LeftPanel %d %d %d %d >\n" , w*2+i*2, h*4+i*4 ,w ,h);
fputs(str,p);

printf(str);
fclose (p);
return;
}

dlthehunter
05-15-2010, 02:44 AM
you could consider putting this interesting topic in the Software forum

alcattle
05-15-2010, 03:29 AM
might also want to use the Code tag to preserve fommating