Search found 4354 matches
- 10 May 2024, 14:04
- Forum: Ask for Help (v2)
- Topic: Any way to determine which control of a webform has focus? Topic is solved
- Replies: 8
- Views: 397
Re: Any way to determine which control of a webform has focus? Topic is solved
The title of the browser window corresponds to the name of the active tab, you can see this if you enable the title bar display in the settings.
- 09 May 2024, 19:30
- Forum: Ask for Help (v1)
- Topic: Break chained Scripts' tray icon - UngruppingTrayIcon doesn't work consistently.
- Replies: 2
- Views: 334
Re: Break chained Scripts' tray icon - UngruppingTrayIcon doesn't work consistently.
This approach only separates the icons of such scripts from the rest of the scripts where this method is not applied. However, the icons of scripts where this method is used remain linked. There is currently no known way to separate them other than renaming the exe file.
- 09 May 2024, 18:26
- Forum: Ask for Help (v1)
- Topic: How to save image in clipboard.
- Replies: 76
- Views: 10944
Re: How to save image in clipboard.
F3:: ; press F3 to load screenshot to clipboard Clipboard := ; Clear the clipboard GDI_CaptureScreenToClipboard(0, 0, A_ScreenWidth, A_ScreenHeight) DllCall("DeleteObject", "Ptr", hBM) ; Clean-up Return These lines Clipboard := ; Clear the clipboard DllCall("DeleteObject", "Ptr", hBM) ; Clean-up ar...
- 09 May 2024, 15:20
- Forum: Ask for Help (v2)
- Topic: Any way to determine which control of a webform has focus? Topic is solved
- Replies: 8
- Views: 397
Re: Any way to determine which control of a webform has focus? Topic is solved
The solution will depend on how the required elements are described in html. For example, on this page there are two search fields with id keywords and search_keywords . If you run this script on this page ((...elemIds) => { const prevTitle = document.title; const updateTitle = id => document.title ...
- 09 May 2024, 10:54
- Forum: Ask for Help (v2)
- Topic: Any way to determine which control of a webform has focus? Topic is solved
- Replies: 8
- Views: 397
Re: Any way to determine which control of a webform has focus? Topic is solved
A variant of the solution is Tampermonkey extension for Firefox + custom javascript that will track a focus change event on a page, and add to the page title information about which element is in focus. Accordingly, you will be able to use #HotIf in AutoHotkey script.
- 08 May 2024, 22:15
- Forum: Ask for Help (v2)
- Topic: Progressive removal of text in Text Control?
- Replies: 5
- Views: 296
Re: Progressive removal of text in Text Control?
#Requires AutoHotkey v2+ ; disappearing text experiment guiTitle := 'Color Change' str := 'the quick brown fox jumps over' mg := Gui(, guiTitle) mg.SetFont('s16 cBlue','Consolas') sBlue := mg.Add('text', 'w400', str) mg.Show() #hotif WinActive(guiTitle) Right:: Left:: ((txtCtrl, side) => ( p := sid...
- 08 May 2024, 21:19
- Forum: Ask for Help (v1)
- Topic: How to save image in clipboard.
- Replies: 76
- Views: 10944
Re: How to save image in clipboard.
The location of DllCall("DeleteObject", "Ptr", hBM) ; Clean-up is it correct? Yes, it's ok. Do i also need to add ---> DllCall("DeleteObject", "Ptr", pBM) ; Clean-up ? No, the DeleteObject() function is not intended for this data type. Resource freeing has already been done in the gdip.DisposeImage...
- 05 May 2024, 13:05
- Forum: Ask for Help (v2)
- Topic: Get command associated with context menu items?
- Replies: 8
- Views: 456
Re: Get command associated with context menu items?
I can identify the command that can be used to 'simulate' the menu click, without actually displaying the menu itself? I wanted to reply that it is, but I decided to test it first. Unfortunately, it turned out that approach doesn't work with Windows Explorer. My thought is to write a script that th...
- 05 May 2024, 12:15
- Forum: Ask for Help (v2)
- Topic: Get command associated with context menu items?
- Replies: 8
- Views: 456
Re: Get command associated with context menu items?
So no persistent app can receive the command that you have suggested. If a context menu can be called, then there is an application that displays it. When the user clicks on a menu item, the application that opened the menu receives a WM_COMMAND message and executes the command associated with that...
- 05 May 2024, 08:05
- Forum: Ask for Help (v2)
- Topic: Get command associated with context menu items?
- Replies: 8
- Views: 456
Re: Get command associated with context menu items?
When the user clicks a menu item, a WM_COMMAND message is sent to the application window with the item ID in wParam. You can simulate a click on this menu item by sending a corresponding message to the window. The easiest way to find out the ID of a menu item is to use applications that intercept me...
- 02 May 2024, 09:33
- Forum: Ask for Help (v2)
- Topic: i need help how to random the loops not to be in order
- Replies: 4
- Views: 306
Re: i need help how to random the loops not to be in order
Perhaps @vmech meant something like this: arr := [] loop 20 { arr.Push(Func%A_Index%) } Loop 20 { arr.RemoveAt(Random(1, arr.Length))() } object-oriented features I wouldn't say that the function array is an object-oriented feature . It is rather the opposite, a feature from the functional approach.
- 02 May 2024, 08:51
- Forum: Ask for Help (v2)
- Topic: autohotkey V2 does not have a byte type, Is there any way to convert string to byte in AHK?
- Replies: 7
- Views: 555
Re: autohotkey V2 does not have a byte type, Is there any way to convert string to byte in AHK?
Replace this line
with
Code: Select all
StrPut(str, buf := Buffer(StrPut(str, 'CP0')), 'CP0')
Code: Select all
StrPut(str, buf := Buffer(StrPut(str, 'CP0') - 1), 'CP0')
- 01 May 2024, 18:52
- Forum: Ask for Help (v2)
- Topic: ActiveX(HTML), how to underline a paragraph, change a sentence's background color and some words' font color Topic is solved
- Replies: 4
- Views: 484
Re: ActiveX(HTML), how to underline a paragraph, change a sentence's background color and some words' font color Topic is solved
Try this fix: #Requires AutoHotkey v2 DecoratedTextGui() DecoratedTextGui() { FixIE() wnd := Gui() document := wnd.AddActiveX('w220 h130', 'HTMLFILE').Value document.Write(' ( <!DOCTYPE html> <html> <head> <style> * { margin: 0; padding: 0; overflow: hidden; } .sometext { position: absolute; width: ...
- 01 May 2024, 17:42
- Forum: Ask for Help (v2)
- Topic: ActiveX(HTML), how to underline a paragraph, change a sentence's background color and some words' font color Topic is solved
- Replies: 4
- Views: 484
Re: ActiveX(HTML), how to underline a paragraph, change a sentence's background color and some words' font color Topic is solved
#Requires AutoHotkey v2 DecoratedTextGui() DecoratedTextGui() { wnd := Gui() document := wnd.AddActiveX('w220 h130', 'HTMLFILE').Value document.Write(' ( <!DOCTYPE html> <html> <head> <style> * { margin: 0; padding: 0; overflow: hidden; } .sometext { position: absolute; width: 100%; height: 100%; f...
- 01 May 2024, 08:39
- Forum: Ask for Help (v2)
- Topic: autohotkey V2 does not have a byte type, Is there any way to convert string to byte in AHK?
- Replies: 7
- Views: 555
Re: autohotkey V2 does not have a byte type, Is there any way to convert string to byte in AHK?
Try this: #Requires AutoHotkey v2 DetectHiddenWindows true Persistent str := '!123456' pidOrProcessName := 'MyProgram.exe' ; specify PID or exe name of the target program if !PID := ProcessExist(pidOrProcessName) { throw Error('Process not found') } StrPut(str, buf := Buffer(StrPut(str, 'CP0')), 'CP...
- 01 May 2024, 03:29
- Forum: Ask for Help (v2)
- Topic: autohotkey V2 does not have a byte type, Is there any way to convert string to byte in AHK?
- Replies: 7
- Views: 555
- 30 Apr 2024, 19:47
- Forum: Ask for Help (v2)
- Topic: Updating the JsonToAHK function to AHK v2 Topic is solved
- Replies: 2
- Views: 364
Re: Updating the JsonToAHK function to AHK v2 Topic is solved
Hello #Requires Autohotkey v2.0 JsonExam := ' ( {"menu": { "id": "file", "value": "File", "popup": { "menuitem": [ {"value": "New", "onclick": "CreateNewDoc()"}, {"value": "Open", "onclick": "OpenDoc()"}, {"value": "Close", "onclick": "CloseDoc()"} ] } }} )' obj := JsonToAhk(JsonExam) MsgBox obj['me...
- 30 Apr 2024, 12:15
- Forum: Ask for Help (v2)
- Topic: Gui Edit (TextBox) auto show/hide scrollbar on mouse hover?
- Replies: 6
- Views: 555
Re: Gui Edit (TextBox) auto show/hide scrollbar on mouse hover?
ActiveX? #Requires AutoHotkey v2 HoverScrollbarGui() HoverScrollbarGui() { wnd := Gui() document := wnd.AddActiveX('w200 h100', 'HTMLFILE').Value document.Write(' ( <!DOCTYPE html> <html> <head> <style> * { margin: 0; padding: 0; overflow: hidden; } textarea { position: absolute; width: 100%; height...
- 29 Apr 2024, 14:16
- Forum: Ask for Help (v1)
- Topic: MsgBox and WinMove
- Replies: 29
- Views: 5934
Re: MsgBox and WinMove
It will not be possible to translate this code to v2 exactly, because there is no mechanism in the second version that would create self-starting functions. The closest translation would be the following: #Requires AutoHotkey v2 inst := MsgBoxWithCoords() MsgBox 'This MsgBox appears in coords x = 50...
- 28 Apr 2024, 10:07
- Forum: Ask for Help (v1)
- Topic: How to save image in clipboard.
- Replies: 76
- Views: 10944
Re: How to save image in clipboard.
I am sure that there is a "line" in the code that can modify the code to always save JPG as 100% qaulity. Just for educational purposes, i will appreciate if you can point me what is the part of the code that changes the 75 to 100%. Understood. In fact, saving a JPEG at 75% quality doesn't require ...