Jump to content

Aprilgogo

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by Aprilgogo

  1. Smart point, MrCreatoR! Thank you so much!
  2. Is there a way to "link" the script with a static library or even DLL? I'm wondering whether I can compile all the .au3, .lib or .dll into one EXE.
  3. Hi, The idea is this: once the mouse selects some text, the script gets a notification and then sends a Ctrl-C to copy it. Usually a mouse can select some text in 2 ways: 1. hold down left button and drag. 2. double-click or triple-click some text. So the questions are: 1. How do I know if some texts are selected? The only way I can figure out is to write a callback function of a message like MOUSE_SECONDARY_UP, and then tests whether a text is selected in the foreground window. 2. How can I get the selected if I know some texts are selected? I tried the following two ways: a. Use ControlCommand ( "title", "text", controlID, "GetSelected"). But this seems to only work on an Edit. I.e. If I select some text in a Firefox window, the function does not work. b. Use _GUICtrlEdit_GetSel(). This works only on Edit too. BTW, the function returns only the starting/end position of selected text, how can I know the content of the selected text? Thank you in advance!
  4. Awesome job:-), MrCreatoR! Is it possible to implement Larry's hook.dll in AutoIt script? Such as adding a _KeySetOnEvent() function to your UDFs. I heard that HotKeySet() has some limitations on both the keys and the number of keys. I'm really expecting that!
  5. Hi Larry, Thanks for the reply. But what I mean is the WM_KEYUP typo, not the WM_MOUSEWHEELUP typo. Anyway, I found a VC++ machine, corrected the code and posted here: http://www.autoitscript.com/forum/index.ph...=53215&st=0 Could you please recompile the code and provide the fixed dll in your original post? Thank you! BTW, I tested some keys on my keyboard and found that the script did not get a WM_KEYDOWN message when the "PrintScreen" is pressed but got a WM_KEYUP message when "PrintScreen" is released. Why does this happen?
  6. Could someone correct the all the typos and recompile the above DLL? I noticed tobamai's is only 5KB but my dll exceeds 20KB. I'm really not good at the DLL thing. Thank you.
  7. Hi, tobamai, I downloaded Zedna's MouseHook2.zip and tried to recompile it. I found line 179 is exactly the same as your change describes. But Line 177 should be changed from: AU3_WM_MOUSEWHEELUP; to: wParm = AU3_WM_MOUSEWHEELUP; And what does line 182 mean? Should it be changed to the following? wParm = AU3_WM_MOUSEWHEELUP; Another typo I found is at line 218, it should be: PostMessage(m_hHwndKey, AU3_WM_KEYUP, wParam, iState); Otherwise we will not get a WM_KEYUP notification. BTW, I'm using VC++ 6.0, who can tell me why I can only build the code in "Win32 Release" but get an "error LNK2001: unresolved external symbol _main" error in "Win32 Debug"? And finally, how to fix it? Here is the fixed dll. Please pay attention that I didn't fully test it. hook.dll
  8. Hi, I downloaded Larry's hook.dll (thanks Larry!) and runs the MouseHook.au3 script. But the script can't capture the WM_KEYUP message. So I checked the original dll.c code and found: in function: LRESULT CALLBACK KeyProc( int nCode, WPARAM wParam, LPARAM lParam { ...... if (lParam & 0x80000000) PostMessage(m_hHwndKey, AU3_WM_KEYDOWN, wParam, iState); else { PostMessage(m_hHwndKey, AU3_WM_KEYDOWN, wParam, iState); } ...... } I think one of the red part should be AU3_WM_KEYUP. One can also check the behavior of the MouseHook.au3: when a key is pressed and released, two identical message shows in the tooltip. Could someone please: 1. I download hook.dll in some part of the forum (sorry I forgot the link). If there is a correct version of hook.dll, could you please tell me the link? 2. I don't have a MS VC++ installed. If there is not a correct version of hook.dll, could you please build one and provide the link? 3. Is it possible to implement dll.c in AutoIt3 script? Thank you, guys!
  9. Just got it, a better way: $KEY_1 = GUICtrlCreateButton("!" & @CRLF & "1", ...) GUICtrlSetStyle($KEY_1, $BS_MULTILINE) Thank you!
  10. Yes, it works! Here's the code: $KEY_1 = GUICtrlCreateButton(" ! 1", ...) GUICtrlSetStyle($KEY_1, $BS_MULTILINE) Thank you!
  11. Hi, I was using GUICtrlCreateButton() to draw an onscreen keyboard, in which every button stands for a key. Usually the key "1" has "!" in the upper side and "1" in the bottom. So I tried: $KEY_1 = GUICtrlCreateButton("!"&@CRLF&"1", ...) But it didn't work. Actually it showed just "!1". Could someone please tell me how to make it work or some better ways to draw an onscreen keyboard? Thank you!
×
×
  • Create New...