Search found 233 matches

by pneumatic
19 Oct 2019, 20:04
Forum: Ask For Help
Topic: FileSelectFile sometimes ignores my Rootdir (ahk2exe or 32/64bit issue?) Topic is solved
Replies: 12
Views: 678

Re: FileSelectFile sometimes ignores my Rootdir (ahk2exe or 32/64bit issue?) Topic is solved

Here is my workaround if anyone's interested. Please see the "important" note in the comment, otherwise it may not work. FileSelectFile ,,, % GetFileSelectFileDir( "C:\StartingDirectory" ) GetFileSelectFileDir( ThisPath:="" ){ /* Workaround issue where Windows ignores your specified starting directo...
by pneumatic
18 Oct 2019, 14:28
Forum: Ask For Help
Topic: FileSelectFile sometimes ignores my Rootdir (ahk2exe or 32/64bit issue?) Topic is solved
Replies: 12
Views: 678

Re: FileSelectFile sometimes ignores my Rootdir (ahk2exe or 32/64bit issue?) Topic is solved

I've encountered some inconsistent behaviour in the way Windows writes the FirstFolder value to registry. i.e Delete registry's FirstFolder key -> run app -> FileSelectFile , , , C:\Path1 -> C:\Path1 gets written to registry FirstFolder value. FileSelectFile , , , (no path) -> select C:\Path2\File.e...
by pneumatic
15 Oct 2019, 07:39
Forum: Ask For Help
Topic: FileSelectFile sometimes ignores my Rootdir (ahk2exe or 32/64bit issue?) Topic is solved
Replies: 12
Views: 678

Re: FileSelectFile sometimes ignores my Rootdir (ahk2exe or 32/64bit issue?) Topic is solved

Just adding "\" sometimes works, sometimes fails. I finally got to the bottom of this. So the first time an application opens a FileSelectFile, Windows saves the starting directory parameter to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\FirstFolder Then, if your a...
by pneumatic
13 Aug 2019, 05:07
Forum: Ask For Help
Topic: Timer threads interruptability
Replies: 5
Views: 437

Re: Timer threads interruptability

the takeaway is timers are interruptible, loops arent Loops can be interrupted as long as they're not Critical, or at a higher Priority than the thread trying to interrupt it, or inside the script's exit routine. Can't understand why in the following only first Sub1 works and never Sub2, they must ...
by pneumatic
13 Aug 2019, 04:36
Forum: Bug Reports
Topic: Trivial parsing issue with Gui , Add
Replies: 1
Views: 447

Trivial parsing issue with Gui , Add

#SingleInstance , Force ;Works Gui , Add , Text , % "x" . (2+2) . " y4 w35 h15" , Text ;Doesn't work Gui , Add , Text , % "x" . (2+2) . " y24 w35 h15" , Text: ;Works Gui , Add , Text , % "x" . (2+2) . " y44 w35 h15" , % "Text:" Gui , Show , w250 h65 Center , Gui return GuiClose: ExitApp return http...
by pneumatic
12 Jul 2019, 20:42
Forum: Ask For Help
Topic: COM object CPU leak in Win 10 Topic is solved
Replies: 3
Views: 391

Re: COM object CPU leak in Win 10 Topic is solved

Found the culprit, it was the motherboard's ethernet controller driver ("Killer E2200 Gigabit Ethernet Controller"). Motherboard is an Asrock Z97X Killer. I already knew that Killer ethernet software was dodgy as its "bandwidth control" feature was randomly turning itself on and throttling my networ...
by pneumatic
12 Jul 2019, 06:42
Forum: Ask For Help
Topic: COM object CPU leak in Win 10 Topic is solved
Replies: 3
Views: 391

Re: COM object CPU leak in Win 10 Topic is solved

Thanks.

I guess it must be something about my system configuration causing it. I will try a fresh install of Windows.
by pneumatic
12 Jul 2019, 06:00
Forum: Ask For Help
Topic: How do I set process priority to all child processes? Topic is solved
Replies: 9
Views: 487

Re: How do I set process priority to all child processes? Topic is solved

me: baby tier
teadrinker: hardcore tier
swagfag: elegant tier
by pneumatic
12 Jul 2019, 05:05
Forum: Ask For Help
Topic: How do I set process priority to all child processes? Topic is solved
Replies: 9
Views: 487

Re: How do I set process priority to all child processes? Topic is solved

This may work for some but not all of the child processes. Use something like Process Explorer to confirm (View -> Select Columns -> Process Performance -> Base Priority. 8=Normal, 13=High). #Persistent Run "c:\Program Files (x86)\Firefox Quantum\firefox.exe" --profile "c:\Users\username\AppData\Roa...
by pneumatic
12 Jul 2019, 02:19
Forum: Ask For Help
Topic: FileSelectFile sometimes ignores my Rootdir (ahk2exe or 32/64bit issue?) Topic is solved
Replies: 12
Views: 678

Re: FileSelectFile sometimes ignores my Rootdir (ahk2exe or 32/64bit issue?) Topic is solved

With some experiments and in hindsight, I just need the trailing "\". (You don't need GetReliablePath, pneumatic.) I found that it can still fail if you don't change the starting directory every time. The purpose is to stop Windows from trying to be clever: The algorithm for selecting the initial d...
by pneumatic
11 Jul 2019, 21:30
Forum: Ask For Help
Topic: FileSelectFile sometimes ignores my Rootdir (ahk2exe or 32/64bit issue?) Topic is solved
Replies: 12
Views: 678

Re: FileSelectFile sometimes ignores my Rootdir (ahk2exe or 32/64bit issue?) Topic is solved

This was my workaround for 64-bit Unicode compiled .exe FileSelectFile , SelectedFile ,, % GetReliablePath( Path . "\Folder" ) , Select File , Videos (*.mp4) GetReliablePath(Path){ static LastPath If (Path = LastPath){ StringRight , LastChar , Path , 1 If (LastChar = "\") StringTrimRight , Path , Pa...
by pneumatic
11 Jul 2019, 20:39
Forum: Ask For Help
Topic: COM object CPU leak in Win 10 Topic is solved
Replies: 3
Views: 391

COM object CPU leak in Win 10 Topic is solved

This only occurs on my Windows 10 install (v1903 May 2019). Windows 7 appears unaffected. Code is from https://www.autohotkey.com/docs/commands/URLDownloadToFile.htm (it just downloads the current version number of ahk from https://autohotkey.com/download/1.1/version.txt) #Persistent return ^1:: ;Ct...
by pneumatic
30 May 2019, 13:14
Forum: Scripts and Functions
Topic: UTF-8 ini files
Replies: 8
Views: 2058

Re: UTF-8 ini files

Thanks.

To be safe I changed all my ini files to UTF-16, aka "USC2-LE-BOM", by using the parameter UTF-16 with FileAppend.

In future I think I'll just avoid using iniread/write and do it manually.
by pneumatic
29 May 2019, 10:17
Forum: Scripts and Functions
Topic: UTF-8 ini files
Replies: 8
Views: 2058

Re: UTF-8 ini files

I guess UTF-8 is using 1 byte per character which makes it compatible with ANSI which Get/WritePrivateProfileString are interpreting the file as.

But I still don't understand how it knows how many bytes per char are being used by UTF-8 as it could be up to 3.
by pneumatic
29 May 2019, 08:06
Forum: Scripts and Functions
Topic: UTF-8 ini files
Replies: 8
Views: 2058

Re: UTF-8 ini files

UCS-2 LE BOM = UTF-16 LE BOM There's nothing 'wrong' with the IniRead/IniWrite functions per se, just that they can only handle UTF-16 (UTF-16 files are often bigger in size than UTF-8 files if your language uses the Latin alphabet) and ANSI (Unicode to ANSI is lossy). FileAppend,, ini.ini, UTF-8-R...
by pneumatic
27 May 2019, 07:05
Forum: Bug Reports
Topic: DropDownList undocumented behaviour
Replies: 5
Views: 711

Re: DropDownList undocumented behaviour

Why do you want to use a timer to check if the selection in the DropDownList has changed? That's a task for a g-label Unfortunately I have some cases where I can't do that because the DDL selection controls some things external to the application which could change and needs to be enforced with a t...
by pneumatic
27 May 2019, 03:31
Forum: Bug Reports
Topic: DropDownList undocumented behaviour
Replies: 5
Views: 711

Re: DropDownList undocumented behaviour

lexikos wrote:
27 May 2019, 02:30
When the script explicitly assigns to it (or uses it as an output variable)

On further consideration, this isn't actually what my code does, because GuiControlGet uses the output variable CurrVal, not DropDownList, nor does it explicitly assign to DropDownList.
by pneumatic
27 May 2019, 03:07
Forum: Bug Reports
Topic: DropDownList undocumented behaviour
Replies: 5
Views: 711

Re: DropDownList undocumented behaviour

Gui , Main: New Gui , Add , DropDownList , vDropDownList w150, One||Two|Three Gui , Add , Text , vText xp+180 w150 , vDropDownList: Gui , Show , Center SetTimer , GetDDL , 250 return GetDDL: GuiControlGet , CurrVal , Main:, DropDownList GuiControl , Main: , Text , vDropDownList: %CurrVal% return ht...
by pneumatic
27 May 2019, 01:47
Forum: Bug Reports
Topic: DropDownList undocumented behaviour
Replies: 5
Views: 711

DropDownList undocumented behaviour

When the Gui Submit command is used, the control's associated output variable (if any) receives the text of the currently selected item. But it should also mention the output variable receives the item's text before the Gui Submit command is used, if the user is hovering the mouse over a DDL item. ...
by pneumatic
08 May 2019, 17:39
Forum: Ask For Help
Topic: Round() inconsistency
Replies: 6
Views: 498

Re: Round() inconsistency

This is no bug, the result is because the number 1.005 cannot be exactly represented as a float. Instead, 1.005 is stored as something sligthly less. 1.05 cannot either but is stored as something sligthly larger. You can use format to display the float with as many decimal places you like. Thanks, ...

Go to advanced search