AutoHotkey Community

It is currently May 24th, 2012, 6:04 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1913 posts ]  Go to page Previous  1 ... 49, 50, 51, 52, 53, 54, 55 ... 128  Next
Author Message
 Post subject:
PostPosted: February 12th, 2007, 3:17 pm 
"waffengrenadier" - das nenn ich doch mal nen abgefahrenen nick :lol:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 12th, 2007, 10:08 pm 
Code:
#NoEnv
SendMode Input

_auto := true

~LButton::autofire()
+LButton::_auto := ! _auto
+RButton::ExitApp

autofire()
{
  global _auto
  if _auto
  {
    Loop
    {
      if GetKeyState("LButton", "P")
      {
        SendInput {LButton DownTemp}
        Sleep 85
        mouseXY(0, 6)
        SendInput {LButton Up}
        Sleep 45
      }
      else
        break
    } ;; loop
  } ;; if
} ;; autofire()

mouseXY(x,y)
{
    DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
}

;;;;;;
;;; End script
;;;;;;
;
; 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
#NoEnv
SendMode, Input


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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Pressing Ctrl+V while BF2 is active
$^v::
   Sleep 200
   SetKeyDelay, 30, 30
   Send,  {Space}%clipboard%
   SetKeyDelay, 0
return

MouseEvent(a_xpos, a_ypos)
{
   DllCall("mouse_event", uint,1, int,a_xpos, int,a_ypos, uint,0, int,0 )
}

$MButton::
   ; Pistol         9
   ; G36E (burst fire)  6
   ; G36E (single shot) 4
   ; G36E (zoomed)   2
   ; DAO 16

   Loop
   {
      Sleep 90
      GetKeyState, MButtonState, MButton, P
      if MButtonState = U
         break
      MouseClick, left,,, 1, 0, D
      Sleep, 20
      MouseClick, left,,, 1, 0, U
      ; Correct for bullet deviation by moving down Y pixels
      MouseEvent(0,6)
   }

return



Shift + Rbutton closes the ap, how can i set this not to happen, or shift + Ctrnl + Alt is to close the app?

also a beep needs to be included to indicte the app being on or off.

i dont no how to do this, thanks

SHENTON[/code]


Report this post
Top
  
Reply with quote  
 Post subject: Shoot and spot
PostPosted: February 13th, 2007, 6:09 am 
So can some one first of all, tell me what I should do to get these scripts working and what is the shoot and spot macro.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 13th, 2007, 12:38 pm 
Offline

Joined: October 14th, 2006, 8:46 am
Posts: 18
SHENTON. wrote:
Shift + Rbutton closes the ap, how can i set this not to happen, or shift + Ctrnl + Alt is to close the app?

also a beep needs to be included to indicte the app being on or off.

i dont no how to do this, thanks
SHENTON


Change the

Code:
+RButton::ExitApp


To

Code:
^+!RButton::ExitApp


Or just remove it.

From your script.

Here you can use some code that tells you with a noise if you're suspending or unsuspending your script.

Code:
;; script - Suspend with sound!
;; usage:  press Control + backslash (\) to toggle suspend
;;             put this anywhere in your script to enable it
;;
^\::
  Suspend, permit
  Suspend toggle
  if (A_IsSuspended)
    SoundPlay %A_Windir%\Media\Windows XP Minimize.wav
  else
    SoundPlay %A_Windir%\Media\Windows XP Restore.wav
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 13th, 2007, 2:08 pm 
lo...
I need advice how to make those scripts like one piece coz when crouch is on - doubleclick (ironsight) doesn't work

thank you

Quote:
~RButton::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500) {
Sleep 200 ; wait for right-click menu, fine tune for your PC
Send {s down}
Sleep 60
Send {s up}
}

;second script - crouch

state=up
SetKeyDelay, -1, 100

Hotkey, CONTROL , Run
return

Run:
if state = up
{
Send, {CONTROL down}
state=down
}
else
{
Send, {CONTROL up}
state=up
}
return


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 13th, 2007, 3:03 pm 
carsong wrote:
SHENTON. wrote:
Shift + Rbutton closes the ap, how can i set this not to happen, or shift + Ctrnl + Alt is to close the app


Ok thanks man, great help



Next i have a new problem, on my tv gunner script it works fine apart from i hve to click the missle myself.
is there anyway i can add like 10clicks to every 1 time i click my leftmouse button?....giving the affect of just holding down the mouse to 'auto click'
Code:
#InstallKeybdHook
#InstallMouseHook
SetKeyDelay, 20
SetMouseDelay, 20

$MButton::

Loop
{
Loop
{

 Sleep, 100
 GetKeyState, state, MButton, P
 if MButton state = D
 break
 }
 send, {F2 down}
 sleep 100
 send, {F2 up}
 sleep 100
 Send, {MouseClick, right, D}
 sleep 50
 Send, {MouseClick, right, U}
 sleep 40
 Send, {MouseClick, left, D}
 sleep 40
 Send, {MouseClick, left, U}
 Sleep 40
 Send, {MouseClick, left, D}
 sleep 40
 Send, {MouseClick, left, U}
 sleep 40
 Send, {MouseClick, left, D}
 sleep 40
 Send, {MouseClick, left, U}

 return
 }


Thanks, SHENTON


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 13th, 2007, 8:42 pm 
Offline

Joined: October 14th, 2006, 8:46 am
Posts: 18
SHENTON. wrote:
Next i have a new problem, on my tv gunner script it works fine apart from i hve to click the missle myself. is there anyway i can add like 10clicks to every 1 time i click my leftmouse button?....giving the affect of just holding down the mouse to 'auto click'


This script clicks ten times each time you'd press the mouse button.

Code:
lbutton::
loop 10
{
  SendInput {LButton down}
  Sleep 80
  SendInput {LButotn Up}
  Sleep 80
}


Or maybe you just want to click over and over again to guide the missile until it hits the target.

You'd just do this:

Code:
g::
  SetTimer bclick, 80
  KeyWait, g, U
  SetTimer, bclick, off
return

bclick:
  SendInput {LButton down}
  Sleep 80
  SendInput {LButton Up}
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 13th, 2007, 9:32 pm 
Kato wrote:
try this, i think your timings are out a bit
Code:
#Persistent
#InstallKeybdHook
$LAlt::
   Send, {5 down}
   Sleep 60
   Send, {5 up}
   Sleep 600
   MouseClick, Left, , , , , D
   sleep 500
   MouseClick, Left, , , , , U
   Send, {3 down}
   Sleep 40
   Send, {3 up}
   return
   exit


How can i change the hotkey "Alt" --> to "F" ?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 13th, 2007, 9:46 pm 
Offline

Joined: October 14th, 2006, 8:46 am
Posts: 18
Guest22 wrote:
How can i change the hotkey "Alt" --> to "F" ?


Change
Code:
$LAlt
to
Code:
$f
in your example.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 14th, 2007, 2:36 pm 
Thanks m8. works perfectly now =)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 14th, 2007, 2:40 pm 
Quote:
How can i change the hotkey "Alt" --> to "F" ?
GOSH. Obviously able to read&write - those freaks are to lazy to think on their own. :x


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 14th, 2007, 7:33 pm 
i need a commander spot macro , any1 got anything?


Report this post
Top
  
Reply with quote  
 Post subject: multi
PostPosted: February 15th, 2007, 1:43 am 
how can u run multi scripts,ie:rapid fire and toggle crouch in one script


Report this post
Top
  
Reply with quote  
 Post subject: ???
PostPosted: February 15th, 2007, 3:57 pm 
How can you use thse macros im new?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2007, 10:32 pm 
Can someone post a fullauto m16/pistol macro ? I had one but its too fast/inaccurate :(


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1913 posts ]  Go to page Previous  1 ... 49, 50, 51, 52, 53, 54, 55 ... 128  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google Feedfetcher, mc-lemons, rbrtryn, Relayer, tic, trismarck and 11 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