Search found 827 matches
- 17 May 2024, 21:03
- Forum: Ask for Help (v2)
- Topic: Clear Win10 notification alert history from v1 to v2.
- Replies: 7
- Views: 400
Re: Clear Win10 notification alert history from v1 to v2.
I agree. When names of interface methods are the same, the property names will need to be differentiated, e.g. Scaler_Initialize vs Encoder_Initialize.
- 17 May 2024, 12:26
- Forum: Ask for Help (v2)
- Topic: Clear Win10 notification alert history from v1 to v2.
- Replies: 7
- Views: 400
Re: Clear Win10 notification alert history from v1 to v2.
Implementing the __Call() meta-function allows you to specify the name of the method without unnecessary assignment and to shorten the code a bit. Here is my code with parameter interpretation: ({}.DefineProp)(ComValue.Prototype, '__Call', { Call: ( thisComValue, methodName, parameterArray ; the fi...
- 16 May 2024, 11:34
- Forum: Ask for Help (v2)
- Topic: Clear Win10 notification alert history from v1 to v2.
- Replies: 7
- Views: 400
Re: Clear Win10 notification alert history from v1 to v2.
1. Can you help me understand the syntax of this line? _ := ({}.DefineProp)(ComValue.Prototype, '__Call', { Call: (s, n, p) => (p.InsertAt(2, s), ComCall(p*)) }) It looks like you are defining a meta-function that gets called when a ComValue is called in order to implement a ComCall . I am familiar...
- 16 May 2024, 11:08
- Forum: Ask for Help (v2)
- Topic: Clear Win10 notification alert history from v1 to v2.
- Replies: 7
- Views: 400
Re: Clear Win10 notification alert history from v1 to v2.
teadrinker , Thank you for posting that function. I took a close look at it as I am interested in this topic and I have a couple of questions: 1. Can you help me understand the syntax of this line? _ := ({}.DefineProp)(ComValue.Prototype, '__Call', { Call: (s, n, p) => (p.InsertAt(2, s), ComCall(p*...
- 08 May 2024, 01:17
- Forum: Ask for Help (v2)
- Topic: Traytips disappered
- Replies: 1
- Views: 139
Re: Traytips disappered
Has anyone encountered a problem where all TrayTips from all scripts disappeared? A computer restart temporarily solves the issue. Apologies if this is not the correct forum. I suspect that the problem relates to v2 since it only appeared after a v1 script was converted to v2, but this is merely a ...
- 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: 1076
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: 1076
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: 1076
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: 1076
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: 1076
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: 1076
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: 1076
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: 1076
[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: 427
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: 529
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: 529
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: 1361
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: 1361
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: 12923
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: 2945