Search found 214 matches

by autocart
11 Oct 2014, 04:21
Forum: Ask for Help (v1)
Topic: Edit control: How put the caret to the start of a selection?
Replies: 11
Views: 4550

Re: Edit control: How put the caret to the start of a select

Thx to you "just me" again for all your help and to you RobertL also for your help in the other thread ( http://ahkscript.org/boards/viewtopic.php?f=5&t=4826 ). I finally came up with a workaround that is good enough for me. Since I was helped I also want to share my results. Maybe they are useful f...
by autocart
10 Oct 2014, 06:02
Forum: Ask for Help (v1)
Topic: Edit control: How put the caret to the start of a selection?
Replies: 11
Views: 4550

Re: Edit control: How put the caret to the start of a select

Ok, now I see the problem. I had used EM_SETSEL with SendMessage before and in the 3rd party app it does select the text (therefore I thought it works) but always places the caret behind the selection, regardless of the order of the parameters. In your example it works the way I would like for it to...
by autocart
10 Oct 2014, 03:59
Forum: Ask for Help (v1)
Topic: Edit Control: caret position before of after selection?
Replies: 23
Views: 21644

Re: Edit Control: caret position before of after selection?

thx, RobertL, I think, though, that you are confusing caret-position with cursor-position?
by autocart
10 Oct 2014, 03:52
Forum: Ask for Help (v1)
Topic: Edit control: How put the caret to the start of a selection?
Replies: 11
Views: 4550

Re: Edit control: How put the caret to the start of a select

alright, then, if this behaviour can not be changed then I definitely have no use for SetCaretPos.
Thank you, "just me", all the same.
by autocart
10 Oct 2014, 03:40
Forum: Ask for Help (v1)
Topic: Edit control: How put the caret to the start of a selection?
Replies: 11
Views: 4550

Re: Edit control: How put the caret to the start of a select

just me wrote:It sets the caret, but doesn't clear the selection.
Yes, thx, but did you try to move the caret afterwards with the arrow keys (optionally with pressed shift-key)? It jumps right back to where it was before SetCaretPos.
by autocart
10 Oct 2014, 02:54
Forum: Ask for Help (v1)
Topic: Edit control: How put the caret to the start of a selection?
Replies: 11
Views: 4550

Re: Edit control: How put the caret to the start of a select

Thank you very much for your reply, "just me". Unfortunately I cant get it to work. I created an example based on your answer in this post ( http://ahkscript.org/boards/viewtopic.php?f=5&t=4826 ): #NoEnv Lorem := " ( Lorem ipsum dolor sit amet Consectetuer ligula Aliquam Curabitur Nullam Rutrum eu e...
by autocart
10 Oct 2014, 00:24
Forum: Ask for Help (v1)
Topic: Edit control: How put the caret to the start of a selection?
Replies: 11
Views: 4550

Edit control: How put the caret to the start of a selection?

Hi all, Anyone know of a way how to put the caret in an Edit control to the start of a selection? Or how to select text in an Edit control with the caret being at the start of the selection afterwards? The problem is that with EM_SETSEL (Message to Edit Control) it puts the caret always at the end o...
by autocart
09 Oct 2014, 11:32
Forum: Ask for Help (v1)
Topic: Edit Control: caret position before of after selection?
Replies: 23
Views: 21644

Re: Edit Control: caret position before of after selection?

awesome, "just me", thx a lot!! EDIT: Well, I was happy too early. It works well in the example given, but in the 3rd party app where I am intending to use it VarSetCapacity(POINT, 8, 0) DllCall("User32.dll\GetCaretPos", "Ptr", &POINT) X := NumGet(POINT, 0, "Int") Y := NumGet(POINT, 4, "Int") always...
by autocart
09 Oct 2014, 02:44
Forum: Ask for Help (v1)
Topic: Edit Control: caret position before of after selection?
Replies: 23
Views: 21644

Edit Control: caret position before of after selection?

Hi all, I can get the current caret position with "ControlGet, outputVar, CurrentCol, ...". However if text is selected then it will always return the position of where the selection starts. Now, in real life, however, the caret could be at the start or at the end of the selection. The difference in...
by autocart
27 Aug 2014, 04:42
Forum: Ask for Help (v1)
Topic: Is retrieved HWND also unique over life-time of my script?
Replies: 6
Views: 1980

Re: Is retrieved HWND also unique over life-time of my scrip

ok, I hope you know for sure. then I would have to periodically check if the window still exists in case I want to keep using my retrieved window handle.
thx for the response.
by autocart
27 Aug 2014, 03:41
Forum: Ask for Help (v1)
Topic: Is retrieved HWND also unique over life-time of my script?
Replies: 6
Views: 1980

Re: Is retrieved HWND also unique over life-time of my scrip

ok, let me state the links, that made me think, but that are not clear enough to me: http://blogs.msdn.com/b/oldnewthing/archive/2011/01/07/10112755.aspx http://stackoverflow.com/questions/1815434/how-often-are-windows-handles-reused So, my question, if I understood the meaning of the information co...
by autocart
27 Aug 2014, 02:23
Forum: Ask for Help (v1)
Topic: Is retrieved HWND also unique over life-time of my script?
Replies: 6
Views: 1980

Is retrieved HWND also unique over life-time of my script?

Hi all, Using WinExist() I can retrieve the "uniqueID" (window handle, hwnd) of a window. My question: Can I be 100% sure that the retrieved hwnd is really unique (only referring to this one window) also over the whole time while my ahk-script is active? Or could it happen that, if the window I was ...
by autocart
13 May 2014, 00:18
Forum: Ask for Help (v1)
Topic: React to tray-icon pause script event
Replies: 2
Views: 1555

Re: React to tray-icon pause script event

SKAN wrote:you can test built-in variable A_IsPaused within ShellHook() procedure and act accordingly.
Very good thought. Thank you, SKAN!

I had already tried to use the Menu command with NoStandard and then build my own menu entries. But I like your idea even better.
by autocart
12 May 2014, 07:45
Forum: Ask for Help (v1)
Topic: React to tray-icon pause script event
Replies: 2
Views: 1555

React to tray-icon pause script event

Hi all, My script registers a ShellHook. When the user selects "pause script" from the tray icon right click menu then the shell hook (obviously) still stays active. I was wondering if there is a OnPause event similar to OnExit, so that I can deactivate the hook before the script pauses. Of course I...

Go to advanced search