Search found 22 matches

by Panaku
17 Apr 2024, 10:56
Forum: Ask for Help (v2)
Topic: Pulling Text from a GUI
Replies: 4
Views: 198

Re: Pulling Text from a GUI

The error you're receiving, This variable appears to never be assigned a value. , is likely happening because of the scope in which you define that variable. If you're creating your GUI, or GUI Controls inside of a function, those variables are only accessible inside of that function unless you defi...
by Panaku
16 Apr 2024, 19:18
Forum: Ask for Help (v2)
Topic: Why Msgbox dosn't use "TraySetIcon"? Topic is solved
Replies: 13
Views: 542

Re: Why Msgbox dosn't use "TraySetIcon"? Topic is solved

Seven0528 , thanks for pointing out that bit in the documentation for LoadPicture() . Ran some leak tests and was noticing some performance issues after about 1600 MsgBox() calls, so we've tweaked the function yet again, now deleting the handles right after they've been applied and are now no longe...
by Panaku
16 Apr 2024, 16:19
Forum: Ask for Help (v2)
Topic: Pulling Text from a GUI
Replies: 4
Views: 198

Re: Pulling Text from a GUI

In AHK v2, GUIs are Objects and their controls belong to those objects. There simple/common ways to access those controls later, including values. The first way is to give the controls names via the v option, then you can reference the control by using the variable name of the GUI and it's control. ...
by Panaku
16 Apr 2024, 11:31
Forum: Ask for Help (v2)
Topic: Why Msgbox dosn't use "TraySetIcon"? Topic is solved
Replies: 13
Views: 542

Re: Why Msgbox dosn't use "TraySetIcon"? Topic is solved

So, I'm not sure there is a need for doing all of the DllCall s to load the different resolutions of the icons. The SendMessage() call lets us control which resolution is used by defining the width and height when we use LoadPicture . We've made some adjustments to the function that I posted yesterd...
by Panaku
15 Apr 2024, 13:45
Forum: Ask for Help (v2)
Topic: Why Msgbox dosn't use "TraySetIcon"? Topic is solved
Replies: 13
Views: 542

Re: Why Msgbox dosn't use "TraySetIcon"? Topic is solved

UPDATE: I may have been a little confused on what was the original goal here. The code I've provided below is for adding the script's Icon to the titlebar of the MsgBox and not to the Window's Taskbar, however it will add the icon to BOTH. I also noticed some potential poor image quality when using...
by Panaku
14 Apr 2024, 23:01
Forum: Ask for Help (v2)
Topic: Problems using #Include
Replies: 6
Views: 190

Re: Problems using #Include

#Include works as if it's performing a copy and paste of the file's data directly where the #Include is, and is intended for use with other AHK scripts. One way you could assign all of those images to variables would be by performing a Loop Files ImageArray := [] Loop Files, A_ScriptDir "\images\ba...
by Panaku
14 Apr 2024, 22:24
Forum: Bug Reports
Topic: ":: try {throw}" still throws an error Topic is solved
Replies: 5
Views: 456

Re: ":: try {throw}" still throws an error Topic is solved

You should pick between doing a single line or multi line. When you want a hotkey to run multiple lines of code, you need to open the brackets immediately after the key definition because Hotkeys act similar to functions, so you need to open a code block. Single Line: MButton::MsgBox("Hello") Multi-...
by Panaku
09 Apr 2024, 00:46
Forum: Ask for Help (v2)
Topic: How to simulate the DoubleClick Event with the right button Topic is solved
Replies: 4
Views: 126

Re: How to simulate the DoubleClick Event with the right button Topic is solved

Due to the fact that Listboxes don't focus the item that has been right-clicked, we had to add that manual click into the callback. #Requires AutoHotkey v2.0 MyGui := Gui(, 'inventory'), MyGui.SetFont('s10') Fruits := ["Apple", "Kiwi", "Pear", "Cherry", "Mango"] LB1 := MyGui.AddListBox('xm w320 r5',...
by Panaku
11 Mar 2024, 08:31
Forum: Ask for Help (v2)
Topic: Gui OnNotify Topic is solved
Replies: 3
Views: 653

Re: Gui OnNotify Topic is solved

OnMessage callbacks receive four parameters -- wParam, lParam, Msg, Hwnd. Hwnd is the Hwnd of the control that is responding the the OnMessage call. This means you can scrap the MouseGetPos line and just do a hwnd check.
by Panaku
04 Dec 2023, 18:27
Forum: Scripts and Functions (v2)
Topic: WebView2
Replies: 139
Views: 35917

Re: WebView2

So if we only access the DownloadOperation object from within the DownloadStarting event, are we able to (and do we need to) create an event handler for the events that are a part of the DownloadOperation object? I'm trying to figure out how to create callback handlers for each event in the class bu...
by Panaku
04 Dec 2023, 01:50
Forum: Scripts and Functions (v2)
Topic: WebView2
Replies: 139
Views: 35917

Re: WebView2

To follow up on the issue with accessing the nested classes: I am getting some errors with the ComCall s. I still don't know the right way to access the nested classes, but I did find that I was able to do so from within the Create method of the main class by doing the following dlo := this.Download...
by Panaku
02 Dec 2023, 08:49
Forum: Scripts and Functions (v2)
Topic: WebView2
Replies: 139
Views: 35917

Re: WebView2

Once again, my ignorance knows no bounds. I'm trying to set up some event handlers, and running into some trouble. Any handlers that are part of the Controller or Core classes I'm able to setup, but I'm having issues with the other classes. Here's examples of what I've got going on wvc := WebView2.c...
by Panaku
31 Aug 2023, 18:39
Forum: Scripts and Functions (v2)
Topic: WebView2
Replies: 139
Views: 35917

Re: WebView2

There is a typo, pm := DllCall('ole32\CoTaskMemAlloc', 'uptr', s := StrLen(v := opts .%prop%) * 2 + 2, 'ptr') . Correcting this typo allowed the script to move forward to the next part of creating the WebView2 but now produces an error at line #46. throw OSError(R) returns Error: (0x80070057) The p...
by Panaku
30 Aug 2023, 20:43
Forum: Scripts and Functions (v2)
Topic: WebView2
Replies: 139
Views: 35917

Re: WebView2

Looking at your example from another post on this thread, I know that I'm attempting to add AdditionalBrowserArguments as you intended but it keeps generating an error. The error it gives is Error: This value of type "Integer" has no property named "TargetCompatibleBrowserVersion" and is occurring o...
by Panaku
26 Aug 2023, 11:18
Forum: Scripts and Functions (v2)
Topic: WebView2
Replies: 139
Views: 35917

Re: WebView2

thqby Do you know how I can determine which WebView an event is coming from? I've parsed out all the information I seem to be able from the ICoreWebView2 and EventArgs, but none of it works as an unique identifier. BrowserProcessId: 3240 CanGoBack: 0 CanGoForward: 0 ContainsFullScreenElement: 0 Def...
by Panaku
20 Aug 2023, 13:36
Forum: Scripts and Functions (v2)
Topic: WebView2
Replies: 139
Views: 35917

Re: WebView2

I've setup a couple of handlers for things such as NavigationCompleted and NavigationStarting, but I can't figure out how to pull the uri or url from the EventArgs. Could you maybe shed some light on this? Panaku, is the Source property what you are looking for? Webview2Var := WebView2.create(GUIVa...
by Panaku
20 Aug 2023, 03:57
Forum: Scripts and Functions (v2)
Topic: WebView2
Replies: 139
Views: 35917

Re: WebView2

I've setup a couple of handlers for things such as NavigationCompleted and NavigationStarting, but I can't figure out how to pull the uri or url from the EventArgs. Could you maybe shed some light on this?
by Panaku
30 Aug 2022, 12:58
Forum: Scripts and Functions (v1)
Topic: [ Class + ( Editor Tool ) ] Custom Gui Image Button
Replies: 44
Views: 12806

Re: [ Class + ( Editor Tool ) ] Custom Gui Image Button

I didn't see a way to utilize the GUI Context Menu and your Custom GUI Image Buttons, so I took the liberty of creating one. This method seems to work just fine and was pretty easily to implement, but if there already exists a way to utilize the Context Menu please let me know. In your class file, y...
by Panaku
17 Aug 2022, 04:09
Forum: Ask for Help (v1)
Topic: Is there any way to embed a CMD / Console in a GUI?
Replies: 14
Views: 3922

Re: Is there any way to embed a CMD / Console in a GUI?

Do you know if there's a way to cancel a running command using this code that @teadrinker put together? If I try to send a second command it locks up the entire program, I can kind of close the cmd window from the task manager but that seems a little hit and miss to it's effectiveness.
by Panaku
03 Apr 2022, 01:45
Forum: Ask for Help (v1)
Topic: Manipulating SQL Database Topic is solved
Replies: 1
Views: 9365

Re: Manipulating SQL Database Topic is solved

I just want to post and update that I finally figured out what was happening. As I expected this almost all boiled down to me not understanding what I was doing with MSSQL Server Management Studio. I had been connecting to the database in MSSQL using Windows Authentication but had been trying to con...

Go to advanced search