Search found 4357 matches

by teadrinker
Today, 14:44
Forum: Ask for Help (v2)
Topic: String Manipulation between ^ and /
Replies: 18
Views: 734

Re: String Manipulation between ^ and /

@sofista
You have extra parentheses: RegExMatch(str, "=(?<year>..)(?<month>..)", &m)
by teadrinker
Today, 14:38
Forum: Ask for Help (v1)
Topic: How to save image in clipboard.
Replies: 77
Views: 11283

Re: How to save image in clipboard.

If we decide to not use it, does it will cause any problems to anywhere (memory problems etc or any other problems)? The DeleteObject() function should be used by hBitmap when hBitmap has been created and is no longer needed. Failure to use DeleteObject() in this case will result in a memory leak. ...
by teadrinker
Today, 12:19
Forum: Ask for Help (v2)
Topic: Make ListView selection toggle individual selection Topic is solved
Replies: 2
Views: 117

Re: Make ListView selection toggle individual selection Topic is solved

#Requires AutoHotkey v2 wnd := Gui() lv := wnd.Add('ListView', 'r10 w400', ['Name','Size (KB)']) Loop Files, A_MyDocuments . '\*.*' { lv.Add(, A_LoopFileName, A_LoopFileSizeKB) } lv.ModifyCol(1, 'AutoHdr') lv.ModifyCol(2, 'AutoHdr Integer') wnd.Show() OnMessage(0x201, WM_LBUTTONDOWN) WM_LBUTTONDOWN...
by teadrinker
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: 456

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.
by teadrinker
09 May 2024, 19:30
Forum: Ask for Help (v1)
Topic: Break chained Scripts' tray icon - UngruppingTrayIcon doesn't work consistently.
Replies: 2
Views: 380

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.
by teadrinker
09 May 2024, 18:26
Forum: Ask for Help (v1)
Topic: How to save image in clipboard.
Replies: 77
Views: 11283

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...
by teadrinker
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: 456

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 ...
by teadrinker
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: 456

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.
by teadrinker
08 May 2024, 22:15
Forum: Ask for Help (v2)
Topic: Progressive removal of text in Text Control?
Replies: 5
Views: 345

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...
by teadrinker
08 May 2024, 21:19
Forum: Ask for Help (v1)
Topic: How to save image in clipboard.
Replies: 77
Views: 11283

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...
by teadrinker
05 May 2024, 13:05
Forum: Ask for Help (v2)
Topic: Get command associated with context menu items?
Replies: 8
Views: 483

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...
by teadrinker
05 May 2024, 12:15
Forum: Ask for Help (v2)
Topic: Get command associated with context menu items?
Replies: 8
Views: 483

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...
by teadrinker
05 May 2024, 08:05
Forum: Ask for Help (v2)
Topic: Get command associated with context menu items?
Replies: 8
Views: 483

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...
by teadrinker
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: 311

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.
by teadrinker
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: 558

Re: autohotkey V2 does not have a byte type, Is there any way to convert string to byte in AHK?

Replace this line

Code: Select all

StrPut(str, buf := Buffer(StrPut(str, 'CP0')), 'CP0')
with

Code: Select all

StrPut(str, buf := Buffer(StrPut(str, 'CP0') - 1), 'CP0')
by teadrinker
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: 487

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: ...
by teadrinker
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: 487

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...
by teadrinker
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: 558

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...
by teadrinker
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: 558

Re: autohotkey V2 does not have a byte type, Is there any way to convert string to byte in AHK?

kevinpak wrote: convert string to byte
It's not clear what you mean by that. A string is a sequence of bytes. What exactly should be the result of conversion?
by teadrinker
30 Apr 2024, 19:47
Forum: Ask for Help (v2)
Topic: Updating the JsonToAHK function to AHK v2 Topic is solved
Replies: 2
Views: 365

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...

Go to advanced search