Search found 4822 matches
- 02 Aug 2014, 08:22
- Forum: Ask for Help (v2)
- Topic: can you call a class method with OnMessage ?
- Replies: 15
- Views: 7630
can you call a class method with OnMessage ?
Is there a way to encapsulate all of this within the class, or is the external function the only way to route these messages to the OnScroll() method in MyClass? OnMessage(0x115, "OnScroll") ; WM_VSCROLL OnMessage(0x114, "OnScroll") ; WM_HSCROLL scrollhandler := new MyClass() OnScroll(wParam, lParam...
- 02 Aug 2014, 07:37
- Forum: AutoHotkey Development
- Topic: Proposed New GUI API for AutoHotkey v2
- Replies: 249
- Views: 115615
Re: Proposed New GUI API for AutoHotkey v2
Update: It does not seem to like it when you declare Critical I did not need it in my code anyway, so I removed it. When I debug with critical in the code and it hangs, it seems to leave processes (but no tray icon) - I had to reboot to fix it all as just killing the processes didn't seem to fix it....
- 02 Aug 2014, 07:22
- Forum: AutoHotkey Development
- Topic: Proposed New GUI API for AutoHotkey v2
- Replies: 249
- Views: 115615
Re: Proposed New GUI API for AutoHotkey v2
Yeah, looks to be working but it is unstable.
If I put a breakpoint in the OnSize method, it seems to stop at the breakpoint OK, but as soon as I hit F5 to continue, the script stops responding.
If I put a breakpoint in the OnSize method, it seems to stop at the breakpoint OK, but as soon as I hit F5 to continue, the script stops responding.
- 02 Aug 2014, 07:01
- Forum: AutoHotkey Development
- Topic: Proposed New GUI API for AutoHotkey v2
- Replies: 249
- Views: 115615
Re: Proposed New GUI API for AutoHotkey v2
No, sorry. Currently there's no standardised AHK v2 file extension and .ahk is used. It is very easy to tell S4AHK whether to use v1.1 or v2 binaries; use the platform selection menu http://fincs.ahk4.net/scite4ahk/pages/icon/ahkswitch.ico . Ah I see, so I could have ahk associated with v1, but whe...
- 02 Aug 2014, 06:55
- Forum: AutoHotkey Development
- Topic: Proposed New GUI API for AutoHotkey v2
- Replies: 249
- Views: 115615
Re: Proposed New GUI API for AutoHotkey v2
See SciTE4AutoHotkey AHK v2 Support . To enable this feature, %AutoHotkeyDir%\v2-alpha\x86\AutoHotkey.exe (or x64) must exist [...] and .ahk files will now be detected as AutoHotkey v2 files But that would then mean I have to choose AHK2 OR AHK1, to be associated with .ahk Would it be possible to d...
- 01 Aug 2014, 16:48
- Forum: AutoHotkey Development
- Topic: Proposed New GUI API for AutoHotkey v2
- Replies: 249
- Views: 115615
Re: Proposed New GUI API for AutoHotkey v2
Oh, and I forgot to say - Thank you Fincs SO MUCH for doing this!
- 01 Aug 2014, 16:40
- Forum: AutoHotkey Development
- Topic: Proposed New GUI API for AutoHotkey v2
- Replies: 249
- Views: 115615
Re: Proposed New GUI API for AutoHotkey v2
I further extended Lex's code to provide a scrolling child window that contains further child windows (guis inside a scrolling gui inside a gui). Some thoughts from writing this code: Would it be possible to implement an OnMove() event for GUIs? If you add a gui as a child gui using +parent<hwnd>, m...
- 01 Aug 2014, 12:16
- Forum: AutoHotkey Development
- Topic: Proposed New GUI API for AutoHotkey v2
- Replies: 249
- Views: 115615
Re: Proposed New GUI API for AutoHotkey v2
Lexikos' Scrollable window proof of concept ported to this new gui system: Seems like A_GuiWidth and A_GuiHeight no longer work. Maybe more A_vars too #SingleInstance force OnMessage(0x115, "OnScroll") ; WM_VSCROLL OnMessage(0x114, "OnScroll") ; WM_HSCROLL gui := GuiCreate("Test","+Resize +0x300000"...
- 01 Aug 2014, 09:45
- Forum: AutoHotkey Development
- Topic: Proposed New GUI API for AutoHotkey v2
- Replies: 249
- Views: 115615
Re: Proposed New GUI API for AutoHotkey v2
Failing to pass a width or height when doing gui.Show() seems to result in no gui appearing and no error.
gui := GuiCreate("Progress Example",,) seems valid, but gui := GuiCreate("Progress Example",,"") does not (No gui appears).
gui := GuiCreate("Progress Example",,) seems valid, but gui := GuiCreate("Progress Example",,"") does not (No gui appears).
- 01 Aug 2014, 07:51
- Forum: AutoHotkey Development
- Topic: Proposed New GUI API for AutoHotkey v2
- Replies: 249
- Views: 115615
Re: Proposed New GUI API for AutoHotkey v2
In the progress bar example, MyText := gui.AddText(, "wp") throws an error - Invalid control type. Label seems to have been added and Text appears to have been removed . Intentional? Also the picture does not appear - I just get text of the filename. Looking at script_gui.cpp, there seems to be a co...
- 29 Jul 2014, 13:30
- Forum: AutoHotkey Development
- Topic: Proposed New GUI API for AutoHotkey v2
- Replies: 249
- Views: 115615
Re: Proposed New GUI API for AutoHotkey v2
Ah, I had missed the example code, yes that becomes clear now. However, I still much prefer AFC's way of doing things, this to me just seems like a step in the opposite direction. gui := GuiCreate("Image Viewer", "Resize", "MyGui_") gui.AddButton("&Load New Image", "Default") [...] MyGui_ButtonLoadN...
- 29 Jul 2014, 11:08
- Forum: AutoHotkey Development
- Topic: [V2] Trying to make a class-based modular UI
- Replies: 3
- Views: 2709
Re: [V2] Trying to make a class-based modular UI
OK, so I made quite a bit of progress here - although I took a slightly different route than expected. I went back to AHK v1 and extended Fincs' AFC to allow a scrollable sub-panel within the main window that can hold any number of child windows, tiling vertically. Here is a video of it in action: h...
- 29 Jul 2014, 10:30
- Forum: AutoHotkey Development
- Topic: Proposed New GUI API for AutoHotkey v2
- Replies: 249
- Views: 115615
Re: Proposed New GUI API for AutoHotkey v2
On ctrl.Move(pos) and ctrl.MoveDraw(pos) : What is Pos? An array [ 11, 22, 23, 45], an assosiated array [ x: 11, y: 22, w: 23, h: 45], a string "x11 y23 w23 h45" or are all possible? Couldn't these two functions be combined to ctrl.Move(pos, Draw := False) with 'Draw' being normaly 'false' for most...
- 16 Jul 2014, 12:11
- Forum: Ask for Help (v1)
- Topic: how to detect web connection is lost?
- Replies: 23
- Views: 14831
Re: how to detect web connection is lost?
Thanks for posting Bentschi's code.
Works great for me, I used to have script errors if the URL to fetch the string from was unreachable.
This new code fails gracefully
Works great for me, I used to have script errors if the URL to fetch the string from was unreachable.
This new code fails gracefully
- 16 Jul 2014, 11:55
- Forum: Ask for Help (v1)
- Topic: Determine if connecte to internet
- Replies: 8
- Views: 2889
Re: Determine if connecte to internet
Removed, solution found.
- 16 Jul 2014, 11:51
- Forum: Ask for Help (v1)
- Topic: SendInput working everywhere except one app
- Replies: 6
- Views: 2172
Re: SendInput working everywhere except one app
Three factors that can affect this:
1) Script may need to run as admin in order to send to some apps.
2) The amount of time each key is held (time between key down and key up) can also affect this.
Try SetKeyDelay, 0, 50
3) The "sendmode" can also affect this.
1) Script may need to run as admin in order to send to some apps.
2) The amount of time each key is held (time between key down and key up) can also affect this.
Try SetKeyDelay, 0, 50
3) The "sendmode" can also affect this.
- 04 Jul 2014, 09:08
- Forum: Ask for Help (v1)
- Topic: Numlock Active when script is active
- Replies: 11
- Views: 3514
Re: Numlock Active when script is active
Two things to try: Try using a different key from space to trigger the macro. If you use space to trigger the macro, and the macro also hits space, this can cause problems. Try adding a Sleep 50 after the Send {Blind}{Space}. if there is no delay between releasing the space bar and it pressing it ag...
- 03 Jul 2014, 10:30
- Forum: Ask for Help (v1)
- Topic: Numlock Active when script is active
- Replies: 11
- Views: 3514
Re: Numlock Active when script is active
Try this: SetKeyDelay, 0, 50 macro_on := 0 Home:: if (macro_on){ SetScrollLockState, Off macro_on := 0 } else { SetScrollLockState, On macro_on := 1 } Return End:: ExitApp Return *~$Space:: if (macro_on){ Loop { SpaceState := GetKeyState("Space", "P") If (SpaceState){ Send, {Blind}{Space} } else { b...
- 02 Jul 2014, 18:29
- Forum: Ask for Help (v1)
- Topic: Dynamic, Resizable GUI using fincs' AFC. Any help?
- Replies: 1
- Views: 1082
Re: Dynamic, Resizable GUI using fincs' AFC. Any help?
OK, I think I finally got there. I needed to use a ScreenToClient() DLL call and subtract what that returned from the window position, in order to obtain the (relative) coordinates that a control is positioned at. Now, when you add a sub-gui, the position of the main GUI on the screen is irrelevant....
- 02 Jul 2014, 11:12
- Forum: Ask for Help (v1)
- Topic: Numlock Active when script is active
- Replies: 11
- Views: 3514
Re: Numlock Active when script is active
d'oh, I forgot a Return adter the home:: binding. macro_on := 0 Home:: if (macro_on){ SetScrollLockState, Off macro_on := 0 } else { SetScrollLockState, On macro_on := 1 } Return End:: ExitApp Return *~$Space:: if (macro_on){ Sleep 5 Loop { SpaceState := GetKeyState("Space", "P") If (SpaceState){ br...