The software source program is as follows:
This program adds an automatic application to the interface.
What's kugoo? What is Kugoo? Kugoo is a professional P2P music and file transfer software. With Kugoo, users can easily, quickly and secure music findings, instant messaging, file transfer, file sharing and other network applications. Share with 500,000 users. File transfer is easy to quickly search music Online download music chat Simultaneous file sharing easy to have the latest news: February 8, cool dog users exceed 1 million! 3 million sharing music, more than 1000 online music fans
Note is not added. Because it is mainly related to several API functions. I hope to use the friends you can use.
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpclassname As String, ByVal lpWindowName As String) As LongPrivate Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As LongPrivate Declare Function ClientToScreen Lib "user32" (ByVal hwnd As Long, lpPoint As POINTAPI) As LongPrivate Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As LongPrivate Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long) Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As LongPrivate Declare Function sendmessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal WPARAM As Long, LParam AS Any) As LongPrivate Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As LongPrivate Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long ) As LongPrivate Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As LongPrivate Declare Function WinExec Lib "kernel32" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As LongPrivate Declare Function PostMessage Lib "user32" Alias "Postmessagea"
(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As LongPrivate Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As LongPrivate Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As LongPrivate Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As LongPrivate Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Private Declare Function GetAsyncKeyState lib "user32" (ByVal vkey As Long) As IntegerPrivate Type POINTAPI 'define the position of the mouse MOUSEEVENTF_LEFTDOWN = & H2 with x As Long y As LongEnd TypeConst' simulated mouse button pressed Const MOUSEEVENTF_LEFTUP = & H4 'simulated mouse button lift Const WM_SETTEXT = & HC 'value of the text box Const GW_CHILD = 5' to find the sub-control Const GW_HWNDNEXT = 2 'Find a child control Const BM_CLICK = & HF5' send click event Private Const WM_CLOSE = & H10Private ppt As POINTAPIPrivate dddd, phnd As Long, ttPrivate Const SYNCHRONIZE = & H100000Const PROCESS_QUERY_INFORMATION = & H400Private pid, pnd, ppdPrivate Sub Command1_Click () tt = 1Timer1.Interval = 50Randomizea1 = Int ((90 - 65 1) * Rnd 65) a2 = Int ((90 - 65 1) * RND 65) A3 = INT ((90 - 65 1) * RND 65) A4 = INT ((90 - 65 1) * RND 65) A5 = INT ((90 - 65 1) * RND 65) A6 = INT ((90 - 65 1) * RND 65) Text2.Text = CHR $ (A1) CHR $ (A2) CHR $ (A3) CHR $ (A4) CHR $ (A5 ) CHR $ (A6) PID = shell (app.path "/kugoo.exe", vbnormalfocus) '"
c: / Program Files / KuGoo / kugoo.exe ", vbNormalFocus) Sleep 1000End SubPrivate Sub Command2_Click () Timer1.Interval = 0End SubPrivate Function MyHotKey (vKeyCode) As Boolean 'hotkey MyHotKey = (GetAsyncKeyState (vKeyCode) <0) End Function
Private sub timer1_timer () if myhotkey (VBKEYF2) Timer1.Interval = 0 'If it is F2 to stop MsgBox "stop!", Vbokonly, "Warning!" EXIT SUBEND IFAA = FINDWINDOW (VBnullString, "Register New User - Basic Information" ) IF aa <> 0 and tt = 2 THEN SETWINDOWPOS AA, -1, 0, 0, 0, 0, 3 bb = FindWindowex (AA, ByVAL 0 &, "TPAGECONTROL", vbnullstring) cc = findwindowex (BB, BYVAL 0 &, vbNullString, "basic information") cc = FindWindowEx (cc, ByVal 0 &, "TEdit", vbNullString) ewnd = GetWindow (cc, GW_HWNDNEXT) ewnd = GetWindow (ewnd, GW_HWNDNEXT) ewnd = GetWindow (ewnd, GW_HWNDNEXT) sendmessage ewnd, WM_SETTEXT , 0, ByVal TEXT1.TEXT CC = FindWindowEx (AA, BYVAL 0 &, VBNULLSTRING, "Next (& n)>") SendMessage CC, BM_Click, 0, 0 SLEEP 100 TT = 3 EXIT SUBEND IFAA = FINDWINDOW (VBnullString, "Register New User-Personal Information ") SendMessage CC, BM_Click, 0, 0 SLEEP 100 Tt = 4 EXIT SUBEND IFAA = FindWindow (VBnullString, "Register New User - Security Information") IF AA <> 0 and TT = 4 THEN SETWINDOWPOS AA, -1, 0, 0, 0, 0, 3 BB = FindWindowex (AA , ByVal 0 &, "TPageControl", vbNullString) cc = FindWindowEx (bb, ByVal 0 &, vbNullString, "safety information") cc = FindWindowEx (cc, ByVal 0 &, "TEdit", vbNullString) sendmessage cc, WM_SETTEXT, 0, ByVal Text2 .Text cc = getWindow (cc, gw_hwndnext) SendMessage CC, WM_SETTEXT, 0, BYVAL TEXT2.TEXT CC =
GetWindow (CC, GW_HWndNext) SendMessage CC, WM_SETTEXT, 0, BYVAL TEXT2.TEXT CC = FindWindowEx (AA, BYVAL 0 &, VBNULLSTRING, "Next (& n)>") SendMessage CC, BM_Click, 0, 0 Tt = 5 SLEEP 100 EXIT SUBEND IFAA = FINDWINDOW (VBnullString, "Register New User - Registration Results") IF AA <> 0 and TT = 5 THEN SETWINDOWPOS AA, -1, 0, 0, 0, 0, 3 BB = FindWindowex (AA, BYVAL 0 & , "TPageControl", vbNullString) cc = FindWindowEx (bb, ByVal 0 &, vbNullString, "registration result") cc = GetWindow (cc, GW_CHILD) cc = GetWindow (cc, GW_CHILD) mystr $ = Space $ (GetWindowTextLength (cc) 1) getWindowText CC, MyStr $, LEN (MyStr $) Number1 = Left $ (MYSTR $, 7) if Len (Number1)> 4 Then Open app.path "/kugoo.txt" for append as # 3 Print # 3 , CSTR (Number1) "----" Text2.text Close # 3 else call command1_click end if tt = 6 me.caption = cstr (Number1) PostMessage AA, WM_CLOSE, 0, 0 SLEEP 100 EXIT SUBEND IFAA = FINDWINDOW (vbnullstring, "landing kugoo") if aa <> 0 and tt = 1 THEN S EtwindowPos AA, -1, 0, 0, 0, 0, 3 Bb = FindWindowEx (AA, BYVAL 0 &, "TPANEL", VBNULLSTRING) BB = FINDWINDOWEX (BB, BYVAL 0 &, "TPANEL", vbnullstring) PPT.x = 0 : ppt.y = 0 Clienttoscreen BB, PPT IF PPT.X <100 THEN EXIT SUB SETCURSORPOS PPT.X 100, PPT.Y 20 Mouse_Event MouseEventf_leftdown Or MouseEventf_leftup, 0, 0, 0, 0 Tt = 2 Sleep 100 Exit Subend IFAA = FindWindow (Vbnullstring, "Kugoo Sharing") IF AA <> 0 Then PostMessage AA, WM_Close, 0, 0 Sleep 100 Exit Subend IFAA =