Search found 822 matches
- 19 Apr 2024, 10:44
- Forum: Scripts and Functions (v2)
- Topic: [Function] MsgBoxTBI - Display a MsgBox window with an icon in the title bar
- Replies: 14
- Views: 560
Re: [Function] MsgBoxTBI - Display a MsgBox window with an icon in the title bar
You are welcome and thank you for sticking with me on this.
- 19 Apr 2024, 10:10
- Forum: Scripts and Functions (v2)
- Topic: [Function] MsgBoxTBI - Display a MsgBox window with an icon in the title bar
- Replies: 14
- Views: 560
Re: [Function] MsgBoxTBI - Display a MsgBox window with an icon in the title bar
I did some additional tests and decided to simplify the function. Instead of trying to detect the creation and destruction of the MsgBox window (which can be fooled by other MsgBox's in the same or other scripts), I decided to destroy the icons shortly after the MsgBox window is created. The window ...
- 19 Apr 2024, 08:37
- Forum: Scripts and Functions (v2)
- Topic: [Function] MsgBoxTBI - Display a MsgBox window with an icon in the title bar
- Replies: 14
- Views: 560
Re: [Function] MsgBoxTBI - Display a MsgBox window with an icon in the title bar
Yes, thank you! No error messages for me this time. Great! I will update the original post with the improvement. Yes, thank you! No error messages for me this time. No icon on the first msgbox, but the next three does have them. That was the intended behavior. No icons are displayed when IconFile i...
- 18 Apr 2024, 23:31
- Forum: Scripts and Functions (v2)
- Topic: [Function] MsgBoxTBI - Display a MsgBox window with an icon in the title bar
- Replies: 14
- Views: 560
Re: [Function] MsgBoxTBI - Display a MsgBox window with an icon in the title bar
Getting a different error message with AHK v1.0.12 Maybe it's a "run as admin" problem? Error: (5) Access is denied. 054: DetectHiddenWindows(true) 055: WinExist('ahk_class #32770') ▶ 056: SendMessage(WM_SETICON, ICON_SMALL, hIconSmall) 057: SendMessage(WM_SETICON, ICON_BIG, hIconBig) 058: OnMessag...
- 18 Apr 2024, 17:54
- Forum: Scripts and Functions (v2)
- Topic: [Function] MsgBoxTBI - Display a MsgBox window with an icon in the title bar
- Replies: 14
- Views: 560
Re: [Function] MsgBoxTBI - Display a MsgBox window with an icon in the title bar
burque505 Thank you for your testing. From what you reported, it looks like LoadPicture is working. The fact that you don't see any icons suggests that you are not getting to the SetTitleBarIcon nested function. I would appreciate it if you could run the following diagnostic code and report any err...
- 18 Apr 2024, 12:35
- Forum: Scripts and Functions (v2)
- Topic: [Function] MsgBoxTBI - Display a MsgBox window with an icon in the title bar
- Replies: 14
- Views: 560
Re: [Function] MsgBoxTBI - Display a MsgBox window with an icon in the title bar
@burque505 Sorry you are having trouble with the function.
Would you be willing to post the code you are using and take a look at the values of the hIconSmall and hIconBig variables, especially in the ShellMessage nested function?
Thank you.
Would you be willing to post the code you are using and take a look at the values of the hIconSmall and hIconBig variables, especially in the ShellMessage nested function?
Thank you.
- 18 Apr 2024, 09:58
- Forum: Scripts and Functions (v2)
- Topic: [Function] MsgBoxTBI - Display a MsgBox window with an icon in the title bar
- Replies: 14
- Views: 560
Re: [Function] MsgBoxTBI - Display a MsgBox window with an icon in the title bar
Cool idea. I'm getting errors though... I'm on Win 10 with RaptorX's AHKToolBox, to test your self contained example. It has AHK v2.0.2. First two message boxes work, but there is no icon... Third msgbox causes error: kunkel321 Thank you for reporting your tests. I went back and dowloaded earlier v...
- 17 Apr 2024, 10:05
- Forum: Scripts and Functions (v2)
- Topic: [Function] MsgBoxTBI - Display a MsgBox window with an icon in the title bar
- Replies: 14
- Views: 560
[Function] MsgBoxTBI - Display a MsgBox window with an icon in the title bar
Hi Folks, There are many posts in the forum about ways to display an icon in the title bar of a MsgBox window. Some fail to destroy the created icon(s), leading to a memory leak. The function below addresses that problem. The icons are automatically destroyed shortly after the window is created. Her...
- 14 Apr 2024, 10:53
- Forum: Ask for Help (v2)
- Topic: How to change where a window will apear
- Replies: 15
- Views: 301
Re: How to change where a window will apear
The approach below doesn't solve the problem in the original post but it's often sufficient for my purposes: #Requires AutoHotkey v2.0 Persistent WinClass := 'Notepad' WinX := 0 WinY := 0 DllCall('RegisterShellHookWindow', 'Ptr', A_ScriptHwnd) MsgNum := DllCall('RegisterWindowMessage', 'WStr', 'SHEL...
- 13 Apr 2024, 18:41
- Forum: Ask for Help (v2)
- Topic: How to call nested function? Topic is solved
- Replies: 15
- Views: 303
Re: How to call nested function? Topic is solved
That didn't work for me. The closest thing was to replace MyGui.DefineProp('Click', {Call: (this) => Button_Click()}) with MyGui.Click := Button_Click.
- 13 Apr 2024, 01:36
- Forum: Ask for Help (v2)
- Topic: How to call nested function? Topic is solved
- Replies: 15
- Views: 303
Re: How to call nested function? Topic is solved
Used BoundFunc to attach it to the Gui object as a method. I am not sure how you did that. Here's my implementation using the DefineProp method: MyGui := BuildGui() MyGui.Show() F3::MyGui.Click() BuildGui() { MyGui := Gui() Button := MyGui.Add('Button', , 'OK') Button.OnEvent('Click', Button_Click)...
- 12 Apr 2024, 10:07
- Forum: Scripts and Functions (v2)
- Topic: svgToHBITMAP.ah2 (AddPicture an SVG to Gui)
- Replies: 13
- Views: 1032
Re: svgToHBITMAP.ah2 (AddPicture an SVG to Gui)
You are welcome. The key is not to rely on the return value from functions with a void return type. From ComCall 's documentation page: If the method is of a type that does not return a value (the void return type in C), specify "Int" or any other numeric type without any suffix (except HRESULT), an...
- 11 Apr 2024, 19:53
- Forum: Scripts and Functions (v2)
- Topic: svgToHBITMAP.ah2 (AddPicture an SVG to Gui)
- Replies: 13
- Views: 1032
Re: svgToHBITMAP.ah2 (AddPicture an SVG to Gui)
iseahound The reason for the error lies in the return type. ComCall(48,ID2D1RenderTarget) assumes that the return type is HRESULT . The documentation page for that method states otherwise: void BeginDraw(); Thus, one way to write that line is to use Int as the return type, i.e. ComCall(48,ID2D1Rend...
- 09 Apr 2024, 00:30
- Forum: Scripts and Functions (v1)
- Topic: [LIB] MDMF - Multiple Display Monitor Functions
- Replies: 26
- Views: 12562
Re: [LIB] MDMF - Multiple Display Monitor Functions
You are welcome.
- 09 Apr 2024, 00:01
- Forum: Ask for Help (v1)
- Topic: how to keep a window at the bottom always?
- Replies: 10
- Views: 2829
- 08 Apr 2024, 19:52
- Forum: Ask for Help (v1)
- Topic: how to keep a window at the bottom always?
- Replies: 10
- Views: 2829
Re: how to keep a window at the bottom always?
Here's a simpler version that doesn't use the GetAltTabWindows function (which is buggy): #NoEnv DllCall("RegisterShellHookWindow", "Ptr", A_ScriptHwnd) MsgNum := DllCall("RegisterWindowMessage", "Str", "SHELLHOOK") return F2:: BottomID := WinExist("A") WinSet, Bottom, , ahk_id %BottomID% OnMessage(...
- 08 Apr 2024, 19:39
- Forum: Ask for Help (v1)
- Topic: how to keep a window at the bottom always?
- Replies: 10
- Views: 2829
Re: how to keep a window at the bottom always?
How do you use this script? I mean, do you click on the window and then press a certain key combo, like with the more well-known "alwaysontop" function? I don't see that in the code, so I am wondering how it determines which window to act on? :think: I am currently running Ubuntu with desktop in WS...
- 08 Apr 2024, 19:25
- Forum: Scripts and Functions (v1)
- Topic: [LIB] MDMF - Multiple Display Monitor Functions
- Replies: 26
- Views: 12562
Re: [LIB] MDMF - Multiple Display Monitor Functions
Hallo, the v2-a108 example does not run with v2.0.12 Is there already an update? Rohwedder Here's a version that works: ; ====================================================================================================================== ; Multiple Display Monitors Functions -> msdn.microsoft.co...
- 08 Apr 2024, 10:37
- Forum: Ask for Help (v1)
- Topic: Select a random file inside the current open folder?
- Replies: 15
- Views: 3843
Re: Select a random file inside the current open folder?
You are welcome.
- 31 Mar 2024, 20:20
- Forum: Ask for Help (v1)
- Topic: Select a random file inside the current open folder?
- Replies: 15
- Views: 3843
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 ...