Search found 803 matches

by iPhilip
31 Mar 2024, 20:20
Forum: Ask for Help (v1)
Topic: Select a random file inside the current open folder?
Replies: 13
Views: 3740

Re: Select a random file inside the current open folder?

I know this is a really old topic but does exactly what I need. However, on folders with a large number of files (ex. 30k files), it crashes. Is there a solution for this? My tests reveal that the ShellFolderView.Folder.Items.Item(Index) method crashes Explorer when Index > ~3100 . If you know the ...
by iPhilip
28 Mar 2024, 22:18
Forum: Ask for Help (v2)
Topic: Get Windows UWP icons Topic is solved
Replies: 19
Views: 287

Re: Get Windows UWP icons Topic is solved

Thank you for your sticking with me on this. I don't have a way to test Facebook Messenger and the other apps you mentioned because of security restrictions on my laptop. The AppHasPackage function was my best educated guess of how to check if an app is UWP or not. This guess was informed by this st...
by iPhilip
28 Mar 2024, 13:46
Forum: Ask for Help (v2)
Topic: Get Windows UWP icons Topic is solved
Replies: 19
Views: 287

Re: Get Windows UWP icons Topic is solved

Thank you. There are a couple of issues you might want to look into: 1. The "Get Icon" logic doesn't seem right to me. In my opinion, this code ; Get Icon if (LogoPath := GetLargestUWPLogoPath(hwnd)) ; if UWP IconImg := LoadPicture(LogoPath, 'Icon1', &IMAGE_ICON) ; Get UWP Icon else ; Get System Ico...
by iPhilip
28 Mar 2024, 13:10
Forum: Ask for Help (v2)
Topic: Get Windows UWP icons Topic is solved
Replies: 19
Views: 287

Re: Get Windows UWP icons Topic is solved

Can you post your latest code?
by iPhilip
28 Mar 2024, 12:11
Forum: Ask for Help (v2)
Topic: Get Windows UWP icons Topic is solved
Replies: 19
Views: 287

Re: Get Windows UWP icons Topic is solved

See my P.S. above.

Changing

Code: Select all

if (Path := GetLargestUWPLogoPath(hwnd)) ; if UWP
   IconImg := LoadPicture(Path, 'Icon1', &IMAGE_ICON) ; Get UWP Icon
to

Code: Select all

if (LogoPath := GetLargestUWPLogoPath(hwnd)) ; if UWP
   IconImg := LoadPicture(LogoPath, 'Icon1', &IMAGE_ICON) ; Get UWP Icon
should fix it.
by iPhilip
28 Mar 2024, 11:32
Forum: Ask for Help (v2)
Topic: Get Windows UWP icons Topic is solved
Replies: 19
Views: 287

Re: Get Windows UWP icons Topic is solved

Hmm it doesn't work it says it cant read the file. Error: (2) The system cannot find the file specified. 056: { 057: SplitPath(Path, , &Dir) ▶ 058: If !RegExMatch(FileRead(Dir '\AppxManifest.xml', 'UTF-8'), '<Logo>(.*)</Logo>', &Match) 059: Throw Error('Unable to read logo information from file.', ...
by iPhilip
28 Mar 2024, 10:46
Forum: Ask for Help (v2)
Topic: Get Windows UWP icons Topic is solved
Replies: 19
Views: 287

Re: Get Windows UWP icons Topic is solved

Thank you for reporting the additional testing. I updated the above post to include a AppHasPackage function to check if the window is UWP.

Let me know if this works for you.
by iPhilip
28 Mar 2024, 01:55
Forum: Ask for Help (v2)
Topic: Get Windows UWP icons Topic is solved
Replies: 19
Views: 287

Re: Get Windows UWP icons Topic is solved

a_bolog wrote:
28 Mar 2024, 01:49
@iPhilip What would be a good way to identify if the app is UWP?
This conditional statement should work.

Code: Select all

if WinGetClass(hWnd) = 'ApplicationFrameWindow'
   IconImg := LoadPicture(GetLargestUWPLogoPath(hWnd), 'Icon1', &IMAGE_ICON)
by iPhilip
27 Mar 2024, 09:04
Forum: Ask for Help (v2)
Topic: Get Windows UWP icons Topic is solved
Replies: 19
Views: 287

Re: Get Windows UWP icons Topic is solved

You are welcome. :)
by iPhilip
25 Mar 2024, 01:21
Forum: Ask for Help (v2)
Topic: Get Windows UWP icons Topic is solved
Replies: 19
Views: 287

Re: Get Windows UWP icons Topic is solved

What you posted works for me. See the screenshot below.
Screenshot 2024-03-24 232018.png
Screenshot 2024-03-24 232018.png (164.71 KiB) Viewed 238 times
by iPhilip
24 Mar 2024, 23:25
Forum: Ask for Help (v2)
Topic: Get Windows UWP icons Topic is solved
Replies: 19
Views: 287

Re: Get Windows UWP icons Topic is solved

Any ideas how could one get the 256px icon from UWP apps? Settings, Calculator, Store, etc. You can't - by design. Windows 10 apps don't have their icons stored as a resource in their executable. Their icons reside in resource files that make up the package for the app. For example, Calculator has ...
by iPhilip
23 Mar 2024, 01:48
Forum: Bug Reports
Topic: Obscure GUI Picture-related bug Topic is solved
Replies: 7
Views: 2048

Re: Obscure GUI Picture-related bug Topic is solved

Thank you. I appreciate the change.
by iPhilip
15 Mar 2024, 11:03
Forum: Scripts and Functions (v1)
Topic: SystemProcessInformation
Replies: 5
Views: 2198

Re: SystemProcessInformation

:thumbup:
by iPhilip
10 Mar 2024, 12:04
Forum: Bug Reports
Topic: Obscure GUI Picture-related bug Topic is solved
Replies: 7
Views: 2048

Re: Obscure GUI Picture-related bug Topic is solved

Looks like the issue for 256x256 icons has been addressed but the scaling issue is still not resolved in AHK v2. Source code from util.cpp: for (int i = 0; i < resCount; ++i) { int this_width = resDir[i].Icon.Width; if (!this_width) // Workaround for 256x256 icons. this_width = 256; // Find the clos...
by iPhilip
27 Feb 2024, 02:24
Forum: Scripts and Functions (v1)
Topic: [Function] SplashText
Replies: 18
Views: 6123

Re: [Function] SplashText

You are welcome! :)
by iPhilip
26 Feb 2024, 14:07
Forum: Scripts and Functions (v1)
Topic: Simple Windows Drag - Easily snap, move and resize windows
Replies: 8
Views: 1669

Re: Simple Windows Drag - Easily snap, move and resize windows

Appreciate your help to fix this. Below is a fix for the GetMonitorIndexFromWindow function: GetMonitorIndexFromWindow(windowHandle) { ; Starts with 1. monitorIndex := 1 monitorInfo := Buffer(40) NumPut('UInt', 40, monitorInfo) if (monitorHandle := DllCall("MonitorFromWindow", "Ptr", windowHandle, ...
by iPhilip
26 Feb 2024, 11:51
Forum: Scripts and Functions (v1)
Topic: [Function] SplashText
Replies: 18
Views: 6123

Re: [Function] SplashText

Pareidol wrote:
26 Feb 2024, 07:17
Maybe you can pinpoint me my last error in this example.
Yes. You must use the new version (see the original post) that allows for a Timeout parameter. In your post you used the previous version of the SpashText function.
by iPhilip
25 Feb 2024, 11:45
Forum: Scripts and Functions (v2)
Topic: Simple function to calculate standard deviation
Replies: 3
Views: 227

Re: Simple function to calculate standard deviation

You are welcome! Great comparison work! :)
by iPhilip
24 Feb 2024, 14:14
Forum: Scripts and Functions (v2)
Topic: Simple function to calculate standard deviation
Replies: 3
Views: 227

Re: Simple function to calculate standard deviation

Banaanae , The version below is 10-20% faster. It uses the for-loop instead of the normal loop . StandardDeviation(arr) { mean := sd2 := 0 for val in arr mean += val mean /= arr.Length for val in arr sd2 += (val - mean) ** 2 return sqrt(sd2 / arr.Length) } If you were interested in using properties...

Go to advanced search