Search found 117 matches

by FredOoo
27 Sep 2020, 23:48
Forum: AutoHotkey v2 Help
Topic: Getting a function reference to a method in a class you are writing
Replies: 4
Views: 124

Re: Getting a function reference to a method in a class you are writing

MyGuiObj := MyGUIClass.New() class MyGUIClass { __new() { this.MyGui := Gui.New() this.MyEdit := this.MyGui.Add("Edit") this.MyEdit.OnEvent('Change', 'mycallback') this.MyGui.Show() } } mycallback(GuiCtrlObj, Info){ SoundBeep }   ObjBindMethod builds a reference to mycallback in this. MyGuiObj := M...
by FredOoo
23 Sep 2020, 10:23
Forum: Ask For Help
Topic: How to use SetWinEventHook ?
Replies: 2
Views: 697

Re: How to use SetWinEventHook ?

Better late than never. And you're right. I just added this two lines in events list : , 0x4002 : "EVENT_CONSOLE_UPDATE_REGION" , 0x40FF : "EVENT_CONSOLE_END" } and two lines in WinProcCallback  : if (event==16386) ; EVENT_CONSOLE_UPDATE_REGION return But now, I'm using this console : (Which hides t...
by FredOoo
23 Sep 2020, 08:41
Forum: AutoHotkey v2 Help
Topic: This thing that all AHK deloppers do at least once in their life.
Replies: 2
Views: 127

Re: This thing that all AHK deloppers do at least once in their life.

Thank you for responding to this topic. I felt a bit lonely. I think I explained things very badly, as if it was obvious. My goal here is to receive the WM_INPUTLANGCHANGE event. On the task bar I click on FR and I select EN. (But probably not everyone sets up multiple languages.) - When the GUI has...
by FredOoo
15 Sep 2020, 14:50
Forum: AutoHotkey v2 Scripts and Functions
Topic: Braille Bytes ⠢⡦⢆⢎⠞⠞⢖⠄⠢⣎⡖⢖⣦
Replies: 4
Views: 246

Re: Braille Bytes ⠢⡦⢆⢎⠞⠞⢖⠄⠢⣎⡖⢖⣦

It will come but maybe not so soon. There are still several issues to be resolved. BBytes are cute and fun but maybe not that useful… I do this to learn AHK. Hope people will help when I'll say « Feedback is welcome ! » https://scontent-cdt1-1.xx.fbcdn.net/v/t1.0-9/119679791_119038026605179_68930846...
by FredOoo
14 Sep 2020, 19:34
Forum: AutoHotkey v2 Help
Topic: This thing that all AHK deloppers do at least once in their life.
Replies: 2
Views: 127

This thing that all AHK deloppers do at least once in their life.

It works fine but becomes silent as soon as I add a control. Why ? ;#! AHK v2.a122 64 Unicode ; UTF-16_LE_BOM #SingleInstance force Win := CWin.new() class CWin extends Gui { __new(){ super.__New('+Resize', "Win", this) this.OnEvent('Close', "Win_Close") ;this.Add('Edit') ; ★ ;this.Add('Button',, "O...
by FredOoo
12 Sep 2020, 06:09
Forum: AutoHotkey v2 Help
Topic: Destroy a Gui.ctrl Topic is solved
Replies: 3
Views: 233

Indestructible Gui.ctrl Topic is solved

Thanks for telling me that.
Now I know it, my code reuses the list of indestructible controls.
(I will post the code on this forum soon)
by FredOoo
08 Sep 2020, 15:35
Forum: AutoHotkey v2 Help
Topic: Destroy a Gui.ctrl Topic is solved
Replies: 3
Views: 233

Re: Destroy a Gui.ctrl Topic is solved

If I add a : this.tab[a_Index].ctrl := '' in the loop, and then loop again on Gui's ctrl, to check : for i,v in Win   print type(v) I can see they are still there. I guess because they are still referenced in the Gui. If I name and index those ctrl to access them by Gui['name_index'] I can't use a G...
by FredOoo
08 Sep 2020, 10:28
Forum: AutoHotkey v2 Help
Topic: Destroy a Gui.ctrl Topic is solved
Replies: 3
Views: 233

Destroy a Gui.ctrl Topic is solved

I do read the doc but can't find it. In a Gui I have some static controls, and a list of Text controls I can .Add and .Move on Gui.Size. Sometime I need to clear this list to build a new one. How can I .Destroy the old Text controls ? (I can't just .Visible them off and .Add new, which is really not...
by FredOoo
08 Sep 2020, 08:12
Forum: AutoHotkey v2 Help
Topic: in WM_KEYDOWN event, unknown hwnd Topic is solved
Replies: 4
Views: 176

Re: in WM_KEYDOWN event, unknown hwnd Topic is solved

Thanks lexikos . It's much more simple now. MyGui := Gui.New() WB := MyGui.Add("ActiveX", "w980 h640", "Shell.Explorer").Value ; The last parameter is the name of the ActiveX component. WB.Silent := true ; Don't box on html doc errors. (but on devMode, check if any) WB.Navigate("https://www.autohotk...
by FredOoo
07 Sep 2020, 13:42
Forum: AutoHotkey v2 Help
Topic: in WM_KEYDOWN event, unknown hwnd Topic is solved
Replies: 4
Views: 176

Re: in WM_KEYDOWN event, unknown hwnd Topic is solved

I have found a way to do it but I am afraid it is not the best. If anyone who has more experience with Gui has any comments, they are welcome. WM_KEYDOWN( wParam, lParam, msg, hwnd ){ if wParam!=116 ; F5 key return ok := false CurrentCtrl := GuiCtrlFromHwnd(hwnd) if CurrentCtrl && CurrentCtrl.gui.hw...
by FredOoo
07 Sep 2020, 12:13
Forum: AutoHotkey v2 Help
Topic: in WM_KEYDOWN event, unknown hwnd Topic is solved
Replies: 4
Views: 176

Re: in WM_KEYDOWN event, unknown hwnd Topic is solved

WM_KEYDOWN( wParam, lParam, msg, hwnd ){ print print "WM_KEYDOWN: " wParam " " hwnd CurrentCtrl := GuiCtrlFromHwnd(hwnd) if CurrentCtrl { ; Before I click on the Gui.ActiveX, we pass here print "WM_KEYDOWN from: " type(CurrentCtrl) " name: " CurrentCtrl.name ; -> from Gui.ActiveX name:WB } else { ;...
by FredOoo
07 Sep 2020, 09:21
Forum: AutoHotkey v2 Help
Topic: in WM_KEYDOWN event, unknown hwnd Topic is solved
Replies: 4
Views: 176

in WM_KEYDOWN event, unknown hwnd Topic is solved

In a WM_KEYDOWN event, setted with OnMessage, I get the parameter hwnd.
But it is not Gui.hwnd, neither GuiCtrlFromHwnd(hwnd)
It comes form an ActiveX Shell.Explorer (so from a sub-control in a way)

How could I know which Gui that hwnd comes from ?
by FredOoo
06 Sep 2020, 06:09
Forum: AutoHotkey v2 Help
Topic: overriding inherited property with value Topic is solved
Replies: 2
Views: 160

Re: overriding inherited property with value Topic is solved

class top { someprop => 'somecalc' } class special1 extends top { __new(val) { this._someprop := val } someprop => this._someprop test() => super.someprop ; if top.someprop is still there } print "== s1 ==" s1 := special1.new(10) print s1.someprop ; 10 print s1.test() ; someprop class special2 exte...
by FredOoo
04 Sep 2020, 07:46
Forum: AutoHotkey v2 Help
Topic: OnMessage unregister Topic is solved
Replies: 2
Views: 53

Re: OnMessage unregister Topic is solved

Thanks swagfag, that works.
by FredOoo
04 Sep 2020, 07:07
Forum: AutoHotkey v2 Help
Topic: OnMessage unregister Topic is solved
Replies: 2
Views: 53

OnMessage unregister Topic is solved

OnMessage 0x201, 'click' ; registered OnMessage 0x201, 'aNoneRegisteredName', 0 ; error OnMessage 0x201, 'click', 0 ; unregistered OnMessage 0x201, objBindMethod(this,'onClick') ; registered OnMessage 0x201, objBindMethod(this,'onClick'), 0 ; no error but not unregistered   Is there a way to unregi...
by FredOoo
01 Sep 2020, 09:33
Forum: AutoHotkey v2 Help
Topic: How to escape exclamation mark in a hotkey expression ?
Replies: 7
Views: 2574

Re: How to escape exclamation mark in a hotkey expression ?

I changed my keyboard and now it works.
by FredOoo
01 Sep 2020, 09:30
Forum: AutoHotkey v2 Help
Topic: Do you believe empty string is false ?
Replies: 4
Views: 168

Re: Do you believe empty string is false ?

I don't know anymore what is a type. We should never compare different things of different types. A new language is a new school. And different schools teache differents things. Now in JS, you can even divide by zero without error, and you get infinity ... So… "" is just a little « falsy » in if con...
by FredOoo
30 Aug 2020, 16:45
Forum: AutoHotkey v2 Scripts and Functions
Topic: Braille Bytes ⠢⡦⢆⢎⠞⠞⢖⠄⠢⣎⡖⢖⣦
Replies: 4
Views: 246

Braille Bytes ⠢⡦⢆⢎⠞⠞⢖⠄⠢⣎⡖⢖⣦

It's about visualizing bytes, not about blind language. BBytes( 255 ) -> ∫⣿∫ BBytes( ord("A") ) -> ∫⢂∫ BBytes( ord("本") ) -> ∫⢶⠜∫ BBytes( ord("軔") ) -> ∫⠠⣏⡻∫   ;#! AHK v2.a122 64 Unicode ; UTF-16_LE_BOM /* ∫⣿∫ Braille Bytes (Big-endian) ---------------------------------------------------------------...

Go to advanced search