Search found 36 matches
- 27 Mar 2018, 14:33
- Forum: Scripts and Functions (v1)
- Topic: ObjRegisterActive
- Replies: 57
- Views: 40634
Re: ObjRegisterActive
(Sorry for the previous post which I deleted as it had no useful information) It seems the code below causes memory leaks. I'm guessing ObjRegisterActive() or ComObjActive() is something to do with it. Main.ahk #SingleInstance, Force loop { testMemoryLeak() } Return ~Esc::ExitApp testMemoryLeak() { ...
- 01 Dec 2017, 05:15
- Forum: Wish List
- Topic: Pre-execution Code Topic is solved
- Replies: 28
- Views: 9084
Re: Pre-execution Code Topic is solved
What are you talking about? If the library files are included with the script using the local library, there is no reason to overwrite anything. Just extract the script to its own directory and run it. Perhaps you don't know what the local library is? I talked about the similarity between the libra...
- 30 Nov 2017, 21:43
- Forum: Wish List
- Topic: Pre-execution Code Topic is solved
- Replies: 28
- Views: 9084
Re: Pre-execution Code Topic is solved
Library files can be included with the script (using the "local library"), and do not require overwriting global configuration which affects all scripts A library script of a different(possibly old) version must be overwritten; otherwise, the script relying on it will misbehave. Here, it takes a co...
- 30 Nov 2017, 18:28
- Forum: Wish List
- Topic: Pre-execution Code Topic is solved
- Replies: 28
- Views: 9084
Re: Pre-execution Code Topic is solved
So? The relative time saved is still next to nothing. Not really. It includes the time to research the requirements. If the program allows users to add their own scripts as a plugin and if the plugin script requires some lines to be added on the top of the script, those users have to know about the...
- 29 Nov 2017, 21:06
- Forum: Wish List
- Topic: Pre-execution Code Topic is solved
- Replies: 28
- Views: 9084
Re: Pre-execution Code Topic is solved
and i thought that you didnt need to have the include line if the class file was in your library folder, but maybe i was wrong about that It seems you have misunderstood the behavior of #Include and the rest of what you wrote is based on your misunderstanding. My personal use case would be insertin...
- 29 Nov 2017, 18:04
- Forum: Wish List
- Topic: Pre-execution Code Topic is solved
- Replies: 28
- Views: 9084
Re: Pre-execution Code Topic is solved
All it saves is a single line at the top of the script. That line could be #include <something> or something() , where something() can perform auto-execute code or do nothing at all. (Either way it would cause the inclusion of something.ahk, which may contain directives or other things.) It saves h...
- 29 Nov 2017, 17:05
- Forum: Wish List
- Topic: Pre-execution Code Topic is solved
- Replies: 28
- Views: 9084
Re: Pre-execution Code Topic is solved
Hello. I don't see how it is related to the suggestion.A_AhkUser wrote:Consider this part of the documentation:
Libraries of Functions: Standard Library and User Library
- 29 Nov 2017, 16:27
- Forum: Wish List
- Topic: Pre-execution Code Topic is solved
- Replies: 28
- Views: 9084
Re: Pre-execution Code Topic is solved
why? Why? I'm surprised to see such a response. Needless to say, it will be incredibly useful. When you have hundreds of scripts you regularly use, this allows you to change necessary settings applied to all of them at once such as SetBatchLines, #NoEnv, #SingleInstance, SetTitleMatchMode, FileEnco...
- 29 Nov 2017, 14:44
- Forum: Wish List
- Topic: Pre-execution Code Topic is solved
- Replies: 28
- Views: 9084
Pre-execution Code Topic is solved
It would be useful to have the ability to pre-execute code prior to loading any scripts. Say, you have hundreds of scripts and want to apply `#Include <MyClass>` to all of them. Currently you have to insert the line in every single script. I'd like to see a more convenient way for it. Not only inclu...
- 29 Nov 2017, 11:01
- Forum: Ask for Help (v1)
- Topic: Gdip_BitmapFromHWND capture problem when reading from Emulator window
- Replies: 6
- Views: 3566
Re: Gdip_BitmapFromHWND capture problem when reading from Emulator window
Sounds like an OpenGL specific issue. If you search the web with keywords like "capture OpenGL window" or "OpenGL screenshot", you'll find relevant information and workarounds written in other languages. At the moment, I don't find a good solution with AutoHotkey.
- 28 Nov 2017, 17:43
- Forum: Wish List
- Topic: Names for Japanese special keys
- Replies: 7
- Views: 5945
Re: Names for Japanese special keys
I happened to have a Japanese keyboard, a type of 109 keyboard . Does one keycode switch to "Hankaku" mode and the other switch to "Zenkaku" mode? That's right. They share the same physical key and it toggles the mode. Zenkaku means full width and Hankaku means half width. When typing Japanese words...
- 24 Nov 2017, 10:30
- Forum: Scripts and Functions (v1)
- Topic: LoadFile - Load script file as a separate process
- Replies: 32
- Views: 29145
Re: LoadFile - Load script file as a separate process
You asked for the proper way... I asked for the proper way done programmatically . I asked in the hope that you have a good solution for it. Otherwise, this presents an unsolved problem so that somebody else may tackle. If unknown person terminates the parent process, unknown person can terminate t...
- 23 Nov 2017, 17:23
- Forum: Ask for Help (v1)
- Topic: base.method() and this.base.method() Confusion
- Replies: 9
- Views: 2226
Re: base.method() and this.base.method() Confusion
Thanks for breaking it down, Helgef. where this.base refers to the class BaseKeyword2 This is hard to understand...; `this.base` does not refer to the base object but the derived object for the first time. This seems to be the AutoHotkey way, however. I don't think I fully understand this behavior a...
- 23 Nov 2017, 10:56
- Forum: Ask for Help (v1)
- Topic: base.method() and this.base.method() Confusion
- Replies: 9
- Views: 2226
Re: base.method() and this.base.method() Confusion
Hi,
I don't find your reply answering why the code I posted shows the message box three times.
It seems the constructor of the extended class is called twice. The strange part is that if you comment out `base.__New( "a" )`, the message box shows only once.
I don't find your reply answering why the code I posted shows the message box three times.
It seems the constructor of the extended class is called twice. The strange part is that if you comment out `base.__New( "a" )`, the message box shows only once.
- 23 Nov 2017, 06:13
- Forum: Ask for Help (v1)
- Topic: base.method() and this.base.method() Confusion
- Replies: 9
- Views: 2226
base.method() and this.base.method() Confusion
Hi, Can somebody explain why the following code shows the message box three times? I expected twice. _o := new BaseKeyword2 ; shows the message box 3 times, not twice class BaseKeyword { __New( s ) { msgbox % s } } class BaseKeyword2 extends BaseKeyword { __New() { base.__New( "a" ) this.base.__New(...
- 23 Nov 2017, 06:04
- Forum: Ask for Help (v1)
- Topic: When do you use static class properties?
- Replies: 4
- Views: 2564
Re: When do you use static class properties?
I see. I find it not easy to use where you have to use the literal class name to modify the static property value because sometimes one changes class names and with the current implementation he/she has to rename all the occurrences in the code. This can lead to producing bugs if he/she misses one o...
- 22 Nov 2017, 22:12
- Forum: Ask for Help (v1)
- Topic: When do you use static class properties?
- Replies: 4
- Views: 2564
Re: When do you use static class properties?
Hi,
So when do you use static class variables? I still don't see how I can use them with the current implementation. In other words, in what cases are they useful?
So when do you use static class variables? I still don't see how I can use them with the current implementation. In other words, in what cases are they useful?
- 22 Nov 2017, 15:38
- Forum: Ask for Help (v1)
- Topic: autohotkey multi-threading
- Replies: 3
- Views: 10722
Re: autohotkey multi-threading
There is a very useful function, LoadFile(), by lexikos. It creates separate processes using pipe and allows the main script to communicate with child processes by sharing objects. It's worth trying.
- 22 Nov 2017, 15:07
- Forum: Ask for Help (v1)
- Topic: When do you use static class properties?
- Replies: 4
- Views: 2564
When do you use static class properties?
Hi, I'm trying to understand how static class properties work in AutoHotkey and see if I can use them in my scripts. I expected the first line in the message box in the following code shows the changed value. But it doesn't. _o1 := new StaticProperties _o1.sStaticVar := "changed" _o1.sVar := "change...
- 20 Nov 2017, 11:29
- Forum: Ask for Help (v1)
- Topic: RunWait timeout? Topic is solved
- Replies: 5
- Views: 3311
Re: RunWait timeout? Topic is solved
Another approach I found is to use `Process, WaitClose`. #SingleInstance, Force #Persistent new RunWait( 3 ).run( "notepad" ) msgbox done Return class RunWait { iTimeout := 10 __New( iTimeout=10 ) { this.iTimeout := iTimeout } run( sCommand ) { Run, % sCommand,, UseErrorLevel, _iPID _func := ObjBind...