AutoHotkey Community

It is currently May 26th, 2012, 6:20 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: June 14th, 2005, 4:33 pm 
Offline

Joined: May 4th, 2005, 7:07 pm
Posts: 16
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 June 17th, 2005, 12:18 am, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 16th, 2005, 12:01 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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 June 16th, 2005, 11:22 pm, edited 4 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 16th, 2005, 2:48 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 16th, 2005, 10:53 pm 
Offline

Joined: May 4th, 2005, 7:07 pm
Posts: 16
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 June 16th, 2005, 11:20 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 16th, 2005, 11:17 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 16th, 2005, 11:41 pm 
Offline

Joined: May 4th, 2005, 7:07 pm
Posts: 16
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%
}



Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 17th, 2005, 12:36 am 
Offline

Joined: May 4th, 2005, 7:07 pm
Posts: 16
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? :roll:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 18th, 2005, 1:12 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: batto, Bing [Bot], rbrtryn and 58 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group