Search found 1493 matches
- 10 Oct 2023, 22:00
- Forum: Ask for Help (v2)
- Topic: File size calculation (as in Windows)
- Replies: 15
- Views: 1069
Re: File size calculation (as in Windows)
DllCall("Shlwapi\StrFormatByteSize64A", "Int64",N, "Str",Format("{:16}",N), "Int",16, "AStr") Quite a weird way to use this function. It's better just like this: MsgBox DllCall("Shlwapi\StrFormatByteSize", "Int64", 1234567890, "Ptr", Buffer(16), "Int", 16, "Str") Buffer(32) would be correct. MsgB...
- 09 Oct 2023, 10:40
- Forum: Scripts and Functions (v2)
- Topic: Ziggle() : A handy tool to lookup Win32 Constants
- Replies: 97
- Views: 20812
Re: Ziggle() : A handy tool to lookup Win32 Constants
one with a type difference for INVALID_SOCKET 18446744073709551615 4294967295 (in the lib it's max usize, so u64, guess it's u32 in whatever your database got it from, might want to hide it behind A_PtrSize check like other values?) Unsigned 32 bit value. Should be -1 instead. Why is invalid socket...
- 09 Oct 2023, 09:23
- Forum: Scripts and Functions (v2)
- Topic: Ziggle() : A handy tool to lookup Win32 Constants
- Replies: 97
- Views: 20812
Re: Ziggle() : A handy tool to lookup Win32 Constants
Noticed things like `\n IMAGE_ARCHIVE_END \n IMAGE_ARCHIVE_END which might indicate some parsing issue with AHK due to the backtick? I will look into that. Have included 1105 entries from your list ( 1809 entries ) Out of curiosity, what about the other ~700 entries? They have been included i...
- 09 Oct 2023, 00:34
- Forum: Scripts and Functions (v2)
- Topic: Ziggle() : A handy tool to lookup Win32 Constants
- Replies: 97
- Views: 20812
Re: Ziggle() : A handy tool to lookup Win32 Constants
0.5k constants with different values... Constant crate ziggle Comment DEPENDENT_DISK_FLAG_PARENT 256 32 0x00000100=256 per msdocs https://learn.microsoft.com/en-us/windows/win32/api/virtdisk/ne-virtdisk-dependent_disk_flag ... Oh! My parser had a mistake. Thanks for the valuable feedback! :thumbu...
- 23 Sep 2023, 01:07
- Forum: Scripts and Functions (v1)
- Topic: SetClipboardHTML() for V1.1 & V2
- Replies: 29
- Views: 7631
Re: SetClipboardHTML() for V1.1 & V2
Thanks a lot SKAN ! I did have a problem though. Each time I paste something, it would be prefixed with "html>". So I added a + 5 on line 20 : Html := StrReplace(Html, "StartHTML:000000000", Format("StartHTML:{:09}", InStr(Html, "<html>")+5) , Fix*) Seems to have fixed my problem. (I'm using Win10 ...
- 20 Sep 2023, 06:55
- Forum: Scripts and Functions (v1)
- Topic: CreateDDB() : Create alpha hBitmap with series of AARRGGBB hex values.
- Replies: 9
- Views: 2877
CreateDDB() for V2.0
Changes: LTrim not required for PixelData owing to intro of Smart LTrim NumPut's parameters were reordered to allow a sequence of values.. and that allows input of PixelData with string manipulation. The function : ( along with a demo ) CreateDDB(PixelData, W, H) ; By SKAN for ah2 on D39B/D69K...
- 19 Sep 2023, 10:22
- Forum: Scripts and Functions (v1)
- Topic: RunAsTask() - Auto-elevates script without UAC prompt
- Replies: 121
- Views: 75178
Re: RunAsTask() - Auto-elevates script without UAC prompt
Isn't it the default to have to run shutdown.exe (plus, I assume, other shutdown commands like a shutdown.ahk) from an elevated command prompt? I don' t think so. I normally call ComObject("Shell.Application").ShutdownWindows() in my (non-elevated) always-running-script (Win7,Win10,Win11)... and at...
- 18 Sep 2023, 21:17
- Forum: Scripts and Functions (v1)
- Topic: RunAsTask() - Auto-elevates script without UAC prompt
- Replies: 121
- Views: 75178
- 18 Sep 2023, 11:28
- Forum: Scripts and Functions (v1)
- Topic: RunAsTask() - Auto-elevates script without UAC prompt
- Replies: 121
- Views: 75178
Re: RunAsTask() - Auto-elevates script without UAC prompt
if I create a script Shutdown.ahk with the only command Shutdown, 1 and execute it from Total Commander (running non-privileged), nothing happens. When I right-click on the script and run it as administrator, I get a UAC prompt and the PC shuts down on confirmation. What happens when you click la...
- 18 Sep 2023, 10:52
- Forum: Scripts and Functions (v2)
- Topic: Ziggle() : A handy tool to lookup Win32 Constants
- Replies: 97
- Views: 20812
Re: Ziggle() : A handy tool to lookup Win32 Constants
removed duplicates (though haven't checked which of the dupes is correct, just left the first one That's almost correct, the second one is being picked from winrt subfolder except IID_IResourceManager which has 3 entries?! https://www.magnumdb.com/search?q=IID_IResourceManager Unable to decide abou...
- 18 Sep 2023, 08:32
- Forum: Scripts and Functions (v1)
- Topic: RunAsTask() - Auto-elevates script without UAC prompt
- Replies: 121
- Views: 75178
Re: RunAsTask() - Auto-elevates script without UAC prompt
I don't understand! why?
This version (for AHK 1.1) of RunAsTask() doesn't process command line parameters.
Code: Select all
#NoTrayIcon
RunAsTask() ; self elevate
Shutdown 5
- 15 Sep 2023, 22:38
- Forum: Ask for Help (v1)
- Topic: [SOLVED] Issues with GDI+ GdipEffectCreate
- Replies: 12
- Views: 2789
- 15 Sep 2023, 11:19
- Forum: Ask for Help (v1)
- Topic: [SOLVED] Issues with GDI+ GdipEffectCreate
- Replies: 12
- Views: 2789
- 15 Sep 2023, 05:01
- Forum: Ask for Help (v1)
- Topic: [SOLVED] Issues with GDI+ GdipEffectCreate
- Replies: 12
- Views: 2789
Re: Issues with GDI+ GdipEffectCreate
Well, I have solved the issue! :superhappy: :dance: :bravo: if (A_PtrSize == 4) ; x86: Pass GUID as two 64-bit parameters retVal := DllCall("gdiplus\GdipCreateEffect", Int64, NumGet(CLSID, 0, "Int64"), Int64, NumGet(CLSID, 8, "Int64"), PtrP, hEffect) else ; x64: Pass GUID as a pointer(!?) retVal :=...
- 14 Sep 2023, 05:35
- Forum: Scripts and Functions (v2)
- Topic: Eject() : For Removable storage devices
- Replies: 3
- Views: 1424
- 13 Sep 2023, 06:57
- Forum: Scripts and Functions (v2)
- Topic: Ziggle() : A handy tool to lookup Win32 Constants
- Replies: 97
- Views: 20812
Ziggle() : Data file updated
GdiPlus constants were (almost) hand-compiled from header files and there were a few errors.
Attaching here a script of GdiPlus constants as well as data file that has been included in Ziggle3.zip
Attaching here a script of GdiPlus constants as well as data file that has been included in Ziggle3.zip
- 08 Sep 2023, 07:27
- Forum: Scripts and Functions (v2)
- Topic: Ziggle() : A handy tool to lookup Win32 Constants
- Replies: 97
- Views: 20812
- 29 Aug 2023, 03:30
- Forum: Ask for Help (v2)
- Topic: The problem about showing watermark on desktop
- Replies: 16
- Views: 973
Re: The problem about showing watermark on desktop
Simple:Code: Select all
Gui, MyGui:+OwnerhOwner
Perhaps there's a very simple mistake? I just don't know why.
Code: Select all
Gui, MyGui:+Owner%hOwner%
- 28 Aug 2023, 22:37
- Forum: Off-topic Discussion
- Topic: Windows file size calculation? Topic is solved
- Replies: 8
- Views: 8095
Re: Windows file size calculation? Topic is solved
- 28 Aug 2023, 09:49
- Forum: Ask for Help (v2)
- Topic: SoundPlay takes 400ms to return despite specifying no wait?
- Replies: 11
- Views: 987
Re: SoundPlay takes 400ms to return despite specifying no wait?
Result from @just me's code: 547.0 - 36.333333333333336