Jump to content

wo52616111

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by wo52616111

  1. I said I need my script work in Sublime text and VS, you tell me go try in IE, FF, Chrome...
  2. Thank you for reply. In Visual Studio or Sublime Text(PLEASE TRY) or some other coding tools, we send("^c") when we highlighting nothing, we will get a line of text; When we highlighting some text then send("^c"), we get the text highlighted. You will always copy some text, even you did not highlight any text.
  3. I have already said three hundred times, that I don't want to get selected text by send("^c") (or ^insert). I'm tired...
  4. Sorry, I still don't know how to solve the problem. I know EM_GETSELTEXT 2 days ago when I google this question, but don't know how to use it. This script can SendMessage WM_COPY(0x301): _SendMessage($c,0x301) ;WM_COPYBut I try to SendMessage EM_GETSELTEXT like this, it did't work. (I even not sure if EM_GETSELTEXT=0x43e) _SendMessage($c,0x43e)
  5. You get my point finally. I know dllcall, I said at the beginning, but just don't know what function I should use. I am trying.
  6. I did not switch my request. I want to get the highlighted text in all programs. But you see, in IDEs, if we send("^c") when we highlighting nothing, we will get a line of text; But when we highlighting some text then send("^c"), we get the text highlighted. You will always copy some text, even you did not highlight any text. So, if you runing this script in those programs(IDEs): Send("^c") Func f() $Data = ClipGet();gets data from clipboard If $Data <> "" Then Local $text='@'&$textHighlighted&'@' ;if you highlight a word "apple", $text="@apple@" ClipPut($text) Send($Data) ;"@apple@" instead of "apple" Else MsgBox(0,"","NOTHING") EndFuncYou will never see the MsgBox, even nothing highlighted. ps.May be I describe aren't good enough, English is not my native language, and my English is a shit.
  7. Thanks for reply, but you don't even know what my problem is. In IDEs windows, $Data!="" FOEVER if you send("^c").
  8. It seems is not what I want. That script still get text by using send("^c"). In this context: you send Ctrl+C(Ctrl+insert) when you highlight nothing, you will get that line of text where the cursor in. Many IDEs(visual studio, sublime text...) have this feature. Now, I want to do this: Func f() If some text highlighted Local $text='@'&$textHighlighted&'@' ;if you highlight a word "apple", $text="@apple@" ClipPut($text) Send("^v") ;"@apple@" instead of "apple" Else MsgBox(0,"","NOTHING") EndFuncBut you will found that, you never see the MsgBox if you get hightlight text by using send("^c"). That's the problem.
  9. Yes, you are correct. The text you get when you send("^c").
  10. Oh! I see! Sorry for that. And my code is AutoIt, that's no problem.
  11. I know WinGetText and ControlGetText, but they can't just get the selected text(they get all text), can they? Sorry, I can not get what you mean.
  12. Many IDEs has their hotkeys, like Ctrl+C will copy one line. So if I need my ahk working in IDE, I can't get selected text by send("^c") (and ^{insert}). How to get selected text without using sendinput? Sendmessage? Dllcall? Func copyWithoutCtrlC() Local $c=ControlGetHandle("[ACTIVE]","","") _SendMessage($c,0x301) ;WM_COPY MsgBox(0,"",ClipGet()) EndFuncThis script is works in some windows(notepad, SciTE...), but did't work in IDEs and many other windows. Thanks so much.
×
×
  • Create New...