kiii Posted June 10, 2005 Share Posted June 10, 2005 How judged my mouse punctuation a button? Link to comment Share on other sites More sharing options...
t0ddie Posted June 10, 2005 Share Posted June 10, 2005 get seriously hooked on phonics... then try again Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
kiii Posted June 10, 2005 Author Share Posted June 10, 2005 How concrete does? Please give me a code. Link to comment Share on other sites More sharing options...
t0ddie Posted June 10, 2005 Share Posted June 10, 2005 i dont understand please specify in english what your native language is, then ask the question in that language, then i will try to copy and paste that into a translator on some website. otherwise, you will have to be more specific. please state exactly what you are trying to do. Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
kiii Posted June 10, 2005 Author Share Posted June 10, 2005 Oh Sorry, I come from China, I do not understand English. If _IsPressed('01') Then ; your code EndIf Func _IsPressed($HexKey) Local $AR $HexKey = '0x' & $HexKey $AR = DllCall("user32","int","GetAsyncKeyState","int",$HexKey) If NOT @Error And BitAND($AR[0],0x8000) = 0x8000 Then Return 1 Return 0 EndFunc #cs 01 Left mouse button 02 Right mouse button;does not works in my system... 04 Middle mouse button (three-button mouse) 05 Windows 2000/XP: X1 mouse button 06 Windows 2000/XP: X2 mouse button This section of code only can judge the mouse to press down, could not judge me to select any button. Link to comment Share on other sites More sharing options...
t0ddie Posted June 10, 2005 Share Posted June 10, 2005 if you look under #cs you can see what to add for the different buttons. If _IsPressed('01') Then;left button ; your code EndIf If _IsPressed('02') Then;right button ; your code EndIf If _IsPressed('03') Then;middle button ; your code EndIf ;........... Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
kiii Posted June 10, 2005 Author Share Posted June 10, 2005 (edited) I needed to let him judge me to select any button. How does? judge me click "ok" button. how does? Edited June 10, 2005 by kiii Link to comment Share on other sites More sharing options...
t0ddie Posted June 10, 2005 Share Posted June 10, 2005 $var = inputbox("test","enter 1 to click left") if $var = 1 then mouseclick("left") endif im not sure how to click the other buttons. but that will give you an idea of how to get user input and use it. Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
buzz44 Posted June 10, 2005 Share Posted June 10, 2005 您明白我吗? 如果如此取乐回复在适当的标点和拼写您的问题用中文或英语。谢谢。 您明白我嗎? 如果如此取樂回復在適當的標點和拼寫您的問題用中文或英語。謝謝。 qq Link to comment Share on other sites More sharing options...
t0ddie Posted June 10, 2005 Share Posted June 10, 2005 您明白我吗? 如果如此取乐回复在适当的标点和拼写您的问题用中文或英语。谢谢。您明白我嗎? 如果如此取樂回復在適當的標點和拼寫您的問題用中文或英語。謝謝。<{POST_SNAPBACK}>i could not have said it better myself. Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
kiii Posted June 10, 2005 Author Share Posted June 10, 2005 (edited) oh no~哦不。i am so sorry...我很抱歉I depend upon the translation software.我是依靠翻译软件The expression is not clear I the meaning.没有表达出我的意思i need Increase the new function in may the execution file.我需要添加一个新的功能到我的程序里Whether or not uses AUTOIT to realize?不知道AUTOIT是否可以实现Opens a program.打开一个程序 // Run("mstsc.exe")I click on a button, carries out an instruction. 我点了一个按钮实现了一个功能。//ControlClick("Remote Desktop Connection", "Co&nnect", "Button1")the commond is bud 上面的这个语句是错误的//MsgBox(0, "okay", "you a connect...")I click on another button, carries out another instruction.我点了另一个按钮实现了另一个功能。//ControlClick("Remote Desktop Connection", "Cancel", "Button2")//MsgBox(0, "oh noo", "you a cancel...")help me~~~帮助我i need..我需要i click the connect button我点了这个连接按钮popup a new windows msg "you a connect"然后弹出新的信息窗口你已经连接i need help...........我需要帮助The key point is, how judged the mouse punctuation what button? ? ?重点是怎么判断我的鼠标点了一下按钮 Edited June 10, 2005 by kiii Link to comment Share on other sites More sharing options...
kiii Posted June 10, 2005 Author Share Posted June 10, 2005 ControlGetPos ( "title", "text", controlID ) MouseGetPos ( ) If _IsPressed('01') Then ; your code EndIf Who can help me to write an example? 谁能帮我写个例子? Link to comment Share on other sites More sharing options...
buzz44 Posted June 10, 2005 Share Posted June 10, 2005 We don't understand what you want. In english your sentence/question makes no sense. Can you please re-write the question correctly in chinese. qq Link to comment Share on other sites More sharing options...
kiii Posted June 12, 2005 Author Share Posted June 12, 2005 my code is error... help me~ Run("mstsc.exe") WinActivate("Remote Desktop Connection") Global $KS_DOWN = -32767 While 1 $a = KeyState(1) If $a = $KS_DOWN Then b1() EndIf Sleep(10) WEnd Func KeyState($hexKey) Local $aR $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey) If Not @error Then Return $aR[0] Return 0 EndFunc Func b1() $mgp = MouseGetPos () $b1 = ControlGetPos("Remote Desktop Connection","Co&nnect",1) If ($mgp[0]> $b1[0]) and ($mgp[0]< $b1[0]+$b1[2]) and ($mgp[1]> $b1[1]) and ($mgp[1]< $b1[1]+$b1[38]) Then MsgBox(0, "connect", "test connect") EndIf EndFunc Link to comment Share on other sites More sharing options...
buzz44 Posted June 12, 2005 Share Posted June 12, 2005 Its kind of hard to help you when you don't tell us what the error is or what your are hoping to achieve... qq Link to comment Share on other sites More sharing options...
kiii Posted June 12, 2005 Author Share Posted June 12, 2005 I used the mouse to press a program(Remote Desktop Connection) button (connect) At the same time popup a new messeng "you a connect" Link to comment Share on other sites More sharing options...
kiii Posted June 13, 2005 Author Share Posted June 13, 2005 i need help :~( Link to comment Share on other sites More sharing options...
kiii Posted June 22, 2005 Author Share Posted June 22, 2005 help me~~~ Link to comment Share on other sites More sharing options...
kiii Posted June 22, 2005 Author Share Posted June 22, 2005 Run("mstsc.exe") WinActivate("Remote Desktop Connection") Global $KS_DOWN = -32767 While 1 $a = KeyState(1) If $a = $KS_DOWN Then b1() EndIf Sleep(10) WEnd Func KeyState($hexKey) Local $aR $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey) If Not @error Then Return $aR[0] Return 0 EndFunc Func b1() $mgp = MouseGetPos () $b1 = ControlGetPos("Remote Desktop Connection","Co&nnect",1) If ($mgp[0]> $b1[0]) and ($mgp[0]< $b1[0]+$b1[2]) and ($mgp[1]> $b1[1]) and ($mgp[1]< $b1[1]+$b1[38]) Then MsgBox(0, "connect", "test connect") EndIf EndFunc this code error~ help me~ 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