Search found 17037 matches
- Today, 03:50
- Forum: Scripts and Functions (v2)
- Topic: CSVtoDict v2
- Replies: 6
- Views: 874
Re: CSVtoDict v2
This is a first cut at something that splits the lines appropriately and produces the desired output when quoted fields contain line breaks. Caveats are that it doesn't handle cases where the CSV file contains escaped quote characters (although that would be an easy modification), and it wouldn't be...
- Today, 02:38
- Forum: Scripts and Functions (v2)
- Topic: CSVtoDict v2
- Replies: 6
- Views: 874
Re: CSVtoDict v2
That is more complicated because you can't simply split strings on line breaks. You would have to write a function that doesn't split on line breaks if they are between a pair of quotation marks.
- Today, 02:15
- Forum: Bug Reports
- Topic: loop parse "CSV" doesn't work for some CSV
- Replies: 2
- Views: 62
Re: loop parse "CSV" doesn't work for some CSV
That’s not an AHK bug. Or at least that’s not a valid test of whether there is what might be considered an AHK bug. That’s a case that you used which the example script does not handle. That script is not a proper test of whether parsing using the CSV delimiter option works with line breaks because ...
- Today, 01:56
- Forum: Ask for Help (v1)
- Topic: How to close an app window only when the mouse cursor over it? Topic is solved
- Replies: 2
- Views: 135
Re: How to close an app window only when the mouse cursor over it? Topic is solved
The parameters in a function call are expressions, and you must use quotes around literal strings in expressions, so this line is incorrect: If WinExist(ScreenClippingWindow ahk_class AutoHotkeyGUI) Should be: If WinExist("ScreenClippingWindow ahk_class AutoHotkeyGUI") What you’ve done is concatenat...
- Yesterday, 12:05
- Forum: Ask for Help (v2)
- Topic: COM change font of highlighted text
- Replies: 8
- Views: 398
Re: COM change font of highlighted text
I suppose that could help address the issue, but I don’t have experience with changing the language.
- Yesterday, 11:26
- Forum: Ask for Help (v1)
- Topic: Incorrect usage of NotifyTrayClick?
- Replies: 1
- Views: 268
Re: Incorrect usage of NotifyTrayClick?
Do you realize that it's for clicks on the script's tray icon, not clicks in general? There's no reason for it to be so complex if it was just doing what simple hotkeys can do.
- Yesterday, 09:34
- Forum: Ask for Help (v1)
- Topic: Why does this script sometimes does nothing?
- Replies: 10
- Views: 605
Re: Why does this script sometimes does nothing?
For that, you would use WinWait and WinWaitClose:
Code: Select all
Menu, Tray, Icon, Icons\shell32_184.ico
loop {
WinWait, ahk_class ApplicationFrameWindow ahk_exe ApplicationFrameHost.exe
WinMove,,, 2821, 153, 1476, 1044
WinWaitClose
}
- Yesterday, 09:22
- Forum: Ask for Help (v2)
- Topic: i got a problem by using PixelGetColor function, please help me
- Replies: 2
- Views: 146
Re: i got a problem by using PixelGetColor function, please help me
RGB is not a valid parameter for v2 because it already returns RGB format, unlike in v1. I don’t see that it’s necessarily an issue or causing what you’re seeing, though. You are getting the coordinates from the active window’s client position (default coord mode in v2) using coordinates taken from ...
- Yesterday, 02:45
- Forum: Ask for Help (v2)
- Topic: Manipulate PDF
- Replies: 13
- Views: 1022
Re: Manipulate PDF
The first one isn’t correct either unless you’re running it with v1. Do you see why?
- 17 May 2024, 21:55
- Forum: Ask for Help (v1)
- Topic: Why does this script sometimes does nothing?
- Replies: 10
- Views: 605
Re: Why does this script sometimes does nothing?
Note that I edited it above to remove the WinTitle parameters from the WinMove and WinWaitNotActive. They're not needed because they use the LastFoundWindow which was found in the WinWaitActive command.
- 17 May 2024, 21:50
- Forum: Ask for Help (v1)
- Topic: Why does this script sometimes does nothing?
- Replies: 10
- Views: 605
Re: Why does this script sometimes does nothing?
The hasMoved variable is only set to false when the window is not active. The window is not active all the time. But, on the times it is active, hasMoved stays as true after being moved. No, that is not correct. You used WinExist , not WinActive , so it will keep moving it as long as the window exi...
- 17 May 2024, 18:57
- Forum: Ask for Help (v1)
- Topic: Why does this script sometimes does nothing?
- Replies: 10
- Views: 605
Re: Why does this script sometimes does nothing?
But it doesn’t move it only once. It moves it every other time because the variable keeps flipping from true to false and vice versa every time through the loop. What about the logic you set up makes you think it only does it once?
- 17 May 2024, 18:30
- Forum: Ask for Help (v1)
- Topic: Why does this script sometimes does nothing?
- Replies: 10
- Views: 605
Re: Why does this script sometimes does nothing?
Maybe it's hanging because you're moving it so often -- every two seconds -- whether it needs to or not and it causes an issue in Windows. Not sure what you're trying to accomplish with hasMoved. It gets reset from false to true every other time (and the opposite the other times), having nothing to ...
- 17 May 2024, 18:17
- Forum: Ask for Help (v2)
- Topic: Touch screen detect
- Replies: 2
- Views: 150
Re: Touch screen detect
One way to tell is to keep monitoring the position of the mouse, and if the change from the last position is large, then it was most likely a tap.
- 17 May 2024, 08:11
- Forum: Off-topic Discussion
- Topic: Report False-Positives To Anti-Virus Companies
- Replies: 121
- Views: 996767
Re: Report False-Positives To Anti-Virus Companies
bshogeman -- Antivirus software flagging a false positive is not an AHK bug, so your topic in "Bug Reports" was moved to this thread. You may need to temporarily disable Defender to let it install, and you may need to identify a whitelisted directory to prevent your AHK installation folder from bei...
- 17 May 2024, 08:03
- Forum: Ask for Help (v2)
- Topic: COM change font of highlighted text
- Replies: 8
- Views: 398
Re: COM change font of highlighted text
But for some reason doing so with this code has no effect. Any ideas? There must be something more that Word is doing when selecting a different font from the dropdown than just applying a new font to the entire selection like happens via COM, so the only thing I can suggest is trying to automate t...
- 17 May 2024, 06:00
- Forum: Ask for Help (v2)
- Topic: COM change font of highlighted text
- Replies: 8
- Views: 398
Re: COM change font of highlighted text
It works for me as-is on selected text. By the way, you posted it as v1 code, but you posted in the v2 section of the forum. The main lines also work in v2 with the other syntax changed: #Requires AutoHotkey v2.0 ^F1:: { oWord := ComObjActive("Word.Application") oWord.Selection.Font.Name := "Arial" }
- 17 May 2024, 05:50
- Forum: Ask for Help (v1)
- Topic: Tooltip to remind myself for good posture
- Replies: 2
- Views: 269
Re: Tooltip to remind myself for good posture
@pivotphone — Please note that we have again moved a thread you started in the main part of the forum, which is now for AHK v2, to the v1 section. Please post in the designated v1 section with any new questions regarding v1 scripts.
- 17 May 2024, 03:37
- Forum: Pulovers Macro Creator
- Topic: Stop searching image
- Replies: 7
- Views: 231
Re: Stop searching image
I don’t know anything about PMC.
- 17 May 2024, 02:40
- Forum: Gaming
- Topic: Double tap key + hold
- Replies: 1
- Views: 90
Re: Double tap key + hold
Try this:
Code: Select all
#Requires AutoHotkey v2.0
~$w:: {
Send '{w down}'
KeyWait 'w'
Send '{w up}'
}