Jump to content

Command sequences need help


Recommended Posts

hey its me the noob again lol. What i need is a program that when W is pressed it starts:

press space

press W

press W

left click

shift

and it needs to do this everytime i press W

exit key of P

heres what i have and it doesnt work

#include <Misc.au3>

While 1

Sleep ( 250 )

If _IsPressed("57") Then

Send("{SPACE}")

sleep(100)

send(w)

sleep(50)

send(w)

mouseclick("left")

sleep(100)

Send("{LSHIFT}")

EndIf

WEnd

thanks

Link to comment
Share on other sites

hey its me the noob again lol. What i need is a program that when W is pressed it starts:

press space

press W

press W

left click

shift

and it needs to do this everytime i press W

exit key of P

heres what i have and it doesnt work

#include <Misc.au3>

While 1

Sleep ( 250 )

If _IsPressed("57") Then

Send("{SPACE}")

sleep(100)

send(w)

sleep(50)

send(w)

mouseclick("left")

sleep(100)

Send("{LSHIFT}")

EndIf

WEnd

thanks

Try this...

#include <Misc.au3>

$dll = DllOpen("user32.dll")

While 1
    
    Sleep(100)
    If _IsPressed("50", $dll) then
        MsgBox(4096,"_IsPressed", "P Key Pressed")
        Terminate ()
        ExitLoop
    EndIf
    
    If _IsPressed("57", $dll) then 
        MsgBox(4096,"_IsPressed", "W Key Pressed")
        W_Key_Pressed ()
        ExitLoop
    EndIf
    
WEnd
DllClose($dll)


Func W_Key_Pressed ()

Send("{SPACE}")
sleep(100)
send("w")
sleep(50)
send("w")
mouseclick("left")
sleep(100)
Send("{LSHIFT}") 

EndFunc


Func Terminate ()
MsgBox(4096,"","Exiting")
Exit
EndFunc
Link to comment
Share on other sites

ok thanks alot! I think its working the way i need it to i tested it in noted pad and im pretty sure this is gonna work. ok but now the problem is im using this sequence in a game (GunZ the duel if that helps) and its a full screen game i dont know if this makes a difference but it doesnt work on the GunZ screen. so i mini'd the game and it was still running and working it just didnt work on the game. (pressing p still closed it tho so only the W didnt work) do u know why this is happening?

Thanks again

Link to comment
Share on other sites

ok thanks alot! I think its working the way i need it to i tested it in noted pad and im pretty sure this is gonna work. ok but now the problem is im using this sequence in a game (GunZ the duel if that helps) and its a full screen game i dont know if this makes a difference but it doesnt work on the GunZ screen. so i mini'd the game and it was still running and working it just didnt work on the game. (pressing p still closed it tho so only the W didnt work) do u know why this is happening?

Thanks again

I did something like this ages ago when I was playing some game and I needed to do some cheat code really fast instead of typing it manually. Search the helpfile for "Hotkey". I basically made the hot key like "F7" or something and that executed the cheat code during the game....Try it out and then post it....

Edited by DjDeep00
Link to comment
Share on other sites

then i guess no1 will reply cuz im way too busy to learn a program im nvr gonna use other then the program that im trying to make. im not wasting my time learning a language just to make one program. i thought the ppl here might b nice enuff to make it for me. its not like its gonna take u guys along time to do it.

Link to comment
Share on other sites

then i guess no1 will reply cuz im way too busy to learn a program im nvr gonna use other then the program that im trying to make. im not wasting my time learning a language just to make one program. i thought the ppl here might b nice enuff to make it for me. its not like its gonna take u guys along time to do it.

Oh yeah, THAT will get you a freebie! :)

Try the Rent-A-Coder link in my sig...

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...