Search found 438 matches

by iPhilip
02 Mar 2020, 16:18
Forum: Ask For Help
Topic: Question about RetrievedEncoding
Replies: 19
Views: 550

Re: Question about RetrievedEncoding

I would expect UTF-8 in both modes. When you use RAW mode for Write, BOM is not set, so AHK can't determine encoding correctly in Read mode. If the BOM is not set, then perhaps RetrievedEncoding for Write mode should be CP1252 (or the system default ANSI code page) instead of UTF-8 . Should I move ...
by iPhilip
02 Mar 2020, 15:04
Forum: Ask For Help
Topic: Question about RetrievedEncoding
Replies: 19
Views: 550

Re: Question about RetrievedEncoding

@iPhilip https://www.autohotkey.com/docs/objects/File.htm#Encoding Hi teadrinker , I read that page several times. I don't think it addresses my question. For example, when setting the file encoding to UTF-8-RAW , RetrievedEncoding is UTF-8 when in Write mode (which is what the documentation page s...
by iPhilip
02 Mar 2020, 14:02
Forum: Ask For Help
Topic: Question about RetrievedEncoding
Replies: 19
Views: 550

Re: Question about RetrievedEncoding

+1
by iPhilip
29 Feb 2020, 12:41
Forum: Ask For Help
Topic: Question about RetrievedEncoding
Replies: 19
Views: 550

Question about RetrievedEncoding

Hi Folks, I am curious why RetrievedEncoding is different when the file is opened in Write vs Read mode for UTF-8-RAW and UTF-16-RAW Encodings. See the script below. #NoEnv SetWorkingDir, %A_Temp% Encodings := ["", "UTF-8", "UTF-16", "UTF-8-RAW", "UTF-16-RAW"] ; RegRead, ACP, HKLM\SYSTEM\CurrentCont...
by iPhilip
27 Feb 2020, 03:58
Forum: Ask For Help
Topic: Script to Change 2 specific characters in every .txt file in a folder Topic is solved
Replies: 7
Views: 339

Re: Script to Change 2 specific characters in every .txt file in a folder Topic is solved

TLM wrote:
26 Feb 2020, 19:35
@iPhilip the deprecated file/folder loop still works lol
jokes aside, my ide auto filled the old version ;)
You are right. It does work with the deprecated version. :)
by iPhilip
26 Feb 2020, 18:43
Forum: Ask For Help
Topic: Script to Change 2 specific characters in every .txt file in a folder Topic is solved
Replies: 7
Views: 339

Re: Script to Change 2 specific characters in every .txt file in a folder Topic is solved

Write() & Seek() methods can overwrite characters directly to file at a given positions. Thank you, I didn't realize that. Also you can Read & Write to a single file object by specifying both `rw` flags. For instance: ColumnArray := [ 95, 100 ] Loop D:\KVAL Files\DoorData\*.txt I think you meant Co...
by iPhilip
26 Feb 2020, 17:22
Forum: Ask For Help
Topic: Script to Change 2 specific characters in every .txt file in a folder Topic is solved
Replies: 7
Views: 339

Re: Script to Change 2 specific characters in every .txt file in a folder Topic is solved

Hi bwersing The code below should do what you asked for: #NoEnv Loop, Files, D:\KVAL Files\DoorData\*.txt { File := FileOpen(A_LoopFileLongPath, "r") Row1 := File.ReadLine() Row1 := RegExReplace(Row1, ".{95}\K.(.{4}).", "0$10", , 1) RestOfFile := File.Read() File.Close() File := FileOpen(A_LoopFileL...
by iPhilip
20 Jan 2020, 14:43
Forum: Wish List
Topic: FileRecycle and NukeOnDelete
Replies: 2
Views: 1400

Re: FileRecycle and NukeOnDelete

Hi lexikos , This function may permanently delete the file if it is too large to be recycled; as of [v1.0.96], a warning should be shown before this occurs. That's what FOF_WANTNUKEWARNING does. Thank you for the clarification. The Recycle Bin is (usually?) also disabled on removable drives, and in ...
by iPhilip
27 Dec 2019, 21:02
Forum: Ask For Help
Topic: Can anyone help me figure out why my Listview isn't limiting the # of lines?
Replies: 4
Views: 286

Re: Can anyone help me figure out why my Listview isn't limiting the # of lines?

Hi shipaddicted , I downloaded your script along with the .ini file. After removing 3 g options in Gui, Acct:Add statements and renaming the Loop, Read command line to reflect the actual name of the .ini file, I got it to run and it shows 15 rows. I suspect the issue has to do with what you are doin...
by iPhilip
20 Dec 2019, 17:31
Forum: Suggestions on documentation improvements
Topic: Suggestions on documentation improvements
Replies: 688
Views: 190971

Memory leak in ComObjQuery's documentation page

I would like to suggest a change to Example #1 on ComObjQuery 's documentation page to address what I believe is a memory leak. To test the leak I used the following script and monitored the process' Private Bytes according to the "Using Performance Monitor to Find a User-Mode Memory Leak" note on M...
by iPhilip
21 Nov 2019, 12:11
Forum: Ask For Help
Topic: Help with IFileOperationProgressSink RegisterCallback function
Replies: 10
Views: 863

Re: Help with IFileOperationProgressSink RegisterCallback function

Perhaps: GetDisplayName := NumGet(NumGet(Item + 0, "UPtr"), A_PtrSize * 5, "UPtr") ; IShellItem DisplayName := "" If !DllCall(GetDisplayName, "Ptr", Item, "UInt", 0, "PtrP", StrPtr) { ; SIGDN_NORMALDISPLAY = 0 DisplayName := StrGet(StrPtr, "UTF-16") DllCall("Ole32.dll\CoTaskMemFree", "Ptr", StrPtr)...
by iPhilip
21 Nov 2019, 00:04
Forum: Ask For Help
Topic: Help with IFileOperationProgressSink RegisterCallback function
Replies: 10
Views: 863

Re: Help with IFileOperationProgressSink RegisterCallback function

As far as I understand the docs, you have to specify the actual number of parameters for variadic callback functions. Hi just me , I just re-read the documentation for the RegisterCallback and saw that. Most callbacks use the stdcall calling convention, which requires a fixed number of parameters. ...
by iPhilip
18 Nov 2019, 02:36
Forum: Bug Reports
Topic: [v2] Issue with File.WriteUInt Topic is solved
Replies: 1
Views: 1576

Re: [v2] Issue with File.WriteUInt Topic is solved

iPhilip wrote:
01 Nov 2019, 20:25
The following code writes 8 bytes to file but when examining the file with a binary viewer it shows all zeros.

Code: Select all

File := FileOpen("foo", "w")
n := File.WriteUInt(0x01010101)
n += File.WriteUInt(0x02020202)
File.Close()
MsgBox n
lexikos wrote: Misc:
Fixed File.WriteXXX(n).
Thank you!
by iPhilip
15 Nov 2019, 04:36
Forum: Ask For Help
Topic: Help with IFileOperationProgressSink RegisterCallback function
Replies: 10
Views: 863

Re: Help with IFileOperationProgressSink RegisterCallback function

Hi Helgef :wave: Thank you for your comments. As posted by you above, the PerformOperations command does not execute properly, which is why A_LastError is set, and the file is not moved to the folder. Without the ProgressSink the file is moved as intended. Thus, I am still puzzled about the solution...
by iPhilip
15 Nov 2019, 02:43
Forum: Ask For Help
Topic: Help with IFileOperationProgressSink RegisterCallback function
Replies: 10
Views: 863

Re: Help with IFileOperationProgressSink RegisterCallback function

yeah, u can forget about this part doing anything meaningful Thank you. It was an educated guess ... but it did result in notifications. Oh, well. :? u have to obtain an interface pointer to a IFileOperationProgressSink (queryInterface i suppose), then patch its vtable with the function addresses o...
by iPhilip
14 Nov 2019, 17:15
Forum: Ask For Help
Topic: Help with IFileOperationProgressSink RegisterCallback function
Replies: 10
Views: 863

Help with IFileOperationProgressSink RegisterCallback function

Hi Folks, I have been experimenting with the IFileOperation interface commands ( link ) and have run into a problem with the IFileOperationProgressSink notification system ( link ). The script below works if the ProgressSink is turned off ( pProgressSink := 0 ). When it's turned on, the script crash...
by iPhilip
04 Nov 2019, 12:54
Forum: Ask For Help
Topic: Bug! Array key variable not working when is string with number
Replies: 7
Views: 900

Re: Bug! Array key variable not working when is string with number

lexikos wrote:
04 Nov 2019, 03:37
This also works if you're using Unicode (and saving as UTF-8 with BOM): a["🔑" k] :lol:
That's funny! :lol:
by iPhilip
01 Nov 2019, 20:25
Forum: Bug Reports
Topic: [v2] Issue with File.WriteUInt Topic is solved
Replies: 1
Views: 1576

[v2] Issue with File.WriteUInt Topic is solved

The following code writes 8 bytes to file but when examining the file with a binary viewer it shows all zeros.

Code: Select all

File := FileOpen("foo", "w")
n := File.WriteUInt(0x01010101)
n += File.WriteUInt(0x02020202)
File.Close()
MsgBox n
by iPhilip
30 Oct 2019, 20:09
Forum: General Discussion
Topic: Tank needs a little help
Replies: 19
Views: 4395

Re: Tank needs a little help

ok guys. this isn't really appropriate but am desperate. I just got letgo from my job. downsize. If i have ever helped you and you have it just burning a hole in your pocket i could use a few bucks. Please pocket change only. Anything larger than what i need for surviving and paying a few bills wil...
by iPhilip
25 Oct 2019, 14:00
Forum: Suggestions on documentation improvements
Topic: Suggestions on documentation improvements
Replies: 688
Views: 190971

Re: Filedelete and recycle bin

I think FILEDELETE doc should have a note indicating that files, if the volume on which they are found has a recylce bin ENABLED, are not sent to the recycle bin. This leads me to ask, if a volume's recycle bin is NOT ENABLED (that is, it's recycle location is marked "Don't move files to the recycl...

Go to advanced search