AutoHotkey Community

It is currently May 27th, 2012, 10:05 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: BF2: Crouch - Prone
PostPosted: June 9th, 2006, 2:54 pm 
Offline

Joined: November 6th, 2005, 5:25 am
Posts: 182
Here's a little script that I use to crouch-prone repeatedly:

Code:
;
; AutoHotkey      Version: 1.x
; Language:       English
; Platform:       Win9x/NT
;
; Setup:
;    1.  Map Crouch to 'x'
;    2.  Map Prone to 'z'
;
; Description:
;     1. Press 'x' to go prone to standing repeatedly
;
#SingleInstance force
#InstallKeybdHook
;
; Only run this script when BF2.exe is running in the foreground
;
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

$^CapsLock::
   ExitApp
return

$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}

return


You may want to change the timing to suit you. If you do please post your changes.

_________________
//TODO: Create kewl sig...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 26th, 2006, 5:14 am 
Offline

Joined: July 26th, 2006, 4:58 am
Posts: 1
Harmor, you know me from TBF2 right?

Is it possible for you to make your script so that you go from jumping to prone to crouch then jump? All by pressing one key?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 26th, 2006, 7:53 pm 
Offline

Joined: November 6th, 2005, 5:25 am
Posts: 182
I tried
Code:
$c::
   Send, {x Down}
   Sleep 100
   Send, {d Down}
   Send, {x Up}
   Sleep 100
   Send, {Space Down}
   Sleep 500
   Send, {d Up}
   Send, {Space Up}
   Sleep 100
   Send, {x Down}
   Sleep 100
   Send, {z Down}
   Send, {x Up}
   Sleep 100
   Send, {z Up}
   Sleep 100
return


But I don't like the timing...still have to futs with it. NOTE: Couch is mapped to 'x' and prone is mapped to 'z'.

_________________
//TODO: Create kewl sig...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 4th, 2006, 11:20 pm 
OK i got two questons. The first one is i used ur script and addewd some stuff. Here it is:
Code:
;
; AutoHotkey      Version: 1.x
; Language:       English
; Platform:       Win9x/NT
;
; Setup:
;    1.  Map Crouch to 'x'
;    2.  Map Prone to 'z'
;
; Description:
;     1. Press 'x' to go prone to standing repeatedly
;
#SingleInstance force
#InstallKeybdHook
;
; Only run this script when BF2.exe is running in the foreground
;
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

$^CapsLock::
   ExitApp
return

$c::
   Send, {w down}   
   Sleep 50
   Send, {z Down}
   Sleep 80
   Send, {LCtrl Down}
   Send, {z Up}
   Sleep 80
   Send, {LCtrl Up}
   Sleep 80
   Send, {z  Down}
   Sleep 80
   Send, {z Up}
   Sleep 80
   Send, {w up}
   return


$x::
   Send, {a down}   
   Sleep 50
   Send, {z Down}
   Sleep 80
   Send, {LCtrl Down}
   Send, {z Up}
   Sleep 80
   Send, {LCtrl Up}
   Sleep 80
   Send, {z  Down}
   Sleep 80
   Send, {z Up}
   Sleep 80   
   Send, {a up}
   return


$v::
   Send, {d down}   
   Sleep 50
   Send, {z Down}
   Sleep 80
   Send, {LCtrl Down}
   Send, {z Up}
   Sleep 80
   Send, {LCtrl Up}
   Sleep 80
   Send, {z  Down}
   Sleep 80
   Send, {z Up}
   Sleep 80
   Send, {d up}
   return

What i added was directions so i cud left right or forward.
What my first ques. is is that when i hold down x to go left and dive it works fine but then when i switch to c and go forward it delays for bout 5 seconds and keeps goin left. And it is the same with going right. I don't know if it is the sleep or delay but I need help on this. And what is the command hotkey for pausing a script. I want to add this to that script so i can pause it and un pause it whenever i can.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 15th, 2006, 7:00 am 
Offline

Joined: August 15th, 2006, 6:28 am
Posts: 3
Im new at this so do I copy the scripts and add them to autohotkey ? and if you do how?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 15th, 2006, 7:35 am 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Please read the manual. !!!

Save the script to a text file with the extension ".ahk".
If you have AHK installed normally, you should be able to run the script with a doubleclick on the file.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 15th, 2006, 9:36 am 
@ darkmaster
[AHK Quick Start]
Comeback when you're done ! :?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 15th, 2006, 1:48 pm 
SuperTyphoon wrote:
Harmor, you know me from TBF2 right?

Is it possible for you to make your script so that you go from jumping to prone to crouch then jump? All by pressing one key?


map the right Alt Button to prone

#Persistent
#InstallKeybdHook
SetKeyDelay, 75, 75
; increase responsiveness
;#MaxThreadsPerHotkey 20
;#MaxThreadsBuffer on

$~LAlt::
{
Send, {LCtrl}
Send, {Space}
Sleep, 200
Send, {RAlt}
Sleep, 300

}
Return


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 16th, 2006, 4:55 am 
Offline

Joined: August 15th, 2006, 6:28 am
Posts: 3
What version of autohotkey you guys are using ? And I read the manual and its still very confusing? All I want to do is be able to make a gun single shot that cant be single shot like the pkm or rpk.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 16th, 2006, 5:37 am 
darkmaster wrote:
What version of autohotkey you guys are using ? And I read the manual and its still very confusing? All I want to do is be able to make a gun single shot that cant be single shot like the pkm or rpk.


Hmm not possible, that is a hack.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 16th, 2006, 9:00 am 
ok i put
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
;
; Setup:
; 1. Map Crouch to 'x'
; 2. Map Prone to 'z'
;
; Description:
; 1. Press 'x' to go prone to standing repeatedly
;
#SingleInstance force
#InstallKeybdHook
;
; Only run this script when BF2.exe is running in the foreground
;
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

$^CapsLock::
ExitApp
return

$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}

return


and it says error at line 1 or something
says that will all the other scripits i tried aswell


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 16th, 2006, 9:50 pm 
Did u dl the latest version?


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 23 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