Search found 5289 matches

by jeeswg
Yesterday, 02:11
Forum: Ask For Help
Topic: Retrieve name of most-recently launched script
Replies: 2
Views: 59

Re: Retrieve name of most-recently launched script

Here's a script to list AHK scripts with the date they were started. ;Win32_Process class | Microsoft Docs ;https://docs.microsoft.com/en-us/windows/desktop/cimwin32prov/win32-process q:: ;AHK scripts - get date started vOutput := "" DetectHiddenWindows, On for oProc in ComObjGet("winmgmts:").ExecQu...
by jeeswg
17 Nov 2018, 17:54
Forum: Ask For Help
Topic: Filter out numbers from Clipboard and summarize them Topic is solved
Replies: 6
Views: 118

Re: Filter out numbers from Clipboard and summarize them Topic is solved

Pretty similar to swagfag's code, I would do it like this: vText := "Car (12), Street (2), Pedestrian (4), Tree (2)" vText := Trim(RegExReplace(vText, "\D+", " ")) vSum := 0 Loop, Parse, % vText, % " " vSum += A_LoopField MsgBox, % vSum Btw why the use of Chr()? Although I use Chr() sometimes e.g. C...
by jeeswg
17 Nov 2018, 09:19
Forum: Ask For Help
Topic: Applying an action only when a Control Panel window is active
Replies: 1
Views: 31

Re: Applying an action only when a Control Panel window is active

I would try something like this. Cheers.

Code: Select all

q:: ;check if active window is Control Panel
ControlGetText, vText, ToolbarWindow322, A
MsgBox, % vText
if InStr(vText, "Address: Control Panel")
	MsgBox, % "control panel: y"
else
	MsgBox, % "control panel: n"
return
by jeeswg
17 Nov 2018, 05:32
Forum: Scripts and Functions
Topic: alt-tab replacement
Replies: 4
Views: 550

Re: alt-tab replacement

- Thanks. AFAIK there isn't a simple way to get a list of windows that appear in the alt-tab or taskbar lists, therefore you have to reverse-engineer it. I attempt this by using WinGet, vWinList, List , to get a list of top-level windows, and by using one of my 2 filter functions to filter that list...
by jeeswg
16 Nov 2018, 22:26
Forum: Ask For Help
Topic: Better edit control Topic is solved
Replies: 7
Views: 122

Re: Better edit control Topic is solved

- I right-click the 'Raw' button to download an individual file.
- Or I click the 'Clone or download' button to download a zip.
- If the 'Clone or download' button isn't available, I navigate to the repository's main page.
by jeeswg
16 Nov 2018, 16:28
Forum: Ask For Help
Topic: Gui Colors
Replies: 1
Views: 61

Re: Gui Colors

Try Aqua. Cheers.
There's a list here:
Progress / SplashImage - Syntax & Usage | AutoHotkey
https://autohotkey.com/docs/commands/Pr ... ect_Colors
List of Color Names | AutoHotkey v2
https://lexikos.github.io/v2/docs/misc/Colors.htm
by jeeswg
16 Nov 2018, 14:02
Forum: Ask For Help
Topic: Better edit control Topic is solved
Replies: 7
Views: 122

Re: Better edit control Topic is solved

- RichEdit and Scintilla are the controls that spring to mind. - When I asked re. Edit control alternatives, Scintilla seemed quite popular. Edit control alternative for GUI commands, colour individual lines - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=5&t=27117 - RichEdit mi...
by jeeswg
16 Nov 2018, 09:26
Forum: Other Programming Languages
Topic: C++: AHK source code: where is it located?
Replies: 0
Views: 88

C++: AHK source code: where is it located?

- I have done a read-through of the AHK source code. - I have identified the locations of key parts of the source code in other threads: AutoHotkey C++ Powerhouse: Introduction - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=23&t=54394 C++ for AutoHotkey: list of command/functio...
by jeeswg
16 Nov 2018, 08:02
Forum: Ask For Help
Topic: Activate taskbar / Force re-focus of current application
Replies: 1
Views: 34

Re: Activate taskbar / Force re-focus of current application

I don't know if it would work, but you could try a variant of the script here on the active control or window: Notepad2: set Find Text dialog text - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=5&t=58872 q:: WinGet, hWnd, ID, A ControlGet, hCtl, Hwnd,, Edit1, % "ahk_id " hWnd P...
by jeeswg
16 Nov 2018, 03:34
Forum: Ask For Help
Topic: Copying fails for documents opened with PDF-XChange
Replies: 6
Views: 109

Re: Copying fails for documents opened with PDF-XChange

You could do this before sending Ctrl+C: Clipboard := ""
by jeeswg
15 Nov 2018, 19:53
Forum: Ask For Help
Topic: VScroll Events In Edit Control To Variable
Replies: 4
Views: 94

Re: VScroll Events In Edit Control To Variable

This didn't work for Notepad unfortunately and so is unlikely to work with Edit controls, but did work with Internet Explorer. ;plays a sound when a scroll ends (on some programs e.g. Internet Explorer) OnScroll(hWinEventHook, vEvent, hWnd) { local ;EVENT_SYSTEM_SCROLLINGEND := 0x13 ;EVENT_OBJECT_CO...
by jeeswg
15 Nov 2018, 19:43
Forum: Ask For Help
Topic: Enter on popup Topic is solved
Replies: 3
Views: 116

Re: Enter on popup Topic is solved

- Try this, although I would advise using it with caution, and I would avoid using such a script. - (I would rename files manually, or use an AHK script for complicated renaming: Loop File and FileMove. Also, I use timestamps in file names to avoid name collisions: FormatTime and SendInput.) - To te...
by jeeswg
15 Nov 2018, 17:46
Forum: Ask For Help
Topic: [DllCall / NumGet] How to read the value of a pointer to pointer?
Replies: 7
Views: 154

Re: [DllCall / NumGet] How to read the value of a pointer to pointer?

CreateDIBSection function | Microsoft Docs https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-createdibsection A pointer to a variable that receives a pointer to the location of the DIB bit values. So ppvBits will be 'a pointer to the location of the DIB bit values'. That sounds l...
by jeeswg
15 Nov 2018, 14:07
Forum: Scripts and Functions
Topic: alt-tab replacement
Replies: 4
Views: 550

Re: alt-tab replacement

- I've tried to look further into identifying which windows appear in the alt-tab list and taskbar. I would very much welcome any feedback. - Such information is useful in order to recreate the lists, but is also useful in order to deliberately include/exclude a window from the alt-tab list/taskbar....
by jeeswg
15 Nov 2018, 11:47
Forum: Ask For Help
Topic: multidimensional arrays and "for each"
Replies: 3
Views: 79

Re: multidimensional arrays and "for each"

I usually write 'for' lines like this, to retrieve keys and values from an array: for vKey, vValue in oArray Where vKey and vValue are names that I choose. (I might use oValue instead of vValue, if I know it's going to be an object.) If I need keys but not values, I can do this: for vKey in oArray I...
by jeeswg
15 Nov 2018, 09:28
Forum: Bug Reports
Topic: minor bug: Sort command's handling of LFs/CRLFs
Replies: 0
Views: 58

minor bug: Sort command's handling of LFs/CRLFs

- This statement is not quite correct: Sort - Syntax & Usage | AutoHotkey https://autohotkey.com/docs/commands/Sort.htm If this option is not present, x defaults to linefeed (`n), which correctly sorts VarName if its lines end in either LF (`n) or CR+LF (`r`n). - Here is an example showing that a`t ...
by jeeswg
15 Nov 2018, 08:34
Forum: Ask For Help
Topic: generate a 'random' number Topic is solved
Replies: 10
Views: 323

Re: generate a 'random' number Topic is solved

- I've resolved the issue re. blank initial parameters: Scripting Language | AutoHotkey https://autohotkey.com/docs/Language.htm#commands The comma separating the command name from its parameters is optional, except in the following cases: •When it's necessary to prevent the line from being interpre...
by jeeswg
15 Nov 2018, 07:25
Forum: Wish List
Topic: OnWarn
Replies: 3
Views: 200

Re: OnWarn

- Actually, an OnWarn function would still be useful if it missed initial errors, in the same way that OnError does. - I don't mind using DebugView to test scripts when they load, but keeping a script/program open to monitor other scripts is somewhat of a burden. - An example use case. If you have a...
by jeeswg
14 Nov 2018, 16:23
Forum: Ask For Help
Topic: GUIs: calculate window size v. client size difference
Replies: 0
Views: 61

GUIs: calculate window size v. client size difference

- Since ControlGetPos/ControlMove/ControlClick use window coordinates in AHK v1, and client coordinates in AHK v2, I was interested to find a typical adjustment figure, i.e. the typical difference between the top-left corner of a window and the top-left corner of the client area (e.g. in Notepad, th...
by jeeswg
14 Nov 2018, 15:22
Forum: Ask For Help
Topic: Paste from clipboard adding % sign Topic is solved
Replies: 3
Views: 75

Re: Paste from clipboard adding % sign Topic is solved

- Send treats + as shift. ^ # ! for ctrl/win/alt. Also, { and } have a special meaning. - Perhaps '+5' would give you '%'. - Anyhow, to make each character be sent literally use {Text}. - (There is also {Raw} in AHK v1, but not AHK v2.) q:: ;test send clipboard Clipboard := "abc +5 def" SendInput, %...

Go to advanced search