Jump to content
Sign in to follow this  
sroprogger

Button on a programm

Recommended Posts

sroprogger

hey guys ... I wanted to know how i can but a button on a programm like minesweeper ... well on the GUi of minesweeper ..

like http://youtube.com/watch?v=5bOP5CO_By0

maube declare minesweeper as GUI but how ?!

Share this post


Link to post
Share on other sites
MikeP

I'm a bit confused because you're hard to understand... you want to know how to "click" on grey square in minesweeper?

Btw there's a faster way to put your name in the best score... even without actually running a bot. Just use T-search :)

Edited by MikeP

Share this post


Link to post
Share on other sites
sroprogger

how requires beta ?!?

where can i download that o.O

and yeah what u meant is right i want a button on the programm

Share this post


Link to post
Share on other sites
monoceres

how requires beta ?!?

where can i download that o.O

and yeah what u meant is right i want a button on the programm

Latest autoit beta: Link Edited by monoceres

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
sroprogger

okay thanx but now i got another question ... in the game Silkroad Online you have a textbox .. maybe you know it

you can write in it

now i want that wehn i write /menu a menu appears IN the textbox ... that means that in the textbox appears a text which will guide you trough the menu ....

is that possible with autoIT or do i need to do it with c++

Share this post


Link to post
Share on other sites
monoceres

okay thanx but now i got another question ... in the game Silkroad Online you have a textbox .. maybe you know it

you can write in it

now i want that wehn i write /menu a menu appears IN the textbox ... that means that in the textbox appears a text which will guide you trough the menu ....

is that possible with autoIT or do i need to do it with c++

If it's a game it's most likely that the textbox is drawn by the game, not windows. And therefore it's most likely that it's impossible to write your own controls in it. AutoIt and C++, doesn't matter.

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
sroprogger

actually it is cause some guys did it ... they made it that when u click on a player and write /info u see his weapon , hp , mp , armor everything ...

and im asking me how nthey did it xD they wont tell me

Share this post


Link to post
Share on other sites
MikeP

I can't give the correct credit to the author of this script (that I found on this forum) but I think it can help you start your own, it displays a Tooltip when you type a certain sequence of letters (two words are triggering it here, Jon and Autoit), which is what you want to do since you want something to happen when you type '/menu' . Here it is :

Global Const $WH_KEYBOARD_LL = 13
Global $hHook
Global $hStub_KeyProc = DllCallbackRegister("_KeyProc", "long", "int;wparam;lparam")
Global $hmod = DllCall("kernel32.dll", "hwnd", "GetModuleHandle", "ptr", 0)
Global $hHook = DllCall("user32.dll", "hwnd", "SetWindowsHookEx", "int", _
        $WH_KEYBOARD_LL, "ptr", DllCallbackGetPtr($hStub_KeyProc), "hwnd", $hmod[0], "dword", 0)
Global $buffer = ""

MsgBox(4096, "", "Click OK, then open notepad and type..." & _
        @LF & @LF & "Jon" & @LF & "AutoIt")


While 1
    Sleep(10)
WEnd

Func EvaluateKey($keycode)
    If (($keycode > 64) And ($keycode < 91)) _
            Or (($keycode > 47) And ($keycode < 58)) Then
        $buffer &= Chr($keycode)
        Switch $buffer
            Case "Jon"
                ToolTip("What can you say?")
            Case "AUTOIT"
                ToolTip("AutoIt Rocks")
        EndSwitch
    ElseIf ($keycode > 159) And ($keycode < 164) Then
        Return
    Else
        $buffer = ""
    EndIf
EndFunc   ;==>EvaluateKey

Func _KeyProc($nCode, $wParam, $lParam)
    Local $ret, $KEYHOOKSTRUCT
    If $nCode < 0 Then
        $ret = DllCall("user32.dll", "long", "CallNextHookEx", "hwnd", $hHook[0], _
                "int", $nCode, "wparam", $wParam, "lparam", $lParam)
        Return $ret[0]
    EndIf
    If $wParam = 256 Then
        $KEYHOOKSTRUCT = DllStructCreate("dword;dword;dword;dword;ptr", $lParam)
        EvaluateKey(DllStructGetData($KEYHOOKSTRUCT, 1))
    EndIf
    $ret = DllCall("user32.dll", "long", "CallNextHookEx", "hwnd", $hHook[0], _
            "int", $nCode, "ptr", $wParam, "ptr", $lParam)
    Return $ret[0]
EndFunc   ;==>_KeyProc

Func OnAutoItExit()
    DllCall("user32.dll", "int", "UnhookWindowsHookEx", "hwnd", $hHook[0])
    DllCallbackFree($hStub_KeyProc)
EndFunc   ;==>OnAutoItExit

Share this post


Link to post
Share on other sites
sroprogger

WOW that is great !! thats what i wanted thnak you ver much !

now i can edit it a lil b it and put the functions in it thx !! :(:)

Share this post


Link to post
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
Sign in to follow this  

×