Search found 342 matches

by john_c
20 Jan 2020, 06:31
Forum: Wish List
Topic: Title match mode 2 or 3 as default
Replies: 3
Views: 236

Re: Title match mode 2 or 3 as default

Yes, I was sure that it will not be accepted, for this exact reason. I simply pointed it out.
by john_c
20 Jan 2020, 05:38
Forum: Wish List
Topic: Title match mode 2 or 3 as default
Replies: 3
Views: 236

Title match mode 2 or 3 as default

Currently, the default title match mode is 1. To be honest, it doesn't make sense. It should be either the most strict (i.e. 3) or the most free (i.e. 2).
by john_c
16 Jan 2020, 03:24
Forum: Ask For Help
Topic: Delay in seconds vs. Delay in milliseconds - Why? Topic is solved
Replies: 1
Views: 166

Delay in seconds vs. Delay in milliseconds - Why? Topic is solved

Does anybody know, for what reason we have to:

1. to specify delay in seconds in ClipWait

and

2. to specify delay in milliseconds in Sleep, SetKeyDelay, SetMouseDelay?
by john_c
06 Dec 2019, 15:04
Forum: Ask For Help
Topic: Multiple assignments as a single line Topic is solved
Replies: 2
Views: 572

Multiple assignments as a single line Topic is solved

I was sure that I can safely write multiple assignments as a single line: a := "foo", b := "bar" It was surprise that sometimes it doesn't work. Why? CopyToPseudoClipboard(ClipWaitTimeout) { ; Doesn't work ; OriginalClipboard := ClipboardAll, Clipboard := "" ; Works ; OriginalClipboard := ClipboardA...
by john_c
30 Nov 2019, 06:06
Forum: Ask For Help
Topic: A_AppData doesn't return what I expected
Replies: 10
Views: 1872

Re: A_AppData doesn't return what I expected

Yes, it is Windows-specific schizophrenia. In Windows: %AppData% --> C:\Users\YourName\AppData\Roaming %LocalAppData% --> C:\Users\YourName\AppData\Local ... And no built-in var to access "normal" AppData. Your possible options in AHK: Run, explore C:\Users\%A_UserName%\AppData Run, explore %A_AppDa...
by john_c
29 Nov 2019, 12:21
Forum: Ask For Help
Topic: To check if file is opened in browser and then activate the corresponding tab
Replies: 1
Views: 181

To check if file is opened in browser and then activate the corresponding tab

Is there a simple way to check whether the specified Markdown file is already opened in Chrome? (Or another browser) * In case the target file is not currently opened in Chrome - open it in Chrome. * In case the target file is already opened in Chrome - activate Chrome at the specified tab. Yes, I u...
by john_c
29 Nov 2019, 01:41
Forum: Suggestions on documentation improvements
Topic: Suggestions on documentation improvements
Replies: 688
Views: 183580

Re: Suggestions on documentation improvements

; https://www.autohotkey.com/docs/commands/For.htm For Key, Value in Expression ; https://www.autohotkey.com/docs/misc/Arrays.htm For Index, Element in Array It could be better to use Value (not Element ) for both pages. There is a separate thread: https://www.autohotkey.com/boards/viewtopic.php?f=...
by john_c
29 Nov 2019, 01:15
Forum: General Discussion
Topic: Array-related terminology: values vs. elements
Replies: 9
Views: 1800

Re: Array-related terminology: values vs. elements

@jeeswg Stack Overflow link is not the most interesting in this thread. There is Software Engineering link. My posts here are based on Christophe's answer.

Edit: I removed Stack Overflow link. It is now excessive.
by john_c
28 Nov 2019, 08:13
Forum: Ask For Help
Topic: Using ^c to copy and as shortcut Topic is solved
Replies: 2
Views: 348

Re: Using ^c to copy and as shortcut Topic is solved

Code: Select all

SendMode, Input

$^c::
  Send, ^c
  ; Add here another thing you want to do
  ; Add here another thing you want to do
Return
by john_c
28 Nov 2019, 03:44
Forum: General Discussion
Topic: Array-related terminology: values vs. elements
Replies: 9
Views: 1800

Re: Array-related terminology: values vs. elements

As I understand, AHK array elements are mutable: Array := {"a": "aaa", "b": "bbb", "c": "ccc"} MsgBox,,, % Array["b"] Array["b"] := "xxx" MsgBox,,, % Array["b"] Since the array elements are mutable, Array := {"a": "aaa", "b": "bbb", "c": "aaa"} ; Keys: a, b, c ; Values: aaa, bbb ; Elements: aaa, bbb...
by john_c
28 Nov 2019, 01:56
Forum: Suggestions on documentation improvements
Topic: Suggestions on documentation improvements
Replies: 688
Views: 183580

Re: Suggestions on documentation improvements

gregster, yes, you are correct. I downloaded the April version and tested it. There are no changes here.
by john_c
27 Nov 2019, 04:16
Forum: Suggestions on documentation improvements
Topic: Suggestions on documentation improvements
Replies: 688
Views: 183580

Re: Suggestions on documentation improvements

If I recall correctly, it was possible to use both [] and {} for both simple and associative arrays. ; Worked SimpleArr := ["Foo", "Bar", "Baz"] AssociativeArr := {"Aaa": "Foo", "Bbb": "Bar", "Ccc": "Baz"} ; Worked too. But I'm not sure. SimpleArr := {"Foo", "Bar", "Baz"} AssociativeArr := ["Aaa": "...
by john_c
27 Nov 2019, 01:48
Forum: Ask For Help
Topic: Alternative to global variable
Replies: 26
Views: 3341

Re: Alternative to global variable

not necessarily correct, it just depends on your goal. it requires you to know what you're doing. if you are using ByRef for performance to save copying a large string, then its up to you to be sure to safely write your function so that you don't modify the incoming ByRef parameter Thanks. It seems...
by john_c
26 Nov 2019, 14:23
Forum: Ask For Help
Topic: Block Alt and Win keys, but preserve the related shortcuts Topic is solved
Replies: 9
Views: 526

Re: Block Alt and Win keys, but preserve the related shortcuts Topic is solved

Thanks a lot. Win+Ctrl+C and Alt+Ctrl+C aren't currently affected by this fix, though. I tried to fix it myself, doesn't work. Action(side, modifier) { if ( ( GetKeyState("LWin", "P") || GetKeyState("RWin", "P") ) && GetKeyState("Alt", "P") ) Return ; Trying to fix Win+Ctrl+C case if ( ( GetKeyState...
by john_c
26 Nov 2019, 11:10
Forum: Ask For Help
Topic: Block Alt and Win keys, but preserve the related shortcuts Topic is solved
Replies: 9
Views: 526

Re: Block Alt and Win keys, but preserve the related shortcuts Topic is solved

Well, I tested it slightly and it seems the code is not 100% bulletproof. The behavior is slightly different from what is expected. Of course, I don't say that the code is bad, I only point out the currently existing drawbacks. Action(side, modifier) { if (A_ThisHotkey = "d" && modifier = "Win") { ;...
by john_c
26 Nov 2019, 08:34
Forum: Ask For Help
Topic: Block Alt and Win keys, but preserve the related shortcuts Topic is solved
Replies: 9
Views: 526

Re: Block Alt and Win keys, but preserve the related shortcuts Topic is solved

@teadrinker Thank you, it is awesome. It could be useful for a really large amount of people.

I see you have #If as the last line. Does it serve some purpose?
by john_c
26 Nov 2019, 07:53
Forum: Ask For Help
Topic: Alternative to global variable
Replies: 26
Views: 3341

Re: Alternative to global variable

and just to preempt the inevitable "performance!!"(which u dont seem to be overly concerned with anyway) - return ByRef I never used ByRef before. It seems that ByRef is used when we pass the parameters, e.g. Func(ByRef Var) { Var .= "Bar" } Var := "Foo" MsgBox, % Var ; Foo Func(Var) MsgBox, % Var ...
by john_c
26 Nov 2019, 04:08
Forum: Ask For Help
Topic: Block Alt and Win keys, but preserve the related shortcuts Topic is solved
Replies: 9
Views: 526

Re: Block Alt and Win keys, but preserve the related shortcuts Topic is solved

teadrinker Thanks a lot, though I'm not sure how to use it. For example, ; I slightly changed the Action function Action(modifier) { sendinput % modifier . "d" } ; And now I call it Action("#") ; Works as Win+D It works. But in real life I need this effect when I press Win+D itself: #d:: Action("#"...
by john_c
26 Nov 2019, 03:42
Forum: Ask For Help
Topic: MsgBox Topic is solved
Replies: 5
Views: 393

Re: MsgBox Topic is solved

MsgBox is automatically pausing the current thread.

You could try to create two custom GUIs instead of using MsgBox. It may work.
by john_c
26 Nov 2019, 03:36
Forum: Ask For Help
Topic: Select Most Recent File in a Folder Topic is solved
Replies: 7
Views: 445

Re: Select Most Recent File in a Folder Topic is solved

3ggg There are at least two problems: * A typo. You have A_WinDR (it seems you mean A_WinDir) * You can't use A_WinDir (or any another built-in variable) as an output variable. And by the way, the name like WinDir is just misleading here, to my opinion. I changed it to Foo. ^o:: Foo := A_Desktop . ...

Go to advanced search