sroprogger Posted May 2, 2008 Posted May 2, 2008 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_By0maube declare minesweeper as GUI but how ?!
monoceres Posted May 2, 2008 Posted May 2, 2008 Test opening the help file and run this ; Require Beta! #Include <GuiButton.au3> $handle=WinGetHandle("AutoIt Help") _GUICtrlButton_Create($handle,"hello",400,10,30,20) Do sleep(100) Until False Broken link? PM me and I'll send you the file!
MikeP Posted May 2, 2008 Posted May 2, 2008 (edited) 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 May 2, 2008 by MikeP
sroprogger Posted May 2, 2008 Author Posted May 2, 2008 how requires beta ?!? where can i download that o.O and yeah what u meant is right i want a button on the programm
monoceres Posted May 3, 2008 Posted May 3, 2008 (edited) how requires beta ?!?where can i download that o.Oand yeah what u meant is right i want a button on the programmLatest autoit beta: Link Edited May 3, 2008 by monoceres Broken link? PM me and I'll send you the file!
sroprogger Posted May 3, 2008 Author Posted May 3, 2008 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++
monoceres Posted May 3, 2008 Posted May 3, 2008 okay thanx but now i got another question ... in the game Silkroad Online you have a textbox .. maybe you know ityou 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!
sroprogger Posted May 3, 2008 Author Posted May 3, 2008 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
MikeP Posted May 3, 2008 Posted May 3, 2008 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 : expandcollapse popupGlobal 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
sroprogger Posted May 3, 2008 Author Posted May 3, 2008 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 !!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now