AutoHotkey Community

It is currently May 24th, 2012, 8:26 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1913 posts ]  Go to page Previous  1 ... 57, 58, 59, 60, 61, 62, 63 ... 128  Next
Author Message
 Post subject: Re: script
PostPosted: March 14th, 2007, 4:07 pm 
Offline

Joined: August 27th, 2006, 1:23 am
Posts: 96
Location: Germany
ghosty2006 wrote:
ghosty2006 wrote:
is there any script when i join a server it can select a kit for me and move me about when im AFK

need one so i can get my hours up when im actually sleeping in my bed

so what i need is a script that will spawn me with a kit i desire even when the round finnishes for it to keep doing it untill next morning


LoL that would be bad Stats played for hours and dont get a kill or any point...

Dont count on my help...

_________________
Try to build a German Fun-Clan, Click the Banner ;)
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 14th, 2007, 8:49 pm 
I am currently using the below code that I have gotten from then thread.

Code:
gActivateScript = 0

; Insert to activate the macro

~Insert::
KeyWait, Insert
GetKeyState, InsertState, Insert, T
If InsertState = D
{
    gActivateScript = 1
    SoundBeep, 750, 100
    SoundBeep, 750, 100
}
else
{
    gActivateScript = 0
    SoundBeep, 500, 200
}
return

; CTRL + SHIFT + LBUTTON to activate the macro
~+^LButton::
If gActivateScript = 0
{
    gActivateScript = 1
    SoundBeep, 750, 100
    SoundBeep, 750, 100
}
else
{
    gActivateScript = 0
    SoundBeep, 500, 200
}
return


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


;Also applies to burst weapons. ie click and hold will perform like a full auto firing mode
~LButton::
Goto, DoFiringLoop
Return

;When crouching and firing at the same time. Using Ctrl as crouch button
~^LButton::
Goto, DoFiringLoop
Return

DoFiringLoop:
if gActivateScript = 1
{
    Loop
    {
       ;Make sure BF2 window is the active window. Don't want weird mouse behaviour appearing at other windows
        IfWinActive, BF2
        {
            MouseClick, left,,, 1, 0, D
           ;delay between simu. mouse btn down and up (50 = normal, 25 = faster)
            Sleep, 50
            MouseClick, left,,, 1, 0, U
            GetKeyState, LButtonState, LButton, P
            If LButtonState = U
            {
               ;break the loop if physical state of mouse btn is up.
                break
            }
           ;delay between each simu. click events
            Sleep, 25
[b];   MouseEvent(0,6)[/b] 
        }
        else
        {
            break
        }
    }
   
}
exit

return



I tried to add the "anti recoil" code in (commented out for now). When I add it back in it actually makes my gun move up more. I have read in this thread that you cannont count on the mouse position in BF2.

1) Does the anti recoil code work at all?
2) why is it moving the gun up and not down?
3) Does it have to do with the timings?

thanks


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 14th, 2007, 9:38 pm 
Offline

Joined: August 27th, 2006, 1:23 am
Posts: 96
Location: Germany
1)Yeah it works :)
2)Your MouseEvent was on false position so it does move up like every Gun normaly do. (Recoil) :)
3)No it haven´t! But i read in your comments sth. about Sleep 25 that could maybe to low since the patch 1.41

Try your script now, i edited it a bit... (i removed a part cause i think u activate your macro only with the Enter key)

_________________
Try to build a German Fun-Clan, Click the Banner ;)
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 14th, 2007, 10:15 pm 
thanks pOrnsTaR*.

I have a couple of other questions for you regarding this code.

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



$Numpad8::
;~Lbutton::
Loop
{
   Sleep 40
   GetKeyState, NumpadState, Numpad8, P
   if NumpadState = U
      break
   MouseClick, left,,, 1, 0, D
   Sleep, 40
   MouseClick, left,,, 1, 0, U
   MouseEvent(0,6)
;   SoundBeep, 500, 200 
}
return 




The code works when I use $Numpad8. However, if I substitute $Numpad8 for $Lbutton it does not.

What's the difference from $Lbutton and ~Lbutton?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 15th, 2007, 1:02 am 
Offline

Joined: August 27th, 2006, 1:23 am
Posts: 96
Location: Germany
fatmacro2 wrote:

What's the difference from $Lbutton and ~Lbutton?
I am learning most stuff here too. All i could find out that if you use $ it will not send the keypress to the game. (if you for example use $LButton:: it dont shot in the game if you press it. (If you dont send a LButton in your Hotkey-macro)
~LButton:: will send the key to the Game and Hotkey-macro(if you have an LButton in your macro it will shoot two times)

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



$Lbutton::
Loop
{
   Sleep 40
   GetKeyState, NumpadState, Numpad8, P
   if NumpadState = U
      break
   MouseClick, left,,, 1, 0, D
   Sleep, 40
   MouseClick, left,,, 1, 0, U
   MouseEvent(0,6)
;   SoundBeep, 500, 200
}
return


I did not change much, i just marked your problem and maybe you will find the answer by yourself now... :)

_________________
Try to build a German Fun-Clan, Click the Banner ;)
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject: THEIF
PostPosted: March 15th, 2007, 2:15 pm 
Fortran wrote:
ATTACK CHOPPER MACRO:

Including Solo TV-Guided, Solo Cannon, Evasive Manuevers etc etc.
...

THIS SHIT IS STOLEN FROM MSX SECURITY, ANYONE THAT USES IT IS A THEIF AND A FAG!


Report this post
Top
  
Reply with quote  
 Post subject: Re: THEIF
PostPosted: March 15th, 2007, 4:28 pm 
Offline

Joined: January 18th, 2006, 3:35 pm
Posts: 28
SneakyPepper wrote:
Fortran wrote:
ATTACK CHOPPER MACRO:

Including Solo TV-Guided, Solo Cannon, Evasive Manuevers etc etc.
...
THIS SHIT IS STOLEN FROM MSX SECURITY, ANYONE THAT USES IT IS A THEIF AND A FAG!

Who cares it suxs anyways, they could have done some other nifty stuff so you could hard bank either way and other shit.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: THEIF
PostPosted: March 16th, 2007, 1:38 pm 
Offline

Joined: August 15th, 2006, 2:25 pm
Posts: 43
SneakyPepper wrote:
Fortran wrote:
ATTACK CHOPPER MACRO:

Including Solo TV-Guided, Solo Cannon, Evasive Manuevers etc etc.
...

THIS SHIT IS STOLEN FROM MSX SECURITY, ANYONE THAT USES IT IS A THEIF AND A FAG!


rofl, sue us!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 17th, 2007, 1:19 am 
alright well here is what i need... im looking for a AHK script to press down T and drop a vehicle real fast (within half a second minimum) to where i can do it over and over bcuz i have a hack and im trying to compete with a friend to see who can do it faster... i got one before and it didnt work with 1.41


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 17th, 2007, 9:40 am 
Offline

Joined: March 10th, 2007, 1:31 pm
Posts: 10
I won't support hacks (or people using it) and the other guys here, too (I hope so).

And like Pornstar says, my mother told me don't talk to strangers/guests...


Report this post
Top
 Profile  
Reply with quote  
PostPosted: March 17th, 2007, 10:44 am 
Offline

Joined: March 10th, 2007, 1:31 pm
Posts: 10
does anybody knows the best timing/key delays for switching to grenade, throw it and then switch back to rifle? Thx.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 17th, 2007, 1:40 pm 
Offline

Joined: January 18th, 2006, 3:35 pm
Posts: 28
BIG_BOY! wrote:
alright well here is what i need... im looking for a AHK script to press down T and drop a vehicle real fast (within half a second minimum) to where i can do it over and over bcuz i have a hack and im trying to compete with a friend to see who can do it faster... i got one before and it didnt work with 1.41


Big_boy I might would seem to help you since I don't play bf2, but you have got to atleast try and code something. Peeps here just don't do everything. And try using the Reg button instead of guest posting.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: THEIF
PostPosted: March 17th, 2007, 5:24 pm 
Offline

Joined: February 28th, 2007, 8:30 pm
Posts: 7
SneakyPepper wrote:
Fortran wrote:
ATTACK CHOPPER MACRO:

Including Solo TV-Guided, Solo Cannon, Evasive Manuevers etc etc.
...

THIS SHIT IS STOLEN FROM MSX SECURITY, ANYONE THAT USES IT IS A THEIF AND A FAG!


No its not...its written from scratch, who the hell is MSX Security anyways >??

Short wrote:

Who cares it suxs anyways, they could have done some other nifty stuff so you could hard bank either way and other shit.



Why dont u write something better then...or how about you make the minor changes needed to have hard bank left and right ?....oh you can't ? I rest my case.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: March 17th, 2007, 8:03 pm 
Offline

Joined: March 10th, 2007, 1:31 pm
Posts: 10
Can anybody tell me why this script (change to grenade, throw it, switch back to rifle) wont work?

Code:
       Send {4 down}
      Sleep 60
      Send {4 up}
      Sleep 50
      MouseClick left, , , , , D
      Sleep 500 ; (500...2000 i tried all)
      MouseClick left, , , , , U      
      Sleep 20
      Send {3 down}
      Sleep 50
      Send {3 up}


This script do not the Left MouseClick. But I dont know the reason why.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: March 18th, 2007, 10:52 am 
[quote="P1na"]Can anybody tell me why this script (change to grenade, throw it, switch back to rifle) wont work?

Code:
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <myemail@nowhere.com>
;
; Script Function:
;   Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv
#InstallKeybdHook ; <--this is important
#InstallMouseHook ; <--this is important
WinGet, szProcessName, ProcessName, A
  if szProcessName = bf2.exe
  {
    Suspend, on
  }
  else
  {
    Suspend, off
  }
return

$F11::Suspend ;;; macro on/off
return

$N::     
   Send, {4 down}
   sleep 40
   Send {4 up}
   sleep 580

Loop, 1
{
   Click down right
   Sleep 1200
   Click up right
   sleep 400
}
  Send, {3 down}
   sleep 50
   Send {3 up}
   return



Hope this work :wink:


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 ... 57, 58, 59, 60, 61, 62, 63 ... 128  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Exabot [Bot], lblb, Scratch, teadrinker and 22 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