Search found 5723 matches

by lexikos
18 May 2018, 20:50
Forum: Ask For Help
Topic: [AHK_L v2] Localized K, V in for loop?
Replies: 7
Views: 142

Re: [AHK_L v2] Localized K, V in for loop?

Variables are either global or local to a function. The for-loop is not a function definition, therefore its variables must exist outside of the loop. they didnt exist before the loop started. They exist even if they aren't in scope yet. If they are local variables, they are in scope as soon as the ...
by lexikos
18 May 2018, 20:27
Forum: Ask For Help
Topic: startup script not working
Replies: 6
Views: 130

Re: startup script not working

Managing the startup folder is a real pain in the neck because it is so complicated and difficult to find your startup folder. You've already shown otherwise. It could hardly be easier than running shell:startup . It is trivial to manage the startup folder from script: use the variable A_Startup or...
by lexikos
18 May 2018, 17:05
Forum: Ask For Help
Topic: Language Code stacks in Windows Metro Apps Topic is solved
Replies: 2
Views: 57

Re: Language Code stacks in Windows Metro Apps Topic is solved

If this was a bug, it would be a bug in Windows. AutoHotkey doesn't have any function to return the locale ID of another window. You are clearly calling an external function, for which AutoHotkey is in no way responsible. That function doesn't return the local ID of a window either. The problem with...
by lexikos
18 May 2018, 17:00
Forum: AutoHotkey v2 Development
Topic: Directives and expression syntax
Replies: 4
Views: 161

Re: Directives and expression syntax

just me wrote:It's just that "enclose variables in percent signs" is a double-ref in all other cases in v 2.

%var%() isn't a double-deref.
by lexikos
18 May 2018, 03:38
Forum: Ask For Help
Topic: Script not running on WIndows NT - Compatability issue?
Replies: 3
Views: 77

Re: Script not running on WIndows NT - Compatability issue?

I use Visual C++ 2010 to compile AutoHotkey 32-bit. Visual C++ 2010 does not support NT4. I have a "dirty hack" in place to allow it to run on Windows 2000, but I have never had an NT4 system or VM to test on (or any interest in supporting that OS). AutoHotkey Basic (i.e. v1.0.48.05 and ea...
by lexikos
18 May 2018, 03:28
Forum: AutoHotkey v2 Development
Topic: Directives and expression syntax
Replies: 4
Views: 161

Directives and expression syntax

I don't understand why directives do not use expression syntax. Maybe it has been discussed somewhere. That would require something like: ⋅ parsing and evaluation of expressions before the script starts executing, perhaps even before the script's structure is actually valid; ⋅ p...
by lexikos
17 May 2018, 04:22
Forum: Bug Reports
Topic: __Delete & Unhandled Exception
Replies: 4
Views: 177

Re: __Delete & Unhandled Exception

It's already fixed in the test build via commit bfe39d27.
by lexikos
16 May 2018, 03:00
Forum: Ask For Help
Topic: Keyboard Hook Confusion Topic is solved
Replies: 3
Views: 96

Re: Keyboard Hook Confusion Topic is solved

It depends on what "most hotkeys" are. The original author assumed that "most hotkeys" are the conventional ones which the "reg" method supports (which include a great many key combinations). That may or may not be the case for average use today. No one has accurate sta...
by lexikos
15 May 2018, 03:29
Forum: Ask For Help
Topic: Keyboard Hook Confusion Topic is solved
Replies: 3
Views: 96

Re: Keyboard Hook Confusion Topic is solved

Functions? I suppose you mean "hotkeys". Hotstrings, Input and AlwaysOn/Off have no bearing on whether a hotkey requires the keyboard hook. They are just other things that require the keyboard hook. All remappings require the hook. A remapping is not a hotkey. A remapping is two hotkeys (k...
by lexikos
15 May 2018, 02:25
Forum: Bug Reports
Topic: Sleep command executes before other code.
Replies: 2
Views: 90

Re: Sleep command executes before other code.

What you describe is not possible.

Perhaps the commands are executing in the correct order, and you are simply not seeing the results immediately.
by lexikos
14 May 2018, 17:20
Forum: Ask For Help
Topic: Hotstring() function with label or function vs Ending character
Replies: 7
Views: 100

Re: Hotstring() function with label or function vs Ending character

What would you expect the option to do? What if the hotstring doesn't call Send at all, or calls Send multiple times? If you don't want to erase the hotstring abbreviation and end character, use B0. If you want just the end character to remain, or you want it to appear after text you send, send the ...
by lexikos
12 May 2018, 20:38
Forum: Bug Reports
Topic: Every Send command sends a lot of Capslock commands also
Replies: 11
Views: 461

Re: Every Send command sends a lot of Capslock commands also

The latest test build improves Send {Text} to avoid toggling CapsLock if "{Text}" is at the beginning of the parameter. So Send {Text}ab will not toggle CapsLock off/on, but Send a{Text}b will, since the effect of "a" is dependent on the state of CapsLock. As far as I can determi...
by lexikos
12 May 2018, 20:28
Forum: Announcements
Topic: Test build - Obj.Count(), OnError(), long paths, experimental switch-case
Replies: 17
Views: 1075

Re: Test build - Obj.Count(), OnError(), long paths, experimental switch-case

I have uploaded a new test build with the following additional improvements: ⋅ Removed the following limits for custom combination hotkeys: 1) max 50 unique prefix keys handled by VK for each suffix key, 2) max 16 unique prefix keys handled by SC for each suffix key. ⋅ Improved S...
by lexikos
12 May 2018, 18:58
Forum: Ask For Help
Topic: How can I send text to notepad++ specific tab in background?
Replies: 1
Views: 101

Re: How can I send text to notepad++ specific tab in background?

You can't send to a tab which isn't the active tab. Notepad++ only has one text control (excluding split view), and it is associated with the active tab.

Notepad++ does not have an Edit control. Use Window Spy to find the appropriate ClassNN; Scintilla1 in this case.
by lexikos
12 May 2018, 18:52
Forum: Ask For Help
Topic: An AHK source code question
Replies: 1
Views: 88

Re: An AHK source code question

The obvious place to start looking, for any program, would be the program's entry point . That's typically main() , WinMain() for Win32 applications, or wWinMain() for Unicode Win32 applications. In this case, it's _tWinMain () in AutoHotkey.cpp (_tWinMain is a macro)...
by lexikos
12 May 2018, 18:44
Forum: Ask For Help
Topic: Why am I getting unsupported method call in associative array? Topic is solved
Replies: 5
Views: 119

Re: Why am I getting unsupported method call in associative array? Topic is solved

A fourth (and IMO more obvious) solution is to replace the round brackets (parentheses) with square ones. Why are you mixing square brackets with round ones? foo.bar(x) := y is equivalent to foo.bar[x] := y as an aide to users porting code from VBScript or VBA, which use parentheses. Even th...
by lexikos
12 May 2018, 18:26
Forum: Ask For Help
Topic: Installing Error
Replies: 3
Views: 68

Re: Installing Error

FAQ: What can I do if AutoHotkey won't install?

The error does not come from 7-zip. It comes from the installer executable, which is a self-extracting 7-zip archive.
by lexikos
12 May 2018, 18:17
Forum: Ask For Help
Topic: Hotstring() function with label or function vs Ending character
Replies: 7
Views: 100

Re: Hotstring() function with label or function vs Ending character

It is not the use of Send which causes this. If you don't send anything, you still won't get the ending character. It is the difference between auto-replace hotstrings and other hotstrings. Auto-replace hotstrings send the replacement text and end character . Non-auto-replace hotstrings only perform...
by lexikos
12 May 2018, 18:13
Forum: Ask For Help
Topic: Made a script that functions on paper but not in practice
Replies: 1
Views: 53

Re: Made a script that functions on paper but not in practice

I would suggest replacing SendMode Input with SetKeyDelay 50, 50 and tweaking the two numbers. See also Why do Hotstrings, Send, and Click have no effect in certain games? Your final line, Random, RanWait,70,503 , will never execute. It needs to be placed before the first hotkey (i.e. in the auto-ex...

Go to advanced search