Search found 143 matches

by autocart
22 Jun 2019, 12:19
Forum: Scripts and Functions
Topic: WinClip - AHKv2 Compatibility
Replies: 17
Views: 1564

Re: WinClip - AHKv2 Compatibility

One addition to the WinClip.ahk library: I am not sure, whether the text in the Rich Text Format clipboard format should be null-terminated. (This site https://www.codeproject.com/Reference/1091137/Windows-Clipboard-Formats might indicate that IMO, but I could be wrong.) Still, as far as I could see...
by autocart
21 Jun 2019, 19:06
Forum: Wish List
Topic: Suggestions on documentation improvements
Replies: 563
Views: 118589

Re: Suggestions on documentation improvements

STRPUT/STRGET - Under 'Encoding', for complete clarity, it should say something like: - If Encoding is not specified, it is UTF-16 (on Unicode versions) or CP0 (on ANSI versions). - More details, here: Basic question about the string terminator in ahk - AutoHotkey Community https://autohotkey.com/b...
by autocart
21 Jun 2019, 15:14
Forum: Ask For Help
Topic: Basic question about the string terminator in ahk Topic is solved
Replies: 22
Views: 609

Re: Basic question about the string terminator in ahk Topic is solved

Never mind, sorry,

it works if I put

Code: Select all

VarSetCapacity(address, StrPut(string))
;respectively
VarSetCapacity(address, StrPut(string) * 2)
instead of

Code: Select all

address := ""
by autocart
21 Jun 2019, 14:41
Forum: Ask For Help
Topic: Basic question about the string terminator in ahk Topic is solved
Replies: 22
Views: 609

Re: Basic question about the string terminator in ahk Topic is solved

[EDIT] Never mind. Found the answer in the next post on the next page.[/EDIT] Help, this test example with a 20 char string does not work right: string := "12345678901234567890" ;"TEST" address := "" StrPut(string, &address, 21) InputBox, OutputVar, , , , , , , , , , % """" StrGet(&address) """" The...
by autocart
21 Jun 2019, 07:04
Forum: Wish List
Topic: Suggestions on documentation improvements
Replies: 563
Views: 118589

Re: Suggestions on documentation improvements

Doc states: A_ScriptDir The full path of the directory where the current script is located. The final backslash is omitted (even for root directories). A_ScriptName The file name of the current script, without its path, e.g. MyScript.ahk. A_ScriptFullPath The combination of the above two variables ...
by autocart
21 Jun 2019, 04:39
Forum: Ask For Help
Topic: Basic question about the string terminator in ahk Topic is solved
Replies: 22
Views: 609

Re: Basic question about the string terminator in ahk Topic is solved

Got it. You were referring only to that particular example. I thought that was a general statement. Thx.
by autocart
21 Jun 2019, 03:51
Forum: Ask For Help
Topic: Basic question about the string terminator in ahk Topic is solved
Replies: 22
Views: 609

Re: Basic question about the string terminator in ahk Topic is solved

Hi all,
thx for all of your feedback.
Helgef wrote:
21 Jun 2019, 01:39
(Edit: Disregarding that the string is not guaranteed to be null terminated on Unicode build, which could cause undefined behaviour ;) )
Are you saying that StrPut will sometimes add a null-terminator and sometimes not?
by autocart
20 Jun 2019, 16:24
Forum: Scripts and Functions
Topic: WinClip - AHKv2 Compatibility
Replies: 17
Views: 1564

Re: WinClip - AHKv2 Compatibility

If someone is interested, I posted this related question here:
WinClip.Snap(clipData) lost, when saving clipData to an array  (https://www.autohotkey.com/boards/viewtopic.php?f=76&t=65568)

(Did not want to unnecessarily clutter this thread, therefore opened a new thread for that question.)
by autocart
20 Jun 2019, 16:00
Forum: Ask For Help
Topic: Basic question about the string terminator in ahk Topic is solved
Replies: 22
Views: 609

Re: Basic question about the string terminator in ahk Topic is solved

Thank u very much, teadrinker,

do u think it is different in the Unicode version since u wrote "(in ANSI)"?
by autocart
20 Jun 2019, 15:52
Forum: Ask For Help
Topic: Basic question about the string terminator in ahk Topic is solved
Replies: 22
Views: 609

Re: Basic question about the string terminator in ahk Topic is solved

Thx and in the ANSI version, I assume it is a one byte null character?

Besides, if I wrote the string to memory somehow without a null-terminator character at all, and I don't specify a length in StrGet, what happens then?
by autocart
20 Jun 2019, 14:51
Forum: Scripts and Functions
Topic: WinClip - AHKv2 Compatibility
Replies: 17
Views: 1564

Re: WinClip - AHKv2 Compatibility

[EDIT:] Thx for the update, jeeswg! [EDIT OFF] NOTE: I noticed that the original coder is using StrGet and StrPut with "UTF-16" in a few more locations as well, besides GetText() and iGetText(). If I am not too tired I will look at it and might repost the original code with all of my corrections (in...
by autocart
20 Jun 2019, 13:28
Forum: Ask For Help
Topic: Basic question about the string terminator in ahk Topic is solved
Replies: 22
Views: 609

Basic question about the string terminator in ahk Topic is solved

Hi all, I am wondering how StrGet(addressA) figures out the string length when I don't particularly specify it as parameter for the function. Does ahk use a string terminator? If so, is it the null-terminator mentioned in the help? (The help does not seem very clear to me, or I did not find the righ...
by autocart
20 Jun 2019, 10:31
Forum: Scripts and Functions
Topic: WinClip - AHKv2 Compatibility
Replies: 17
Views: 1564

Re: WinClip - AHKv2 Compatibility

Let's say, if out_size was 1500, then the loop would be executed 1 time and the remaining 500 (Bytes, I assume?) are not read at all. Never mind, I found the answer to this question as well as your original question: The answer to your original question, Skrommel, which was: Is it just my computer,...
by autocart
20 Jun 2019, 04:26
Forum: Scripts and Functions
Topic: WinClip - AHKv2 Compatibility
Replies: 17
Views: 1564

Re: WinClip - AHKv2 Compatibility

:?: Is it just my computer, or does text:=wc.iGetText(data) crash when copying a large chunk of text? The text:=WinGet.GetText(data) crashes in the same manner. The culprit is StrGet , I'm having to read smaller chunks to make ut work properly: ;;;; text:=wc.iGetText(data) replacement ;;;; clipSize...
by autocart
20 Jun 2019, 04:06
Forum: Ask For Help
Topic: WinClip.Snap(clipData) lost, when saving clipData to an array
Replies: 0
Views: 41

WinClip.Snap(clipData) lost, when saving clipData to an array

Hi all, this question is connected to this WinClip thread/lib: https://www.autohotkey.com/boards/viewtopic.php?f=6&t=29314 This is weired: If I store the clipboard data retrieved with WinClip.Snap(clipData) into an associative (or simple) array, then when I want to restore it, the clipboard is empty...
by autocart
11 Jun 2019, 11:00
Forum: Ask For Help
Topic: ahk_exe and RegEx Topic is solved
Replies: 3
Views: 96

Re: ahk_exe and RegEx Topic is solved

Hi all, I figured it out myself. If RegEx is used for title match mode, then the whole path is compared for the exe. The following code returns MsgBox true started from within SciTE editor (if SciTE.exe is located in that specific path): SetTitleMatchMode RegEx If WinActive("ahk_exe ^C:\\Program Fil...
by autocart
11 Jun 2019, 10:01
Forum: Ask For Help
Topic: ahk_exe and RegEx Topic is solved
Replies: 3
Views: 96

Re: ahk_exe and RegEx Topic is solved

Rohwedder wrote:
11 Jun 2019, 09:42

Code: Select all

SetTitleMatchMode RegEx

If WinActive("^ahk_exe SciTE\.exe$")
Thx, but that does not work anywhere in ahk because it is not correct ahk syntax to begin with.
by autocart
11 Jun 2019, 09:28
Forum: Ask For Help
Topic: ahk_exe and RegEx Topic is solved
Replies: 3
Views: 96

ahk_exe and RegEx Topic is solved

Hi all, I would like to use RegEx title match mode and scan for an exact match of the exe name. Therefore I would like to use the ^ and $ anchors. However the ^ does not really work with ahk_exe. To go with an example, I am using it on the SciTe4AHK editor. The code SetTitleMatchMode RegEx If WinAct...
by autocart
11 Jun 2019, 06:02
Forum: Forum Issues
Topic: Not getting email notifications
Replies: 7
Views: 830

Re: Not getting email notifications

gregster wrote:
10 Jun 2019, 13:57
Edit: There is actually Joe's email address in his signature (it's a graphic).

Your AHK PMs get moved from 'Outbox' to 'Sent Messages' as soon as the recipient reads (opens) your message.
Ah, now I see it, thx.
Also, thx for the Outbox-explanation

Go to advanced search