Jump to content

help needed ( plz )


 Share

Recommended Posts

hello,

i made a script to simply spam the F1 key as fast as possible,,this is for a game that i play.i also use the use "pause" key to pause it.. doh, lol

recently the pause key does not stop the script and it just keeps spamming.. plz help

maybe someone can help me write a better script?? i just want it to click F1 key as fast as possible and the ability to pause script :)

; <AUT2EXE VERSION: 3.0.102.0>
 
; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-START: C:\Documents and Settings\Owner\Desktop\PickupBot.au3>
; ----------------------------------------------------------------------------
 
 
 Global $PAUSED
 HotKeySet("{pause}", "pause")
 HotKeySet("{ESC}", "Terminate")
 
 Func Pause()
    $Paused = NOT $Paused
    While $Paused
        sleep(1)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
 EndFunc
 
 Func Terminate()
    Exit 0
 EndFunc
 
 
    MsgBox(0, "Pickup bot by widow", "Press ok to activate,Press Pause to Pause and press ESC to exit.")
 
;This is the thingy that presses F1 consecutively
 $Loop = 1
 While $Loop = 1
 Send("{F1}")
 WEnd
Link to comment
Share on other sites

HotKeySet("{pause}", "pause")
HotKeySet("{ESC}", "Terminate")

MsgBox(0, "Pickup bot by widow", "Press ok to activate,Press the Pause key to Pause and press ESC to exit.")

While 1
   Send("{F1}")
WEnd

Func Pause()
    $Paused = NOT $Paused
    While $Paused
        sleep(1)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit
EndFunc

Edited by Burrup

qq

Link to comment
Share on other sites

  • Developers

Burrup, don't think that your version will ever return from the Pause() function after pause is hit once...

The original script, that was decompiled?, look fine to me...

You could make it hit the key faster maybe by adding Opt("SendKeyDelay",1)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Yes I know, I just realised that and am fixing it as we speak =).

Edit: It seems i confused myself lol, so i jsut went with widows method of pause :D.

<{POST_SNAPBACK}>

not sure why but your edited script causes error and closes when i click pause :)
Link to comment
Share on other sites

Try it again now, you might of had the old version before I edited it again.

<{POST_SNAPBACK}>

i tried the updated version.. causes error :S

ERROR says:

Line 23

$Paused = NOT $Paused

$Paused = NOT ^ERROR

Error: Variable used without being declared

Link to comment
Share on other sites

its ok i got my old script to pause again =)

but how can i get it to click F1 key faster??? i tried the idea above but didnt effect it at all i ran 2 of these scripts to see if it gos faster and it does :):D so i know it can be done.. but when trying to pause both it doesnt work :D

any ideas fellas??

Link to comment
Share on other sites

do an adlib, look at this script that i made to have 1 hit kills in the game "The Skull Kid" on flashplayer

There isn't a reason that the function is called moo... remember that so you don't get confused...

Opt ( "SendKeyDelay", 0 )
HotKeySet ( "{Space}", "Moo" )
HotKeySet ( "{Pause}", "Pause" )
HotKeySet ( "{End}", "Quit" )
While 1
    Sleep ( 100 )
WEnd
Func Moo()
    HotKeySet ( "{Space}" )
    AdlibEnable ( "SendSpace", 1 )
    Send ( "{Space}{Space}{Space}{Space}{Space}" )
    Sleep ( 10 )
    AdlibDisable ( )
    HotKeySet ( "{Space}", "Moo" )
EndFunc

Func SendSpace()
    Send ( "{Space}{Space}{Space}{Space}{Space}" )
EndFunc

Func Pause() 
    HotKeySet("{Pause}", "Unpause")
    HotKeySet("{Space}" )
EndFunc

Func Unpause()
    HotKeySet("{Pause}", "Pause")
    HotKeySet("{Space}", "Moo" )
EndFunc

Func Quit()
    Exit
EndFunc

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

do an adlib, look at this script that i made to have 1 hit kills in the game "The Skull Kid" on flashplayer

There isn't a reason that the function is called moo... remember that so you don't get confused...

Opt ( "SendKeyDelay", 0 )
HotKeySet ( "{Space}", "Moo" )
HotKeySet ( "{Pause}", "Pause" )
HotKeySet ( "{End}", "Quit" )
While 1
    Sleep ( 100 )
WEnd
Func Moo()
    HotKeySet ( "{Space}" )
    AdlibEnable ( "SendSpace", 1 )
    Send ( "{Space}{Space}{Space}{Space}{Space}" )
    Sleep ( 10 )
    AdlibDisable ( )
    HotKeySet ( "{Space}", "Moo" )
EndFunc

Func SendSpace()
    Send ( "{Space}{Space}{Space}{Space}{Space}" )
EndFunc

Func Pause() 
    HotKeySet("{Pause}", "Unpause")
    HotKeySet("{Space}" )
EndFunc

Func Unpause()
    HotKeySet("{Pause}", "Pause")
    HotKeySet("{Space}", "Moo" )
EndFunc

Func Quit()
    Exit
EndFunc

<{POST_SNAPBACK}>

can someone edit that to spam the F1 key???? lol i tried but im an idiot :)
Link to comment
Share on other sites

Did you try to decrease the time the key is held down?

Do a search in the help file for "AutoItSetOption"

SendKeyDelay

Alters the the length of the brief pause in between sent keystrokes.

Time in milliseconds to pause (default=5). Sometimes a value of 0 does not work; use 1 instead.

SendKeyDownDelay

Alters the length of time a key is held down before released during a keystroke. For applications that take a while to register keypresses (and many games) you may need to raise this value from the default.

Time in milliseconds to pause (default=1).

Edited by megahyperion
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...