Jump to content

Unbind keys?


Beetle
 Share

Recommended Posts

I don't really understand the pause function?

While 1
    $counter +=1
    HotKeySet("g", "lala")
    HotKeySet("t", "blabla")
    HotKeySet("e", "blahblah")
    HotKeySet("c", "blahablaha")
    ToolTip('Script is "Running"',0,0, $counter, 1)
    Sleep(700)
WEnd
;;;;;;;;
Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0, $counter, 1)
    WEnd
    ToolTip("")
EndFunc

Can i put the HotKeySet("g", "lala") in the $paused part like unbind ("g", "lala")??

Link to comment
Share on other sites

Don't understand your question.

Are you asking how to remove a hotkey? If so you can just set it without a function. HotKeySet("g") would reset G.

That code is not complete. You're missing the function that sets $pause true. Which would exit the loop with a hot key.

Link to comment
Share on other sites

Don't understand your question.

Are you asking how to remove a hotkey? If so you can just set it without a function. HotKeySet("g") would reset G.

That code is not complete. You're missing the function that sets $pause true. Which would exit the loop with a hot key.

Lets me just put my scrambled script in here ^^

Global $Paused
HotKeySet("p", "TogglePause") ; ???????????????????????

While 1
    HotKeySet("g", "Glass")
    HotKeySet("t", "Torches")
    HotKeySet("e", "Ovne")
    HotKeySet("c", "Stop")
    ToolTip("Script is Running", 0, 0)
    Sleep(700)
WEnd

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip("Script is Paused", 0, 0)
    WEnd
    ToolTip("")
EndFunc


$ovne = 0
$glass = 0

Func Torches()
    Sleep(250)
    Send("i")
    MouseClick("left", 876, 267, 16, 0)
    MouseClick("left", 627, 583, 1, 0)
    Send("i")
EndFunc

Func Glass()
    $glass = $glass + 1
    If $glass = 1 Then
        Sleep(500)
        Send("i")
        Sleep(500)
        MouseClick("left", 574, 413, 1, 0)
        MouseClick("left", 682, 582, 1, 0)
        MouseClick("left", 628, 413, 1, 0)
        MouseClick("left", 736, 582, 1, 0)
        MouseClick("left", 679, 413, 1, 0)
        MouseClick("left", 790, 582, 1, 0)
        Sleep(250)
        Send("i")
    EndIf
    If $glass = 2 Then
        Sleep(500)
        Send("i")
        Sleep(500)
        MouseClick("left", 574, 466, 1, 0)
        MouseClick("left", 682, 582, 1, 0)
        MouseClick("left", 628, 466, 1, 0)
        MouseClick("left", 736, 582, 1, 0)
        MouseClick("left", 679, 466, 1, 0)
        MouseClick("left", 790, 582, 1, 0)
        Sleep(250)
        Send("i")
        $glass = $glass - 2
    EndIf
EndFunc   

Func Ovne()
    $ovne = $ovne + 1
    If $ovne = 1 Then
        MouseClick("left", 465, 407, 1, 0)
        MouseClick("left", 611, 205, 1, 0)
    EndIf
    If $ovne = 2 Then
        MouseClick("left", 518, 407, 1, 0)
        MouseClick("left", 611, 205, 1, 0)
    EndIf
    If $ovne = 3 Then
        MouseClick("left", 571, 407, 1, 0)
        MouseClick("left", 611, 205, 1, 0)
    EndIf
    If $ovne = 4 Then
        MouseClick("left", 624, 407, 1, 0)
        MouseClick("left", 611, 205, 1, 0)
    EndIf
    If $ovne = 5 Then
        MouseClick("left", 677, 407, 1, 0)
        MouseClick("left", 611, 205, 1, 0)
    EndIf
    If $ovne = 6 Then
        MouseClick("left", 730, 407, 1, 0)
        MouseClick("left", 611, 205, 1, 0)
    EndIf
    If $ovne = 7 Then
        MouseClick("left", 783, 407, 1, 0)
        MouseClick("left", 611, 205, 1, 0)
    EndIf
    If $ovne = 8 Then
        MouseClick("left", 836, 407, 1, 0)
        MouseClick("left", 611, 205, 1, 0)
    EndIf
    If $ovne = 9 Then
        MouseClick("left", 889, 407, 1, 0)
        MouseClick("left", 611, 205, 1, 0)
        $ovne = $ovne - 9 ;;;;; reset til $ovne = 0
    EndIf
EndFunc  

Func Stop()
    Exit 0
EndFunc

Yes i know, its newbie codes but i'm still learning =P

As i tab out of "something" quite often to write to friends i need to unbind in order to use E C and the other buttons i have bound, but i don't know how to? Also it feels like pause doesn't work =/

Edited by Beetle
Link to comment
Share on other sites

  • Moderators

Beetle,

I suggest you read this before asking for any more help with your bot - unless you want a short holiday from the forum. :x

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

So i edit my post, and make it not look like i have some automisation in minecraft? what?

Well, now we know that its a game bot, we wont help. I assume you read the link? Simple. We wont help.

[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:

%programfiles%/AutoIt3/autoit3.chm
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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