AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Halo Script cleaning and Timers help
Goto page Previous  1, 2
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
d3m0n1x



Joined: 04 May 2005
Posts: 16

PostPosted: Tue Jun 14, 2005 3:33 pm    Post subject: Reply with quote

I was just wondering about this part of the script :

Code:


!$Numpad1::Send Password SV_BAN(1)
!$Numpad2::Send Password SV_BAN(2)
!$Numpad3::Send Password SV_BAN(3)
!$Numpad4::Send Password SV_BAN(4)
!$Numpad5::Send Password SV_BAN(5)
!$Numpad6::Send Password SV_BAN(6)
!$Numpad7::Send Password SV_BAN(7)
!$Numpad8::Send Password SV_BAN(8)
!$Numpad9::Send Password SV_BAN(9)
!$Numpad0::Send Password SV_BAN(10)
!$Insert::Send Password SV_BAN(11)
!$Home::Send Password SV_BAN(12)
!$PgUp::Send Password SV_BAN(13)
!$Delete::Send Password SV_BAN(14)
!$End::Send Password SV_BAN(15)
!$PgDn::Send Password SV_BAN(16)

 
SendPasswordSV_BAN(id):
  Send,\
  Sleep, 100
  Send, rcon password sv_ban %id%
return



Instead of using the "0", "Insert", "Home", "PgDn", "PgUp", "Delete" & "End" keys, could u tell me how 2 ediit it so I could press something like Alt + Shift + $Numpad1.


Last edited by d3m0n1x on Thu Jun 16, 2005 11:18 pm; edited 2 times in total
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Wed Jun 15, 2005 11:01 pm    Post subject: Reply with quote

d3m0n1x wrote:
Instead of using the "0", "Insert", "Home", "PgDn", "PgUp", "Delete" & "End" keys, could u tell me how 2 ediit it so I could press something like Alt + Shift + $Numpad1
Edit: Alt+Shift+Numpad hotkeys currently do not work because: 1) the keyboard driver generates a shift-up event when you press this combination; 2) The shift key converts Numpad1 to its counterpart, NumpadEnd. The same is true for the other dual-state Numpad keys.

To work around this, define the following:
$!NumpadEnd::MsgBox You pressed either Shift+Alt+Numpad1 (while Numlock was On) or Alt+NumpadEnd (while Numlock was Off).


Last edited by Chris on Thu Jun 16, 2005 10:22 pm; edited 4 times in total
Back to top
View user's profile Send private message Send e-mail
Tudels
Guest





PostPosted: Thu Jun 16, 2005 1:48 pm    Post subject: Reply with quote

Hey, I was having some problems with a halo script as well...

Anyways, if you want halo to run as a window, then just listen to me.

1. Right click the Halo .exe
2. Click "Properties" on the drop-down menu
3. Click the text box titled "Target"
4. After everything that is already typed in there, put in this swith:

-window

It should come out like this:

"C:\Program Files\....\haloce.exe" -window

Believe me, this always works. Btw, I advise getting Halo Custom Edition, it's free and has better multiplayer and it also has it's own forums on gearboxsoftware.com.
Back to top
d3m0n1x



Joined: 04 May 2005
Posts: 16

PostPosted: Thu Jun 16, 2005 9:53 pm    Post subject: Reply with quote

Tx Chris but the wierd thing is I tried

Code:


!+$Numpad1::Send Password SV_BAN(10)



but it doesn't work.

I press the keys but nothing happens.


Last edited by d3m0n1x on Thu Jun 16, 2005 10:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Thu Jun 16, 2005 10:17 pm    Post subject: Reply with quote

You're right. This is caused by the fact that the keyboard driver generates a ShiftKey-up event whenever Numlock is on and you press a Numpad key while holding down the shift key.

I've made a note to try to fix this. In the meantime, I've edited my post above to contain the correct info about how work around this to create Alt+Numpad hotkeys.
Back to top
View user's profile Send private message Send e-mail
d3m0n1x



Joined: 04 May 2005
Posts: 16

PostPosted: Thu Jun 16, 2005 10:41 pm    Post subject: Reply with quote

Only noticed now that there was a mistake in the following code:

Code:


!$Numpad1::Send Password SV_BAN(1)
!$Numpad2::Send Password SV_BAN(2)
!$Numpad3::Send Password SV_BAN(3)
!$Numpad4::Send Password SV_BAN(4)
!$Numpad5::Send Password SV_BAN(5)
!$Numpad6::Send Password SV_BAN(6)
!$Numpad7::Send Password SV_BAN(7)
!$Numpad8::Send Password SV_BAN(8)
!$Numpad9::Send Password SV_BAN(9)
!$Numpad0::Send Password SV_BAN(10)
!$Insert::Send Password SV_BAN(11)
!$Home::Send Password SV_BAN(12)
!$PgUp::Send Password SV_BAN(13)
!$Delete::Send Password SV_BAN(14)
!$End::Send Password SV_BAN(15)
!$PgDn::Send Password SV_BAN(16)

 
SendPasswordSV_BAN(id):
  Send,\
  Sleep, 100
  Send, rcon password sv_ban %id%
return



I Copy/Pasted the code & saw now that "!$Numpad.. :: Send Password SV_BAN(..)" has Spaces between it & should b "!$Numpad.. :: SendPasswordSV_BAN(..)" but I changed it so it's less confusing.


Code:


!$Numpad1::AutoBan(1)
!$Numpad2::AutoBan(2)
!$Numpad3::AutoBan(3)
!$Numpad4::AutoBan(4)
!$Numpad5::AutoBan(5)
!$Numpad6::AutoBan(6)
!$Numpad7::AutoBan(7)
!$Numpad8::AutoBan(8)
!$Numpad9::AutoBan(9)
!$Numpad0::AutoBan(10)
!$Insert::AutoBan(11)
!$Home::AutoBan(12)
!$PgUp::AutoBan(13)
!$Delete::AutoBan(14)
!$End::AutoBan(15)
!$PgDn::AutoBan(16)

 
AutoBan(id):
{
  Send,\
  Sleep, 100
  Send, rcon password sv_ban %id%
}

Back to top
View user's profile Send private message
d3m0n1x



Joined: 04 May 2005
Posts: 16

PostPosted: Thu Jun 16, 2005 11:36 pm    Post subject: Reply with quote

So Chris that will help if I press "Alt + Shift + NumPad1" right? but now what about the other keys? Was hoping 2 use !Alt + Shift + NumPad" 2 Ban ppl then "Ctrl + Shift + NumPad" keys 2 Kick ppl.

Does this mean a fix 4 this problem will b added 2 a future update of AutoHotKeys & will it take long 2 come out?You wouldn't happen 2 know more or less how long it would take 4 a fix 2 b availible 4 this problem would u? Rolling Eyes
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sat Jun 18, 2005 12:12 am    Post subject: Reply with quote

d3m0n1x wrote:
So Chris that will help if I press "Alt + Shift + NumPad1" right? but now what about the other keys?
The same work around mentioned above should work for them. Whenever you want to use Shift with a Numpad hotkey while Numlock is on, omit the + symbol from the hotkey's prefix and change the key name to its non-Numlock counterpart (even though numlock is on).

Quote:
You wouldn't happen 2 know more or less how long it would take 4 a fix 2 b availible 4 this problem would u?
There might be no fix for it because it is a keyboard driver related issue. Microsoft's own RegisterHotkey() function also fails to work with Shift+Numpad hotkeys.

Even so, I've made a note to look into it, but it might be a month or two.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group