Search found 493 matches
- 19 Jul 2022, 18:52
- Forum: Ask for Help (v2)
- Topic: Reliable way to mark arbitrary window as always-on-top
- Replies: 5
- Views: 1156
Reliable way to mark arbitrary window as always-on-top
I have a simple function to keep window on top. The problem is that I want to easily distinguish between always-on-top and normal windows when I look on the screen. I tried to add a prefix "[Pinned]", but this doesn't work well for Notepad3 (it seems the program silently update its title each time y...
- 19 Jul 2022, 18:40
- Forum: Ask for Help (v2)
- Topic: Do we need to free memory by using var:="" if variable is local to function? Topic is solved
- Replies: 2
- Views: 669
- 19 Jul 2022, 07:44
- Forum: Ask for Help (v2)
- Topic: [Solved] What I need to use instead of "if (ErrorLevel = 0)"?
- Replies: 6
- Views: 2721
Re: What I need to use instead of "if (ErrorLevel = 0)"?
Thanks you all, guys!
- 19 Jul 2022, 06:48
- Forum: Ask for Help (v2)
- Topic: Do we need to free memory by using var:="" if variable is local to function? Topic is solved
- Replies: 2
- Views: 669
Do we need to free memory by using var:="" if variable is local to function? Topic is solved
Do we need to free the memory by using var := "" if the variable is local to a function? An example of what I'm talking about: CopyToPseudoClipboard(ClipWaitTimeout := "") { ClipSaved := ClipboardAll() A_Clipboard := "" ; Required for ClipWait Send("^c") if (ClipWait(ClipWaitTimeout)) { PseudoClipbo...
- 17 Jul 2022, 05:06
- Forum: Ask for Help (v2)
- Topic: [Solved] What I need to use instead of "if (ErrorLevel = 0)"?
- Replies: 6
- Views: 2721
[Solved] What I need to use instead of "if (ErrorLevel = 0)"?
In AHK 1.1, there was if (ErrorLevel = 0) { ... } It seems v2 doesn't have ErrorLevel, so how I should change the snippet above? The real code: ; For ahk v1.1. Need to make it work for ahk v2 CopyToPseudoClipboard(ClipWaitTimeout := "") { OriginalClipboard := ClipboardAll Clipboard := "" Send ^c Cli...
- 24 Jun 2022, 05:23
- Forum: Bug Reports
- Topic: [v2.beta.3] !':: Send("'") error Topic is solved
- Replies: 11
- Views: 2446
Re: [v2.beta.3] !':: Send("'") error Topic is solved
The only reason this can occur for !':: or +':: in v2 but not v1 is that v1 does not allow single quotes for quoted strings. lexikos, I think the reason I was so surprised that !':: Send("'") doesn't work is because the new send is a function and not a command, and so its quotation mark is clearly ...
- 23 Jun 2022, 13:36
- Forum: Bug Reports
- Topic: [v2.beta.3] !':: Send("'") error Topic is solved
- Replies: 11
- Views: 2446
Re: [v2.beta.3] !':: Send("'") error Topic is solved
Hello, Helgef. Sorry for a late reply. Thanks for your research. This is bad. I hoped that AHK2 will be free of weird inconsistencies, because it was declared as one of its primary goals, but it seems despite some inconsistencies are now gone, other ones are introduced. Having a more relaxed line-co...
- 08 Apr 2022, 07:06
- Forum: AutoHotkey Development
- Topic: Still no installation package and no window inspector
- Replies: 2
- Views: 1015
Still no installation package and no window inspector
I know AutoHotkey is a free, community-driven software, so please, don't get me wrong. But what is v2 development state? There was 2.5 months between beta 1 and beta 2, and just a week between beta 2 and beta 3. Now it is April, and there are already 5 months since beta 3 is out. I love improvements...
- 01 Feb 2022, 19:52
- Forum: Bug Reports
- Topic: [v2.beta.3] !':: Send("'") error Topic is solved
- Replies: 11
- Views: 2446
Re: [v2.beta.3] !':: Send("'") error Topic is solved
A note for myself: the cleanest workaround is to add a dollar sign. $!':: Send("'")
- 10 Jan 2022, 17:13
- Forum: Bug Reports
- Topic: [v2.beta.3] !':: Send("'") error Topic is solved
- Replies: 11
- Views: 2446
Re: [v2.beta.3] !':: Send("'") error Topic is solved
A workaround that works for me is
Code: Select all
!':: Send(Chr(39))
- 10 Jan 2022, 00:58
- Forum: Bug Reports
- Topic: [v2.beta.3] !':: Send("'") error Topic is solved
- Replies: 11
- Views: 2446
[v2.beta.3] !':: Send("'") error Topic is solved
Not really sure whether a bug or not:
gives me an error message.
If I remove A_IconTip line, it seems to work fine.
Code: Select all
#SingleInstance Force
A_IconTip := "foo"
!':: Send("'")
If I remove A_IconTip line, it seems to work fine.
- 03 Oct 2021, 05:28
- Forum: Ask for Help (v1)
- Topic: Detect if plus sign (+) and equal sign (=) are located on the same keyboard key
- Replies: 1
- Views: 341
Detect if plus sign (+) and equal sign (=) are located on the same keyboard key
This can be a silly question with poor wording, but is there a way to detect if the plus sign and equal sign are located on the same key? * * * On US keyboards, they are located on the same key. But as far as I know, it is not always the case: for example, on Italian keyboards, they are on different...
- 29 Aug 2021, 06:21
- Forum: AutoHotkey Development
- Topic: Do we expect breaking changes?
- Replies: 3
- Views: 2442
Do we expect breaking changes?
This is great that version 2 is finally Beta. Thank you so much. :happybday: Just a single question. Does it mean that now we can use AHK v.2 without concerning that at some point of its further development something will work differently and therefore will break some scripts? As far as I remember, ...
- 28 Feb 2021, 09:02
- Forum: AutoHotkey Development
- Topic: About traditional assignments
- Replies: 6
- Views: 1518
Re: About traditional assignments
Well, I'm fine with this. However, just a quick idea, "we" (I'm not an AHK dev) can introduce literal assignments instead, so there will be no need to escape quotation marks or any other characters where it doesn't make sense. And on the other hand, it won't be possible to include a variable referen...
- 25 Feb 2021, 04:35
- Forum: Scripts and Functions (v1)
- Topic: JS and CSS minifier
- Replies: 0
- Views: 456
JS and CSS minifier
JS and CSS minifier. 1. Removes // and /**/ comments 2. Optionally, converts a file to a one-liner Usage example: minifier(["minifier-tests.js"], false, "min") Tested (see the tests below), but if you need a bulletproof reliable solution, you should use something different, probably https://github.c...
- 24 Feb 2021, 11:07
- Forum: AutoHotkey Development
- Topic: About traditional assignments
- Replies: 6
- Views: 1518
About traditional assignments
As far as I know, traditional assignments won't work in AHK2. My thread is just a small friendly remark that in some cases these assignments are very useful. Here is a regex to remove C-style comments. regex = (["'][^"']?\/\*.*?\*\/[^"']*["'])|\/\*(?:.|\R)*?\*\/ There are quotation marks there, and ...
- 22 Feb 2021, 09:00
- Forum: Ask for Help (v1)
- Topic: Is a comma after the #Include directive correct?
- Replies: 5
- Views: 498
Re: Is a comma after the #Include directive correct?
Thanks, this is a good example. This is a different topic, but I think it would be much better to have Microsoft Language Server support for AutoHotkey instead of maintaining regex-based highlighting schemes for every particular editor. Easier so maintain, more reliable, provides more options (for e...
- 22 Feb 2021, 07:10
- Forum: Ask for Help (v1)
- Topic: Is a comma after the #Include directive correct?
- Replies: 5
- Views: 498
Re: Is a comma after the #Include directive correct?
Since commas for statements are often optional, and only necessary in certain cases with multiple parameters (if optional parameter in the front get left out), #include is probably exempt from using a comma as it always has only one parameter - and thus there can be no ambiguities. A comma would se...
- 22 Feb 2021, 05:35
- Forum: Ask for Help (v1)
- Topic: Is a comma after the #Include directive correct?
- Replies: 5
- Views: 498
Is a comma after the #Include directive correct?
If you look into the AutoHotkey.tmLanguage file of the AutHotkey package for Sublime Text, you will see that regular expressions to match #Include and #IncludeAgain directives are different from the regular expressions to match other directives. (https://github.com/ahkscript/SublimeAutoHotkey/blob/m...
- 16 Oct 2020, 05:43
- Forum: Ask for Help (v1)
- Topic: The reason to use "Return (%Var%)" Topic is solved
- Replies: 4
- Views: 867
Re: The reason to use "Return (%Var%)" Topic is solved
To compare the example by Gregster with cases with no return:
Code: Select all
Var := "Foo"
Foo := "Bar"
msgbox % %Var% ; => "Bar"
msgbox % (%Var%) ; => "Bar"
Code: Select all
Var := "Foo"
Foo := "Bar"
; Abc := %Var%
; Abc := (%Var%)
msgbox % Abc ; => "Bar"