Search found 63 matches

by THX1138
05 Nov 2018, 16:42
Forum: Ask For Help
Topic: Disabling hotkey when certain programs are the active window
Replies: 2
Views: 678

Re: Disabling hotkey when certain programs are the active window

Thanks but it doesn't seem to work. If I add "Notepad" to the list of programs and try it in Notepad, middle click + scroll still moves the cursor to the centre of the screen. GroupAdd,Programs,Autodesk Fusion 360 (Startup License) GroupAdd,Programs,SketchUp Make 2017 GroupAdd,Programs,Notepad Retur...
by THX1138
02 Nov 2018, 17:28
Forum: Ask For Help
Topic: Disabling hotkey when certain programs are the active window
Replies: 2
Views: 678

Disabling hotkey when certain programs are the active window

I have this code which I use to relocate my mouse cursor to the centre of the screen any time it goes missing. MButton & WheelDown:: CoordMode, Mouse, Screen SysGet, PriMon, Monitor, %MonitorPrimary% MX := (PriMonLeft + PriMonRight)//2 MY := (PriMonTop + PriMonBottom)//2 MouseMove, MX, MY return MBu...
by THX1138
20 Jan 2018, 18:58
Forum: Ask For Help
Topic: Shortcut to toggle displays between 'disconnect this display' and 'extend desktop to this display'
Replies: 2
Views: 702

Re: Shortcut to toggle displays between 'disconnect this display' and 'extend desktop to this display'

https://autohotkey.com/boards/viewtopic.php?p=73224#p73224 https://autohotkey.com/boards/viewtopic.php?f=5&t=31163 Thanks but that interface is far too basic; it seems to have been devised for a two-monitor system whilst I have six monitors and would like to be able to control them all individually.
by THX1138
20 Jan 2018, 18:10
Forum: Ask For Help
Topic: Shortcut to toggle displays between 'disconnect this display' and 'extend desktop to this display'
Replies: 2
Views: 702

Shortcut to toggle displays between 'disconnect this display' and 'extend desktop to this display'

Windows 10 has menu of 'Display settings' where individual monitors of a multi-monitor system can be disabled/enabled and Windows remembers the relative positions. I've tried various alternative solutions including ChangeDisplaySettings.ahk, ToggleDisplay.ahk, MultiMonitorTool.exe but they don't wor...
by THX1138
04 Jan 2018, 17:24
Forum: Ask For Help
Topic: Finding 12 unique scancodes to use for a macropad project
Replies: 0
Views: 352

Finding 12 unique scancodes to use for a macropad project

I would like to make a 12-key macropad which will use an Arduino microcontroller to send signals to my PC via USB. How can I determine suitable scancodes or scancode combinations to send which are not used by anything else connected to my machine?
by THX1138
08 Dec 2017, 01:21
Forum: Scripts and Functions
Topic: Limit mouse movement to window, control or custom rectangle
Replies: 9
Views: 2680

Re: Limit mouse movement to window, control or custom rectangle

Is there a way to make this restrict the cursor to specified monitors on a multi-monitor system (but two or three monitors and not a single monitor at a time)?
by THX1138
06 Dec 2017, 17:30
Forum: Ask For Help
Topic: Toggling mouse cursor restriction to multiple monitors (and putting others into stand by)
Replies: 0
Views: 394

Toggling mouse cursor restriction to multiple monitors (and putting others into stand by)

I have four monitors but I don't use them all all the time so it's annoying when my mouse wanders to a monitor which is turned off. Is there a way I can toggle a restriction of the mouse to a particular monitor? I'd combine it with a way to toggle the monitor being sent a stand-by signal which I can...
by THX1138
06 Dec 2017, 15:42
Forum: Editors
Topic: Setup Notepad++ for AutoHotkey
Replies: 134
Views: 314793

Re: Setup Notepad++ for AutoHotkey

There is no error message. When I say it doesn't work, I mean that when I choose 'edit script' from the tasktray AHK icon context menu, the script opens in MS Notepad as it does by default.

The path to the Notepad++ executable is correct.
by THX1138
05 Dec 2017, 21:53
Forum: Editors
Topic: Setup Notepad++ for AutoHotkey
Replies: 134
Views: 314793

Re: Setup Notepad++ for AutoHotkey

How do you use the RegWrite code? I tried putting it into the Windows 10 Powershell and it was rejected. I tried deleting one of the two consecutive commas and I tried putting the file path in quotation marks. Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. PS C:\Window...
by THX1138
05 Dec 2017, 17:07
Forum: Ask For Help
Topic: Trying to use ChangeDisplaySettingsEx: call to non-existent function sizeof(dm)
Replies: 0
Views: 449

Trying to use ChangeDisplaySettingsEx: call to non-existent function sizeof(dm)

I tried to use the following code which I got from this thread: https://autohotkey.com/board/topic/96293-changing-multiple-monitor-display-resolutions/ but I get an error about a call to a non-existent function. The code was submitted to the old forum in 2013. Is it incompatible with the current ver...
by THX1138
05 Dec 2017, 15:15
Forum: Editors
Topic: Setup Notepad++ for AutoHotkey
Replies: 134
Views: 314793

Re: Setup Notepad++ for AutoHotkey

How do you use the RegWrite code? I tried putting it into the Windows 10 Powershell and it was rejected. I tried deleting one of the two consecutive commas and I tried putting the file path in quotation marks. Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. PS C:\Windows...
by THX1138
05 Dec 2017, 15:03
Forum: Ask For Help
Topic: [SOLVED] How To Change Resolution of Both Monitors At Once?
Replies: 14
Views: 3988

Re: [SOLVED] How To Change Resolution of Both Monitors At Once?

I'm trying to use ChangeDisplaySettings(1440|900, 0, 0, 5, 0) on this machine with four monitors (three on integrated graphics; one on discrete): OS: Win 10 Pro 64-bit Mainboard: ASUS Z170 Pro Gaming, board revision 1.04, BIOS v3501 CPU: Intel i7 6700, Stock HSF, Undervolt Offset -0.1 V, VCCIO 1.09 ...
by THX1138
05 Dec 2017, 14:37
Forum: Ask For Help
Topic: How to change screen resolution using AHK script?
Replies: 7
Views: 10469

Re: How to change screen resolution using AHK script?

I also would like a solution for a multiple-monitor system.
by THX1138
05 Dec 2017, 13:45
Forum: Ask For Help
Topic: Display device (monitor) toggle Topic is solved
Replies: 7
Views: 3089

Re: Display device (monitor) toggle Topic is solved

Okay, with help from different sources I've established that the script actually starts with the line DisplayPosition_Set(device_name, x, y, defer=false) whilst DisplayPosition_Get("\\.\DISPLAY2", x2, y2) and DisplayPosition_Set("\\.\DISPLAY2", x2, y2) are "function calls" which need to be placed in...
by THX1138
05 Dec 2017, 12:13
Forum: Ask For Help
Topic: Error: function cannot contain a function
Replies: 11
Views: 1882

Re: Error: function cannot contain a function

Okay thanks; I'll do that but are you sure I want DisplayPosition_Get and not DisplayPosition_Set? Like: new LongHotkey("RAlt & M & 5", "mon5function") mon5function(){ Run MultiMonitorTool.exe /switch \\.\DISPLAY5 ; DisplayPosition_Set("\\.\DISPLAY5", -1440, 0) } new LongHotkey("RAlt & M & 6", "mon6...
by THX1138
05 Dec 2017, 11:57
Forum: Ask For Help
Topic: Want to automatically reload script in AHK upon saving in Notepad++ (already works for MS Notepad) Topic is solved
Replies: 2
Views: 1066

Want to automatically reload script in AHK upon saving in Notepad++ (already works for MS Notepad) Topic is solved

I use the following code so that if I edit my autohotkey.ahk file in MS Notepad and save, the save action reloads the script in AHK. I wanted this to also work in Notepad++ and made what I thought would be acceptable changes to enable this but when I save in Notepad++, AHK does not reload the script...
by THX1138
05 Dec 2017, 10:48
Forum: Ask For Help
Topic: Error: function cannot contain a function
Replies: 11
Views: 1882

Re: Error: function cannot contain a function

You should probably only include setDisplayPosition.ahk once, at the top of the script. Do you need the pause ? Also for the LongHotkeys , you can do loop 7 new LongHotkey("# & M & " A_Index, "monXfunction", A_Index) ; Key-combo, function, params ... monXfunction(X){ Run MultiMonitorTool.exe /switc...
by THX1138
05 Dec 2017, 10:00
Forum: Ask For Help
Topic: Error: function cannot contain a function
Replies: 11
Views: 1882

Re: Error: function cannot contain a function

Actually, the position of the includes are no good; they are executing without the key combination being entered. They really need to be a part of the LongHotkey functions but that's not possible because a function cannot contain a function?
by THX1138
05 Dec 2017, 00:02
Forum: Ask For Help
Topic: Error: function cannot contain a function
Replies: 11
Views: 1882

Re: Error: function cannot contain a function

Thanks again! I now have a different error after changing the extra Includes to IncludeAgains. Is this an error in the included script itself? https://imgur.com/irD1JWj.png ;;;;;;;;;; This bit toggles monitors #Include C:\Program Files\AutoHotkey\longhotkey.ahk new LongHotkey("# & M & 1", "mon1funct...
by THX1138
04 Dec 2017, 21:53
Forum: Ask For Help
Topic: Error: function cannot contain a function
Replies: 11
Views: 1882

Re: Error: function cannot contain a function

Thanks! This is the old code: new LongHotkey("# & M & 1", "mon1function") mon1function(){ Run MultiMonitorTool.exe /switch \\.\DISPLAY1 #Include C:\Users\seanv\Documents\setDisplayPosition.ahk } new LongHotkey("# & M & 2", "mon2function") mon2function(){ Run MultiMonitorTool.exe /switch \\.\DISPLAY2...

Go to advanced search