Search found 27172 matches

by mikeyww
27 minutes ago
Forum: Ask for Help (v1)
Topic: Clipboard Stopped Working ... AHK Scripts Won't Run
Replies: 13
Views: 757

Re: Clipboard Stopped Working ... AHK Scripts Won't Run

You indicated that the script usually works. Are you running other scripts or programs that also manage or interact with the clipboard at the same time? That is my only thought. Others here may have more insight into this. Incidentally, := does not need to force an expression via % because it is alw...
by mikeyww
Today, 17:06
Forum: Ask for Help (v2)
Topic: Convert run and &PID from v1
Replies: 3
Views: 164

Re: Convert run and &PID from v1

The pipe is not an AHK parameter; it is part of your command line. The PID is an AHK parameter. Thus, use the syntax that AHK provides, as follows. ExitCode := RunWait(Target [ , WorkingDir, Options, &OutputVarPID ] ) The target is your entire command line. Some programs will not return a PID or wil...
by mikeyww
Today, 14:58
Forum: Ask for Help (v2)
Topic: CoordMode confusion... Topic is solved
Replies: 2
Views: 146

Re: CoordMode confusion... Topic is solved

Yes. The page that you cited notes the following possible target types: ToolTip, Pixel, Mouse, Caret, and Menu. Take your pick.
by mikeyww
Today, 14:55
Forum: Ask for Help (v2)
Topic: Convert run and &PID from v1
Replies: 3
Views: 164

Re: Convert run and &PID from v1

Hello, "Doesn't work" says nothing about what your script does, and nothing about what your script should do. I did not test it, but a few tips are below. One script has two RunWait commands. The other does not use RunWait and does not have two such calls, but only one, so there are at least two dif...
by mikeyww
Today, 14:52
Forum: Ask for Help (v2)
Topic: Get and set caret (cursor) position (focus?)
Replies: 1
Views: 92

Re: Get and set caret (cursor) position (focus?)

Hello,

This may or may not work, depending on your situation. :arrow: CaretGetPos
by mikeyww
Today, 14:50
Forum: Ask for Help (v2)
Topic: After pressing a shortcut key, start a commad, and then press the same shortcut key to run a script or exit process B.
Replies: 1
Views: 102

Re: After pressing a shortcut key, start a commad, and then press the same shortcut key to run a script or exit process

Code: Select all

#Requires AutoHotkey v2.0
running := False

F3:: {
 Global running := True
 WinActive('A')
 SetKeyDelay 100
 Loop 12
  If WinExist() {
   If !WinActive()
    WinActivate
   SendEvent A_Index ' '
  }
}

#HotIf running
F3:: {
 RunWait A_WinDir '\System32\notepad.exe'
 Global running := False
}
#HotIf
by mikeyww
Yesterday, 08:24
Forum: Ask for Help (v1)
Topic: Can not take screenshot using autohotkey via script Topic is solved
Replies: 7
Views: 525

Re: Can not take screenshot using autohotkey via script Topic is solved

I do not know whether that is the problem, but it could be related-- worth exploring in any case. Good luck!
by mikeyww
Yesterday, 07:11
Forum: Gaming Help (v1)
Topic: Call function and send key down in one line Topic is solved
Replies: 2
Views: 138

Re: Call function and send key down in one line Topic is solved

Code: Select all

#Requires AutoHotkey v1.1.33.11
abc := 12345
Send % "{" SubStr(abc, 3, 1) " down}"
Explained: Expressions
by mikeyww
Yesterday, 06:15
Forum: Ask for Help (v1)
Topic: Can not take screenshot using autohotkey via script Topic is solved
Replies: 7
Views: 525

Re: Can not take screenshot using autohotkey via script Topic is solved

I did not test the script, but I noticed a couple of lines where you referred to A_IsCompiled. I guess you had some reason to check that variable. You might want to examine that more closely.
by mikeyww
Yesterday, 04:46
Forum: Ask for Help (v1)
Topic: can i shift the first text of a tooltip just 1 character to the right Topic is solved
Replies: 2
Views: 232

Re: can i shift the first text of a tooltip just 1 character to the right Topic is solved

Code: Select all

#Requires AutoHotkey v1.1.33.11
#Persistent
f := "def"
ToolTip % " abc`n " f

Code: Select all

#Requires AutoHotkey v1.1.33.11
#Persistent
f := "def"
ToolTip %A_Space%abc`n %f%
Explained: A_Space
by mikeyww
18 May 2024, 10:55
Forum: Ask for Help (v1)
Topic: Can not take screenshot using autohotkey via script Topic is solved
Replies: 7
Views: 525

Re: Can not take screenshot using autohotkey via script Topic is solved

"Does not work" does not say anything about what your script does when you run it. I did not test your script, but I can think of two main issues that could stop a (working) script from working only after it is compiled. The first is antivirus software that blocks the compiled program. The second is...
by mikeyww
18 May 2024, 10:53
Forum: Ask for Help (v2)
Topic: Autohotkey 3 Side Buttons on mouse.
Replies: 1
Views: 115

Re: Autohotkey 3 Side Buttons on mouse.

Welcome to this AutoHotkey forum!

I can think of two main options. The first is to check for a :arrow: scan code. The second would be to see if that button itself sends a known key or key sequence. If so, you could create a hotkey for that key in your script. KeyHistory
by mikeyww
18 May 2024, 07:12
Forum: Ask for Help (v1)
Topic: Can not take screenshot using autohotkey via script Topic is solved
Replies: 7
Views: 525

Re: Can not take screenshot using autohotkey via script Topic is solved

Hello, #If directives apply to all hotkeys and hotstrings below them, until the next such directive. Below are some strategies that I would use if this were my script. Remove #If... directives during testing. Shorten the script to the essential parts that you want to test. If it works, add new secti...
by mikeyww
17 May 2024, 22:23
Forum: Ask for Help (v1)
Topic: Failed to remove directory message
Replies: 1
Views: 296

Re: Failed to remove directory message

General reasons may include the following. Wrong path was specified. Script cannot access the directory due to wrong privileges. Directory does not exist. Directory is in use. Directory is not empty. Mode "DR" does not include any files. You can verify this very quickly if you examine what happens i...
by mikeyww
17 May 2024, 06:02
Forum: Ask for Help (v1)
Topic: Clipboard Stopped Working ... AHK Scripts Won't Run
Replies: 13
Views: 757

Re: Clipboard Stopped Working ... AHK Scripts Won't Run

You can now shorten a single test script to three lines, and test only that script, while no other scripts run. If the script fails, you have three lines to debug, and you can also post your revised script to get feedback about it. In your new post, include a description of what you do, what the scr...
by mikeyww
17 May 2024, 06:01
Forum: Ask for Help (v2)
Topic: COM change font of highlighted text
Replies: 8
Views: 440

Re: COM change font of highlighted text

Worked here as well.
by mikeyww
17 May 2024, 05:09
Forum: Ask for Help (v1)
Topic: Tooltip to remind myself for good posture
Replies: 2
Views: 327

Re: Tooltip to remind myself for good posture

Hello, You have posted a v1 script in the v2 forum. Hotkeys defined by :: are not subject to control flow or subroutines in that manner. The Hotkey command can be used to create, modify, enable, or disable a hotkey while the script is running. An alternative is using a directive to define a context ...
by mikeyww
16 May 2024, 21:45
Forum: Ask for Help (v2)
Topic: Tray app to change power plans
Replies: 10
Views: 362

Re: Tray app to change power plans

The script that I posted lets you assign the GUID to a scheme (name) specific to the AHK script. These names are independent of the Windows plan name and can include spaces if you like. XMCQCX has shown an alternative that retrieves the Windows plan information.
by mikeyww
16 May 2024, 21:18
Forum: Ask for Help (v2)
Topic: COM change font of highlighted text
Replies: 8
Views: 440

Re: COM change font of highlighted text

I can do even better than that: just search the forum to find the code that is already written for you.

viewtopic.php?p=379452#p379452

I've never encountered a noob with 206 posts! ;)

Go to advanced search