 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Harmor
Joined: 06 Nov 2005 Posts: 183
|
Posted: Sun Jul 30, 2006 4:12 am Post subject: |
|
|
Added the following to my submission above:
| Code: | ;
; Press Joy5 to say "I'm sorry" using the Cammo Rose while flying
;
$Joy5::
Send, {q Down}
Sleep 200
DllCall("mouse_event", uint,1, int,300, int,10, uint,0, int,0 )
Sleep 40
MouseClick, Left, , , , , D
sleep 40
MouseClick, Left, , , , , U
Send, {q Up}
return
;
; Press Joy6 to spot a target directly in front of you using the Cammo Rose while flying
;
$Joy6::
Send, {q Down}
Sleep 100
MouseClick, Left, , , , , D
sleep 40
MouseClick, Left, , , , , U
Send, {q Up}
return
|
To figure out which joystick button you want to use try this script:
http://www.autohotkey.com/docs/scripts/JoystickTest.htm
or goto Start->Control Panel->Game Controllers and press Properties to test. _________________ //TODO: Create kewl sig... |
|
| Back to top |
|
 |
Harmor
Joined: 06 Nov 2005 Posts: 183
|
Posted: Sun Jul 30, 2006 10:39 pm Post subject: |
|
|
Toggle between Pistol/Rifle when you press the Middle Mouse button:
| Code: | togglePistolRifle()
{
static g_Pistol
if(1 == mod(g_Pistol,2))
{
; Switching to Rifle
Send, {3 down}
Sleep 50
Send, {3 up}
}
else
{
; Switching to Pistol
Send, {2 down}
Sleep 50
Send, {2 up}
}
g_Pistol += 1
}
toggleF2PistolF3Rifle()
{
static g_Pistol
if(1 == mod(g_Pistol,2))
{
; Switching to Rifle
Send, {f3 down}
Sleep 50
Send, {f3 up}
}
else
{
; Switching to Pistol
Send, {f2 down}
Sleep 50
Send, {f2 up}
}
g_Pistol += 1
}
;
; Toggle between pistol/rifle when you press the middle mouse button
;
$MButton::
togglePistolRifle() ; Default keybinds 2 and 3
;toggleF2PistolF3Rifle() ; F2 and F3
return |
_________________ //TODO: Create kewl sig... |
|
| Back to top |
|
 |
Harmor
Joined: 06 Nov 2005 Posts: 183
|
Posted: Sun Jul 30, 2006 10:40 pm Post subject: |
|
|
I don't know what they did, but the latest version of AutoHotkey (1.1.2878) fixed a problem where you couldn't send certain key strokes to BF2 - thanks guys.
So here is a pack of "Throw" functions.
- ThrowClaymoreOnly() - Optimized to throw a single Claymore and then switch back to main weapon
- ThrowMedicBag() - Throws a single Medic Bag and switches back to main weapon (doesn't work for other kits - but is fast)
- ThrowSupplyOrMedicBagC4() - Optimized for throwing Supply Bags, but can throw Medic and a C4 as well
- ThrowATMineOrSupplyMedicBagC4() - Optimized for throwing AT mines, but can also throw C4, Supply and Medic bags as well
- ThrowC4() - Optimized to throw a single C4 and then switch to main weapon
- ThrowC4andSwitchToDetinator() - Optimized to throw 1x C4 and then switch to Detinator
- Throw2xC4andSwitchToDetinator() - Optimized to throw 2x C4 and then Switch to the Detinator
- Throw3xC4andSwitchToDetinator() - Optimized to throw 3x C4 and then Swtich to the Detinator
- Throw2xC4andExplode() - Optimized to throw 2x C4 and then immediately explode (you will be killed)
- ThrowC4andExplode() - Optimized to throw 1x C4 and immediately explode (you will be killed)
- Throw3xC4andExplode() - Optimized to throw 3x C4 and immediately explode (you will be killed)
- ThrowAny() - This is the catch all function if you change kits often. The delays have been slowed to work with all kits - not a good idea to use with SpecOps kit though
By default I mapped these functions to press the '5' key and 'Shift + 5'; however while sprinting you need to depress the Shift key briefly. The keymap is for 'Shift+5' allows the function to run, but you must depress the Shift key briefly (I tried using {LShift Up} and BlockInput, on and stuff, but I didn't get it to work).
You'll need to goto the bottom of this script and uncomment the function you wish to use. Currently pressing '5' or 'Shift+5' does nothing until you uncomment (remove the ';') in the script below:
| Code: | ;
; AutoHotkey Version: 1.1.2878+
; Language: English
; Platform: Win9x/NT
;
;
; Only run this script when bf2.exe is running in the foreground
;
#SingleInstance force
#InstallKeybdHook
#InstallMouseHook
SetTimer, KeepRunning
return
KeepRunning:
; Get the process name of the active window (i.e. Notepad.exe)
WinGet, szProcessName, ProcessName, A
if szProcessName = bf2.exe
{
Suspend, off
}
else
{
Suspend, on
}
return
;
; Disable the Window's keys so they don't switch to desktop while in-game
;
$LWin:: ; Left Windows Button
$RWin:: ; Right Windows Button
; Do nothing
return
$^CapsLock::
ExitApp
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Pressing Ctrl+V while BF2 is active
;
$^v::
Sleep 200
SetKeyDelay, 40
Send, {Space}%clipboard%
SetKeyDelay, 0
return
ThrowClaymoreOnly()
{
Send, {5 down}
Sleep 60
Send, {5 up}
Sleep 950
MouseClick, Left, , , , , D
sleep 100
MouseClick, Left, , , , , U
Send, {3 down}
Sleep 40
Send, {3 up}
}
ThrowMedicBag()
{
Send, {5 down}
Sleep 60
Send, {5 up}
Sleep 100
MouseClick, Left, , , , , D
sleep 400
MouseClick, Left, , , , , U
Send, {3 down}
Sleep 40
Send, {3 up}
}
ThrowSupplyOrMedicBagC4()
{
Send, {5 down}
Sleep 60
Send, {5 up}
Sleep 600
MouseClick, Left, , , , , D
sleep 400
MouseClick, Left, , , , , U
Send, {3 down}
Sleep 40
Send, {3 up}
}
ThrowATMineOrSupplyMedicBagC4()
{
Send, {5 down}
Sleep 60
Send, {5 up}
Sleep 999
MouseClick, Left, , , , , D
sleep 500
MouseClick, Left, , , , , U
Send, {3 down}
Sleep 40
Send, {3 up}
}
ThrowC4()
{
Send, {5 down}
Sleep 60
Send, {5 up}
Sleep 400
MouseClick, Left, , , , , D
sleep 100
MouseClick, Left, , , , , U
Send, {3 down}
Sleep 40
Send, {3 up}
}
ThrowC4andSwitchToDetinator()
{
Send, {5 down}
Sleep 60
Send, {5 up}
Sleep 500
MouseClick, Left, , , , , D
sleep 100
MouseClick, Left, , , , , U
Sleep 700
MouseClick, right, , , , , D
sleep 100
MouseClick, right, , , , , U
}
Throw2xC4andSwitchToDetinator()
{
Send, {5 down}
Sleep 60
Send, {5 up}
Sleep 500
MouseClick, Left, , , , , D
sleep 100
MouseClick, Left, , , , , U
Sleep 700
MouseClick, Left, , , , , D
sleep 100
MouseClick, Left, , , , , U
sleep 700
MouseClick, right, , , , , D
sleep 100
MouseClick, right, , , , , U
}
Throw3xC4andSwitchToDetinator()
{
Send, {5 down}
Sleep 60
Send, {5 up}
Sleep 500
MouseClick, Left, , , , , D
sleep 100
MouseClick, Left, , , , , U
Sleep 700
MouseClick, Left, , , , , D
sleep 100
MouseClick, Left, , , , , U
Sleep 700
MouseClick, Left, , , , , D
sleep 100
MouseClick, Left, , , , , U
sleep 700
MouseClick, right, , , , , D
sleep 100
MouseClick, right, , , , , U
}
Throw2xC4andExplode()
{
Send, {5 down}
Sleep 60
Send, {5 up}
Sleep 500
MouseClick, Left, , , , , D
sleep 100
MouseClick, Left, , , , , U
Sleep 700
MouseClick, Left, , , , , D
sleep 100
MouseClick, Left, , , , , U
sleep 700
MouseClick, right, , , , , D
sleep 100
MouseClick, right, , , , , U
Sleep 200
MouseClick, left, , , , , D
sleep 100
MouseClick, left, , , , , U
}
ThrowC4andExplode()
{
Send, {5 down}
Sleep 60
Send, {5 up}
Sleep 500
MouseClick, Left, , , , , D
sleep 100
MouseClick, Left, , , , , U
Sleep 700
MouseClick, right, , , , , D
sleep 100
MouseClick, right, , , , , U
Sleep 200
MouseClick, left, , , , , D
sleep 100
MouseClick, left, , , , , U
}
Throw3xC4andExplode()
{
Send, {5 down}
Sleep 60
Send, {5 up}
Sleep 500
MouseClick, Left, , , , , D
sleep 100
MouseClick, Left, , , , , U
Sleep 700
MouseClick, Left, , , , , D
sleep 100
MouseClick, Left, , , , , U
Sleep 700
MouseClick, Left, , , , , D
sleep 100
MouseClick, Left, , , , , U
sleep 700
MouseClick, right, , , , , D
sleep 100
MouseClick, right, , , , , U
Sleep 200
MouseClick, left, , , , , D
sleep 100
MouseClick, left, , , , , U
}
ThrowAny() ; Slow
{
Send, {5 down}
Sleep 60
Send, {5 up}
Sleep 1000
MouseClick, Left, , , , , D
sleep 500
MouseClick, Left, , , , , U
Send, {3 down}
Sleep 40
Send, {3 up}
}
;
; Remove Comment ';' to do that function
;
$5::
$+5:: ; Shift + 5 (must depress Shift briefly - can't use kit while sprinting)
;ThrowClaymoreOnly()
;ThrowMedicBag()
;ThrowSupplyOrMedicBagC4()
;ThrowATMineOrSupplyMedicBagC4()
;ThrowC4()
;ThrowC4andSwitchToDetinator()
;Throw2xC4andSwitchToDetinator()
;Throw3xC4andSwitchToDetinator()
;Throw2xC4andExplode()
;ThrowC4andExplode()
;Throw3xC4andExplode()
;ThrowAny() ; Slow
return |
_________________ //TODO: Create kewl sig... |
|
| Back to top |
|
 |
BF2fan Guest
|
Posted: Sun Jul 30, 2006 11:21 pm Post subject: thanks |
|
|
wow thanks Harmor! there are some great scripts in there.
you said your TV click wasn't working, but u have your middle mouse button set to click repeatedly...isn't that what you want for the tv?
i tried to change your previous example to my mouse button 4 but it didn't work
XButton1::
Loop
{
Sleep 90
GetKeyState, MButtonState, LButton, P
if MButtonState = U
break
MouseClick, left,,, 1, 0, D
Sleep, 10
MouseClick, left,,, 1, 0, U
} |
|
| Back to top |
|
 |
Harmor
Joined: 06 Nov 2005 Posts: 183
|
Posted: Mon Jul 31, 2006 3:58 am Post subject: Re: thanks |
|
|
Try this:
| Code: | XButton1::
Loop
{
Sleep 90
GetKeyState, XButtonState, XButton1, P
if XButtonState = U
break
MouseClick, left,,, 1, 0, D
Sleep, 10
MouseClick, left,,, 1, 0, U
} |
_________________ //TODO: Create kewl sig... |
|
| Back to top |
|
 |
Matti Guest
|
Posted: Mon Jul 31, 2006 7:36 am Post subject: |
|
|
Heya guys, it seems you really know your stuff!
I'm having a hard time firuring this out to be honest.
There is this one clan we have been playing against in BF2 that seem to be flying everywhere.
Basicly what we see them do is dolphin dive but still able to shoot us really fast.
I was wondering if someone could show me the script I need just to use that, then I can move onto other ones.
If possible can you make one where regular keyes such as (h/z) were used for prone or crouch so I can then change the keyes accordingly.
It's not a prome spammer I need it's a dolphin diving one that works real good .
Thanks for any assistancee guys.
Regards |
|
| Back to top |
|
 |
Harmor
Joined: 06 Nov 2005 Posts: 183
|
Posted: Mon Jul 31, 2006 2:02 pm Post subject: |
|
|
Won't be possible in 1.40 because they are adding a delay to stop that. But if you want to try and tweak the speed to your liking...here's a snippet to get you started:
| Code: | ;
; Prone spam
;
$x::
Send, {x Down}
Sleep 100
Send, {z Down}
Send, {x Up}
Sleep 100
Send, {z Up}
Sleep 100
Send, {x Down}
Sleep 100
Send, {x Up}
Sleep 100
return |
NOTE: 'x' is mapped to crouch and 'z' is mapped to prone. _________________ //TODO: Create kewl sig...
Last edited by Harmor on Mon Jul 31, 2006 10:56 pm; edited 1 time in total |
|
| Back to top |
|
 |
Lanser
Joined: 24 Mar 2006 Posts: 20
|
Posted: Mon Jul 31, 2006 2:07 pm Post subject: |
|
|
Here is a method to QuickSwitch between your current and previous weapon Half-Life/CS style ...
Pressing 'F' performs the QuickSwitch. As you press the weapon keys 1 through 6 (didn't think a quickswitch between 7 and 8 for gas and goggles was worth it) they updates variables.
| Code: |
;GameName = notepad.exe ; use when testing in notepad
GameName = bf2.exe ; Set exe name here
KeySleep1 = 100 ; Ideal Sleep time for BF2 commands (check?, SetKeyDelay influence?)
v_InTextChatOn := False ; Used for pausing running of Script
v_LastUsedWeapon = 3 ; Initialise as Primary Weapon 3
v_LastStoredWeapon = 3 ; Initialise as Primary Weapon 3
#Persistent
#NoEnv ; prevents empty variables from being looked up
#SingleInstance force
#InstallKeybdHook
#InstallMouseHook
SetKeyDelay, 75, 75 ; NB: Once "WeaponSelect()" added this was needed!!
SetTimer, KeepRunning ; Only run this script when {BF2.exe} is running in the foreground
Return
;;;; Timer related ;;;;
KeepRunning:
; Get the process name of the active window (i.e. Notepad.exe)
; Only run this script when Battlefield 2 {BF2.exe} is running in the foreground.
WinGet, szProcessName, ProcessName, A
If szProcessName = %GameName% ; Determine if window Active, enable hotkeys
{
; If running check to determine whether in chat mode.
If (v_InTextChatOn == False) ; Text chat isn't active so allow hotkeys
{
Suspend, off
}
Else if (v_InTextChatOn == True) ; Text chat is active so disable hotkeys
{
Suspend, on
}
}
Else ; Else window inactive, disable hotkeys
{
Suspend, on
}
Return
; --------------------
; Quickswitch related.
$1::WeaponSelect(1)
$2::WeaponSelect(2)
$3::WeaponSelect(3)
$4::WeaponSelect(4)
$5::WeaponSelect(5)
$6::WeaponSelect(6)
$f::Goto, QuickSwitch
QuickSwitch:
KeyPress(ByVar v_LastUsedWeapon) ; QuickSwitch: "v_LastUsedWeapon" is declared globally and stored by "QuickSwitchVar()" function
return
QuickSwitchVar(v_ChosenWeapon)
; 1.Edit Store previous weapon, 2. Placeholder variable for current weapon so next use of function can determine previous weapon
{
Global v_LastUsedWeapon
Global v_LastStoredWeapon
v_LastUsedWeapon = %v_LastStoredWeapon% ; QuickSwitch: Previous run stored source for this variable. Used to record last used Weapon and used in QuickSwitch usage
v_LastStoredWeapon = %v_ChosenWeapon% ; QuickSwitch: Stored so the following call of function can determine Previous Weapon
}
WeaponSelect(v_ChosenWeapon)
; Select weapon 1 - 6 %v_ChosenWeapon%
{
If( v_ChosenWeapon > 0 and v_ChosenWeapon < 7)
{
Global v_LastStoredWeapon ; QuickSwitch: Declare this to to access it and determine previous weapon
If( v_ChosenWeapon <> v_LastStoredWeapon) ; QuickSwitch: If current weapon wasn't pressed last time then ...
QuickSwitchVar(ByRef v_ChosenWeapon) ; ... update variables for weapon history.
Send, {%v_ChosenWeapon% Down}
Sleep %KeySleep1%
Send, {%v_ChosenWeapon% Up}
}
Else
Send, @huh????%v_ChosenWeapon%
Sleep 50
}
KeyPress(v_KeyName)
{
Send, {%v_KeyName% Down}
Sleep %KeySleep1%
Send, {%v_KeyName% Up}
If( v_KeyName > 0 and v_KeyName < 7) ; QuickSwitch: Check if weapon, between 1-8, should it be 1-6 as NightVision and gas Mask not really need in the switch?
; NB: Above 'If' only needed if Quickswitch desired.
{
v_ChosenWeapon = %v_KeyName%
QuickSwitchVar(ByRef v_ChosenWeapon)
}
}
; --------------------
|
Thanks go to Harmor and his L2: Game Assistant script for ideas on how to better use functions
http://www.autohotkey.com/forum/viewtopic.php?t=6542
EDIT: If you're a pilot and normally use 'F' to switch between Air and Ground weapons you'll have to press keys 1 and 2 as soon as you hop in the cockpit.
Last edited by Lanser on Sun Oct 15, 2006 2:16 pm; edited 3 times in total |
|
| Back to top |
|
 |
Lanser
Joined: 24 Mar 2006 Posts: 20
|
Posted: Mon Jul 31, 2006 2:19 pm Post subject: Pause Hotkeys |
|
|
We are all probably using similar methods so that the Hotkeys we set up only work within BF2. A lot of my Hotkeys work without modifiers so text chat can be confusing unless I disable the hotkeys. Here is my variation, it only works when BF2.EXE is active but Hotkeys are disabled when I press "Pause" on the keyboard and a Voice Warning is giving using Microsofts speech engine. It uses the voice you currently have selected in the Speech Applet in the control panel. I'm using one of the Cepstral voices so it sounds a lot nicer than the default Microsoft one.
| Code: |
s_HotKeyDisable := "Hot keys disabled"
s_HotKeyEnable := "Hot keys enabled"
SetTimer, KeepRunning ; Only run this script when {BF2.exe} is running in the foreground
*Pause::
; Pauses hotkeys to enable text chat (J,K,L). Variable is used by "KeepRunning" routine.
Suspend, Permit
If (v_InTextChatOn == False)
{
Suspend, On
v_InTextChatOn := True
SpeakThis(ByRef s_HotKeyDisable)
}
Else
{
Suspend, Off
v_InTextChatOn := False
SpeakThis(ByRef s_HotKeyEnable)
}
Return
;;;; Timer related ;;;;
KeepRunning:
; Get the process name of the active window (i.e. Notepad.exe)
; Only run this script when Battlefield 2 {BF2.exe} is running in the foreground.
WinGet, szProcessName, ProcessName, A
If szProcessName = %GameName% ; Determine if window Active, enable hotkeys
{
; If running check to determine whether in chat mode.
If (v_InTextChatOn == False) ; Text chat isn't active so allow hotkeys
{
Suspend, off
}
Else if (v_InTextChatOn == True) ; Text chat is active so disable hotkeys
{
Suspend, on
}
}
Else ; Else window inactive, disable hotkeys
{
Suspend, on
}
Return
SpeakThis(SayThis)
; http://www.autohotkey.com/forum/topic3719.html
{
TEMPFILE = %TEMP%\SpeakThis.vbs
IfExist, %TEMPFILE%
FileDelete, %TEMPFILE%
FileAppend, Dim Talk`nSet Talk = WScript.CreateObject("SAPI.SpVoice")`nTalk.Speak "%SayThis%", %TEMPFILE%
RunWait, %TEMPFILE%
FileDelete, %TEMPFILE%
}
|
|
|
| Back to top |
|
 |
Harmor
Joined: 06 Nov 2005 Posts: 183
|
Posted: Mon Jul 31, 2006 10:46 pm Post subject: |
|
|
Hmm...anyone have any experience with PixelSearch in BF2?
I was thinking of making a macro that would play a MP3 when you take damage. Alot of times while flying a helicopter I start taking damage but don't notice it.
I'll play around with it and see what I can come up with...but if the coordinate system is screwy...may not be possible. _________________ //TODO: Create kewl sig... |
|
| Back to top |
|
 |
Harmor
Joined: 06 Nov 2005 Posts: 183
|
Posted: Mon Jul 31, 2006 10:48 pm Post subject: |
|
|
| Lanser wrote: | Here is a method to QuickSwitch between your current and previous weapon Half-Life/CS style ...
|
You probably want to change the variable for %KeySleep1% for each key. See each weapon/tool has a different delay. Try switching to a AT mine or grenade and then a grenade launcher...you'll see what I mean. _________________ //TODO: Create kewl sig... |
|
| Back to top |
|
 |
Lanser
Joined: 24 Mar 2006 Posts: 20
|
Posted: Tue Aug 01, 2006 1:33 am Post subject: |
|
|
| Harmor wrote: | | Lanser wrote: | Here is a method to QuickSwitch between your current and previous weapon Half-Life/CS style ...
|
You probably want to change the variable for %KeySleep1% for each key. See each weapon/tool has a different delay. Try switching to a AT mine or grenade and then a grenade launcher...you'll see what I mean. |
Just as well you pointed that out, my BF2 script is so big I sometimes forget the littlest of details that make it work perfectly. So in order for the "WeaponSelect()" function to work perfectly you must use
| Code: |
SetKeyDelay, 50, 50 ; NB: Once "WeaponSelect()" added this was needed!! |
%KeySleep1% is a variable used for default keystrokes. NB: You must use SetKeyDelay or the WeaponSelect() function doesn't work correctly. I think any AutoHotkey user becomes familiar with trial and error.
Now for another idea i use. Commo Rose interaction. In order to use my method of Commo Rose interaction you must edit the "Controls.con" file to allow to use the Keyboard Numpad for navigating the Commo Rose. Instructions how to do this can be found here ...
http://www.totalbf2.com/forums/showpost.php?p=803548&postcount=74
... once you have done this, you can easily mimic successful Commo Rose interaction. I've used this successfully with boh AutoHotkey and Voice Recognition software.
Examples of simulating Commo Rose interaction using Numpad ...
| Code: |
KeySleepQT = 150 ; Ideal Sleep time for Commo Rose Q,T commands
$*#WheelUp:: ; Example
Goto, QThanks
$*+WheelUp:: ; Example
Goto, QNeedMedic
;##############################################################################
;### Commo Rose Actions #######################################################
;##############################################################################
QGoGoGo: ; COMMO ROSE Go, Go, Go {Q 8 5}
Send, {q Down}
Sleep %KeySleepQT%
Send, {Numpad8 Down}
Sleep %KeySleepQT%
Send, {Numpad8 Up}
Sleep %KeySleepQT%
Send, {Numpad5 Down}
Sleep %KeySleepQT%
Send, {Numpad5 Up}
Sleep %KeySleepQT%
Send, {q Up}
Return
QThanks: ; COMMO ROSE Thanks {Q 4 5}
Send, {q Down}
Sleep %KeySleepQT%
Send, {Numpad4 Down}
Sleep %KeySleepQT%
Send, {Numpad4 Up}
Sleep %KeySleepQT%
Send, {Numpad5 Down}
Sleep %KeySleepQT%
Send, {Numpad5 Up}
Sleep %KeySleepQT%
Send, {q Up}
Return
QNeedMedic: ; COMMO ROSE Need Medic/Repairs (Q 4 2 5)
Send, {q Down}
Sleep %KeySleepQT%
Send, {Numpad4 Down}
Sleep %KeySleepQT%
Send, {Numpad4 Up}
Sleep %KeySleepQT%
Send, {Numpad2 Down}
Sleep %KeySleepQT%
Send, {Numpad2 Up}
Sleep %KeySleepQT%
Send, {Numpad5 Down}
Sleep %KeySleepQT%
Send, {Numpad5 Up}
Sleep %KeySleepQT%
Send, {q Up}
Return
QSorry: ; COMMO ROSE Sorry {Q 6 5}
Send, {q Down}
Sleep %KeySleepQT%
Send, {Numpad6 Down}
Sleep %KeySleepQT%
Send, {Numpad6 Up}
Sleep %KeySleepQT%
Send, {Numpad5 Down}
Sleep %KeySleepQT%
Send, {Numpad5 Up}
Sleep %KeySleepQT%
Send, {q Up}
Return
QNeedAmmo: ; COMMO ROSE Need Ammo (Q 6 2 5)
Send, {q Down}
Sleep %KeySleepQT%
Send, {Numpad6 Down}
Sleep %KeySleepQT%
Send, {Numpad6 Up}
Sleep %KeySleepQT%
Send, {Numpad2 Down}
Sleep %KeySleepQT%
Send, {Numpad2 Up}
Sleep %KeySleepQT%
Send, {Numpad5 Down}
Sleep %KeySleepQT%
Send, {Numpad5 Up}
Sleep %KeySleepQT%
Send, {q Up}
Return
QFollowMe: ; COMMO ROSE Follow Me {Q 2 5}
Send, {q Down}
Sleep %KeySleepQT%
Send, {Numpad2 Down}
Sleep %KeySleepQT%
Send, {Numpad2 Up}
Sleep %KeySleepQT%
Send, {Numpad5 Down}
Sleep %KeySleepQT%
Send, {Numpad5 Up}
Sleep %KeySleepQT%
Send, {q Up}
Return
;#############################################################################
;### End of Script ###########################################################
;############################################################################# |
|
|
| Back to top |
|
 |
Lanser
Joined: 24 Mar 2006 Posts: 20
|
Posted: Tue Aug 01, 2006 1:41 am Post subject: |
|
|
| Harmor wrote: | Hmm...anyone have any experience with PixelSearch in BF2?
I was thinking of making a macro that would play a MP3 when you take damage. Alot of times while flying a helicopter I start taking damage but don't notice it.
I'll play around with it and see what I can come up with...but if the coordinate system is screwy...may not be possible. |
I haven't used PixelSearch as yet within BF2 but I do recall stumbling across a thread on these forums where someone had used it in Gunz but for the life of me I can't find it now!!!. As a future project I've been pondering experimenting with PixelSearch. Your idea about chopper damage is nice, maybe used to warn when you are low on ammo or health too. |
|
| Back to top |
|
 |
Harmor
Joined: 06 Nov 2005 Posts: 183
|
Posted: Tue Aug 01, 2006 1:50 am Post subject: |
|
|
| Lanser wrote: | | Now for another idea i use. Commo Rose interaction. In order to use my method of Commo Rose interaction you must edit the "Controls.con" file to allow to use the Keyboard Numpad for navigating the Commo Rose. |
Actually you don't need to modify the 'Controls.con' file. There's a program out there called "JoyToKey" that can do it or you can run this script that uses your mouse:
| Code: | ;
; Press Joy5 to say "I'm sorry" using the Cammo Rose while flying
;
$Joy5::
Send, {q Down}
Sleep 200
DllCall("mouse_event", uint,1, int,300, int,10, uint,0, int,0 )
Sleep 40
MouseClick, Left, , , , , D
sleep 40
MouseClick, Left, , , , , U
Send, {q Up}
return |
See using the "DllCall("mouse_event"...)" function you can move the mouse to select whichever cammo rose item you need. MouseMove doesn't seem to work. I think I tried SendEvent as well, but don't recall the result. I've been happy with the DllCall method above and it doesn't require any modification to any files. _________________ //TODO: Create kewl sig... |
|
| Back to top |
|
 |
Lanser
Joined: 24 Mar 2006 Posts: 20
|
Posted: Tue Aug 01, 2006 2:13 am Post subject: |
|
|
| Harmor wrote: | | Lanser wrote: | | Now for another idea i use. Commo Rose interaction. In order to use my method of Commo Rose interaction you must edit the "Controls.con" file to allow to use the Keyboard Numpad for navigating the Commo Rose. |
Actually you don't need to modify the 'Controls.con' file. There's a program out there called "JoyToKey" that can do it or you can run this script that uses your mouse:
| Code: | ;
; Press Joy5 to say "I'm sorry" using the Cammo Rose while flying
;
$Joy5::
Send, {q Down}
Sleep 200
DllCall("mouse_event", uint,1, int,300, int,10, uint,0, int,0 )
Sleep 40
MouseClick, Left, , , , , D
sleep 40
MouseClick, Left, , , , , U
Send, {q Up}
return |
See using the "DllCall("mouse_event"...)" function you can move the mouse to select whichever cammo rose item you need. MouseMove doesn't seem to work. I think I tried SendEvent as well, but don't recall the result. I've been happy with the DllCall method above and it doesn't require any modification to any files. |
Yeah, I'm already using JoyToKey (couldn't live without that one button spot when flying) but this method was born out of using Voice Recognition software to issue Commo Rose commands automatically. So you say "Sorry", "Need Repairs" etc out loud and the Commo Rose command is played out for you. I had initially used Autohotkey but at the time wanted to eliminate it and as always the perfect solution came up with the Numpad method. I'm sure you too have experienced MouseMove was highly unreliable within BF2 but DllCall works better. At the time I needed a flawless works 100% of the time method and the Numpad method was there at the right time. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|