jerwin Posted August 5, 2008 Share Posted August 5, 2008 (edited) hi guys can anyone can give me an example for how to add the script WinApi.au3??? i try to understand the AutoIt help description but still i get confuse.... can anyone can give me example...?? how to use this code: #Include <WinAPI.au3> _WinAPI_ShowCursor($fShow) is this code is for show/hideCursor?? #Include <WinAPI.au3> _WinAPI_SetWindowText($hWnd, $sText)is this code is for Title Change #Include <WinAPI.au3> _WinAPI_Mouse_Event($iFlags[, $iX = 0[, $iY = 0[, $iData = 0[, $iExtraInfo = 0]]]])is this code is for Mousecoord like mouse click?? #Include <WinAPI.au3> _WinAPI_MoveWindow($hWnd, $iX, $iY, $iWidth, $iHeight[, $fRepaint = True])is this code is for New Window and can you tell me what the use??? thanx in advance guys.... Edited August 5, 2008 by jerwin [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font] Link to comment Share on other sites More sharing options...
rasim Posted August 5, 2008 Share Posted August 5, 2008 Hi, examples: #include <WinAPI.au3> #include <Constants.au3> $cur = _WinAPI_ShowCursor(False) MsgBox(0, "Info", "Mouse cursor hided for your GUI") _WinAPI_ShowCursor(True) MsgBox(0, "Info", "Mouse cursor showed for your GUI") Run("notepad.exe") WinWait("[Class:Notepad]") $hWnd = WinGetHandle("[Class:Notepad]") _WinAPI_SetWindowText($hWnd, "My custom titlebar") MsgBox(0, "Info", "Notepad title changed") MsgBox(0, "Info", "Moving mouse cursor to X-100 and Y-100 from current pos") _WinAPI_Mouse_Event($MOUSEEVENTF_MOVE, 100, 100) MsgBox(0, "Info", "Click mouse right button") _WinAPI_Mouse_Event($MOUSEEVENTF_MOVE, 100, 100) _WinAPI_Mouse_Event($MOUSEEVENTF_RIGHTUP) MsgBox(0, "Info", "Move and resize a notepad window") _WinAPI_MoveWindow($hWnd, 0, 0, 200, 100) MsgBox(0, "Info", "Lesson is ended") WinClose($hWnd) Link to comment Share on other sites More sharing options...
Zedna Posted August 5, 2008 Share Posted August 5, 2008 (edited) Simpler is to use standard AutoIt's functions. Use UDFs only for things that couldn't be done by standard AutoIt's functions. See: GUISetCursor() WinSetTitle() MouseClick(), MouseMove() WinMove() Edited August 5, 2008 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
jerwin Posted August 6, 2008 Author Share Posted August 6, 2008 THANX GUYS .. [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font] Link to comment Share on other sites More sharing options...
jerwin Posted August 7, 2008 Author Share Posted August 7, 2008 (edited) BUMP sorry for double post but i get this error... _WinAPI_Mouse_Event($MOUSEEVENTF_MOVE, 100, 100) syntax error Problem Fixed!! New Problem evertime i set the coordinate in 817, 668 the mouse go in the right bottom side of the monitor screen... Edited August 7, 2008 by jerwin [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font] Link to comment Share on other sites More sharing options...
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