Sometimes when I press F1 in Scite a chm-file hangs:
How to fix it?
SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
Focusing our efforts on non-productive and non-creative endeavours wastes lives as surely as war.
Jacque Fresco / The best that money can't buy
Jacque Fresco / The best that money can't buy
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
Scite somehow randomly crashes when I open the AutoHotkey helpfile deleting all unsaved progress (just lost 4 hours).
Recommends AHK Studio
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
This also happens to me, Win10 64bit... stopped using it for this reason.Haswell wrote:Sometimes when I press F1 in Scite a chm-file hangs:
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
Nice SciTE-tation
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
This happened to me for a few times too. I simply use the chm from AHK's installation.nnnik wrote:Scite somehow randomly crashes when I open the AutoHotkey helpfile deleting all unsaved progress (just lost 4 hours).
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
If help file hangs, don't try to close it!
Just switch back to SciTE4AutoHotkey via Alt-Tab or Taskbar, save your work if needed and close it. After restart you can continue exactly there where you left!
It's still the best editor 4 Ahk out there! Yes, for help use original AutoHotkey file, and hey, this is AutoHotkey, automate it with something like this:Edit: Update
Just switch back to SciTE4AutoHotkey via Alt-Tab or Taskbar, save your work if needed and close it. After restart you can continue exactly there where you left!
It's still the best editor 4 Ahk out there! Yes, for help use original AutoHotkey file, and hey, this is AutoHotkey, automate it with something like this:
Code: Select all
#IfWinActive, ahk_class SciTEWindow
F1::
Save_Clipboard := ClipboardAll
Send, {Right}{Left}
Clipboard := ""
Send, ^+{Right}{Right}^+{Left}
copyMarked:
Send, ^c
ClipWait, 0
SearchItem = %Clipboard%
if instr(SearchItem, ",") or instr(SearchItem, "(") or instr(SearchItem, ")") or instr(SearchItem, "`n")
or instr(SearchItem, ":") or instr(SearchItem, ".") or instr(SearchItem, "{") or instr(SearchItem, "}") {
Clipboard := ""
Send, {left}^+{left}
goto, copyMarked
}
Clipboard := Save_Clipboard, Save_Clipboard := ""
send, {Right}
IfWinNotExist, AutoHotkey Help ahk_class HH Parent
{ run, C:\Program Files\AutoHotkey\AutoHotkey.chm ; make sure the path to help file corresponds
WinWait, AutoHotkey Help ahk_class HH Parent,, 1
} WinActivate, AutoHotkey Help ahk_class HH Parent
WinWaitActive, AutoHotkey Help ahk_class HH Parent,, 1
SendMessage, 0x1330, 1,, SysTabControl321, AutoHotkey Help ahk_class HH Parent ;TCM_SETCURFOCUS = 0x1330
SendMessage, 0x0C,, &SearchItem, Edit1, AutoHotkey Help ahk_class HH Parent ;WM_SETTEXT = 0x0C
SendMessage, 0x100, 13,, Edit1, AutoHotkey Help ahk_class HH Parent ;WM_KEYDOWN = 0x100
SendMessage, 0xB1, 0, -1, Edit1, AutoHotkey Help ahk_class HH Parent
ControlFocus, Internet Explorer_Server1, AutoHotkey Help ahk_class HH Parent
sleep 100
send, {F6}
return
Last edited by rommmcek on 24 May 2016, 05:00, edited 2 times in total.
-
- Posts: 204
- Joined: 24 Jun 2015, 23:38
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
@rommmcek: Brilliant I would have never thought of that or had the patience to go code it since I know the workaround is to just break and start help, or restart SciTE and start help, but that little gem is nice. Now, if only I could use the "Find in Files" function the same way (Ctrl+Shift+f) Thanks for posting
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
@JJohnston2: Not brilliant, no gem!, but usable and works most of the time, besides see improvement!
Not sure if I get you right. Did you experienced crash while pressing Ctrl+Shift+f?Edit: Update
Not sure if I get you right. Did you experienced crash while pressing Ctrl+Shift+f?
Code: Select all
#IfWinActive, ahk_class SciTEWindow
$^+f:: ; $ prevents label to run itself
Send, {Right}{Left}
Clipboard := ""
Send, ^+{Right}{Right}^+{Left}
copyMarked_4:
Send, ^c
ClipWait, 0
SearchItem = %Clipboard%
if instr(SearchItem, ",") or instr(SearchItem, "(") or instr(SearchItem, ")") or instr(SearchItem, "`n")
or instr(SearchItem, ":") or instr(SearchItem, ".") or instr(SearchItem, "{") or instr(SearchItem, "}") {
Clipboard := ""
Send, {left}^+{left}
goto, copyMarked_4
}
send, {Right}
WinMenuSelectItem, ahk_class SciTEWindow,, 3&, 4&
WinWaitActive, Find in File
SendMessage, 0x0C,, &SearchItem, Edit1, Find in File ;WM_SETTEXT = 0x0C
Send, !f
Last edited by rommmcek on 24 May 2016, 04:08, edited 2 times in total.
-
- Posts: 204
- Joined: 24 Jun 2015, 23:38
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
I don't think SciTE is running multi-threaded, so when an AutoHotkey script is running it can't simultaneously launch the help file or other external applications--my guess anyway. The help file workaround works by launching the help file from another thread. For multi-file search, the dialog loads ("Find in Files") but trying to run a search says "Job is currently executing. Wait until it finishes.", as long as an AutoHotkey script is also executing.
Since your routine (last post) relies on the internal SciTE function to execute (instead of an external function), it is prone to the same error.
I'm wondering now that you posted this though if it would be possible to perform the search myself via a separate dialog box that triggers on the same shortcut key, and subsequently update the find results window, which I think can be done via COM Object (may even be in previous posts in this thread... Joe Glines had some great example code). Not sure if the search result window can be updated while another program is running or not. All the dialog box is doing though is running the external utility and updating the the search result window from stdout... should be easy to replicate.
Since your routine (last post) relies on the internal SciTE function to execute (instead of an external function), it is prone to the same error.
I'm wondering now that you posted this though if it would be possible to perform the search myself via a separate dialog box that triggers on the same shortcut key, and subsequently update the find results window, which I think can be done via COM Object (may even be in previous posts in this thread... Joe Glines had some great example code). Not sure if the search result window can be updated while another program is running or not. All the dialog box is doing though is running the external utility and updating the the search result window from stdout... should be easy to replicate.
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
O.k. try this one. It's quick adaptation of similar search. Run only fFind_Laucher.ahk (fFind_4.ahk must be in same folder).
Btw, first make settings at start of fFind_4.ahk file: Where to search, what type of file and goto title & Full path to the editor and name!
Note: Does not search in subfolders!
Btw, first make settings at start of fFind_4.ahk file: Where to search, what type of file and goto title & Full path to the editor and name!
Note: Does not search in subfolders!
- Attachments
-
- fFind_Launcher.ahk
- (884 Bytes) Downloaded 299 times
-
- Ffind_4.ahk
- (5.61 KiB) Downloaded 311 times
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
Hello,
some first questions:which can be used via COM.
Many thanks and greetings
hotkeyguy
some first questions:
- Is there a way to add hotkeys (the [Alt+_] combinations) to main menu items?
- Debug - can be startet with shortcut F7, but stopped*? Shouldn't the main menu item then change from Debug to Stop?
- Variable list - show with an shortcut? Old position and size should be restored. And an "auto show" option should be available. When enabled and debugging starts, the Variable list is shown automatically.
- CallStack - like Variable list.
Code: Select all
;~ oScite.Message(0x111,304) ;Stop
Many thanks and greetings
hotkeyguy
Toolbar problem
It seems that I can load the toolbar for autohotkey and no tolbar is showing at startup, im with windows 10 x64
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
@Drako223344: Just changed background color settings and default selection appeared to fade!
Did you manage to change Selection settings?
Did you manage to change Selection settings?
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
Love this editor. It really is quite nice to use. I was wondering if it is possible to add folding for sub-routines?
Something like folding from : to return, gosub or goto.
Something like folding from : to return, gosub or goto.
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
It's surely possible, but the folding is done by the lexer, which is written in C++.kinnex wrote:I was wondering if it is possible to add folding for sub-routines?
Perfect folding would be impossible, because subroutines do not have clearly-defined boundaries; or in other words, the boundaries are defined by run-time conditions. For example:
Code: Select all
mysub:
if (cond) {
action1()
return
} else {
action2()
exit
}
; any code here is not reachable
myothersub:
if (true)
return
; any code here is not reachable
Code: Select all
firstsub:
code for firstsub only
secondsub:
code for firstsub and secondsub
return
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
Yes - you can use the user.shortcuts property. I don't think they will show up in the menus, though.hotkeyguy wrote:Is there a way to add hotkeys (the [Alt+_] combinations) to main menu items?
You can't change the menu item text from Lua, but you can change the command. You just need to "hook" the functions that are called when the debugger connects or disconnects. Add this to your User Lua script (right click one of the AutoHotkey-related toolbar icons and click "Edit User Lua script"):Debug - can be startet with shortcut F7, but stopped*? Shouldn't the main menu item then change from Debug to Stop?
Code: Select all
local function afterCalling(funcName, callThis)
local origFunc = _G[funcName]
_G[funcName] = function()
origFunc()
callThis()
end
end
afterCalling("DBGp_Connect", function()
props["command.build.$(file.patterns.ahk)"] = "DBGp_Stop"
props["command.build.subsystem.$(file.patterns.ahk)"] = 3 -- Lua
end)
afterCalling("DBGp_Disconnect", function()
-- Setting to nil removes our override, allowing the property to
-- once again be controlled by configuration files (which can be
-- modified at any time, such as by the platform selector).
props["command.build.$(file.patterns.ahk)"] = nil
props["command.build.subsystem.$(file.patterns.ahk)"] = nil
end)
Anything you can do via the toolbar buttons can be done directly by some other script, because the toolbar is some other script (separate to the debugger). In this case, you can use PostMessage, 0x111, 1133, 0,, ahk_class SciTEWindow, which activates internal command #33 (defined in ahk.commands.properties). The toolbar itself uses similar code.Variable list - show with an shortcut?
If you want these features, you'll need to implement them yourself by editing SciTEDebug.ahk, or by using a separate hotkey to launch the debugger and open and reposition the variable list.Old position and size should be restored. And an "auto show" option should be available.
There is no need to use the COM object for this. Just send or post the WM_COMMAND message directly to SciTE as shown above.I'm aware thanks to Joe Glines Programmatically interact with the SciTE editor via COM objects that there is an corresponding WM_COMMAND for stopping the debugger
Last edited by lexikos on 03 Jul 2016, 05:38, edited 1 time in total.
Reason: Fixed a problem with the Lua script
Reason: Fixed a problem with the Lua script
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
I found a problem with the Lua script in my previous post, and fixed it. (Properties set by props[] always override the configuration files, even after they're reloaded, until you set them to nil.)
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
Hello Lexikos,
many thanks for your efforts and elaborately answering my questions.
Greetings
hotkeyguy
many thanks for your efforts and elaborately answering my questions.
Greetings
hotkeyguy
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
Feature request: open multiple instances and/or split screen freeze frame.
I often times have to look at multiple parts of my code and scrolling up and down or copy+pasting to notepad gets old.
I often times have to look at multiple parts of my code and scrolling up and down or copy+pasting to notepad gets old.
Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]
I agree. I wrote this tool as a partial solution, but one drawback is that if you edit the script in one pane, the other doesn't update also, so they can get out of sync.
That's one reason I have recently started using Sublime Text (and would have continued to use Notepad++ if it weren't lacking some typical AHK-friendly plug-ins/capabilities). I really like that you can have multiple panes and/or windows, and if you use them as different views of the same file, they are always in sync with whatever changes are made in the other views. If SciTE4AHK had this full capability, it would make a huge improvement in usability for me.
That's one reason I have recently started using Sublime Text (and would have continued to use Notepad++ if it weren't lacking some typical AHK-friendly plug-ins/capabilities). I really like that you can have multiple panes and/or windows, and if you use them as different views of the same file, they are always in sync with whatever changes are made in the other views. If SciTE4AHK had this full capability, it would make a huge improvement in usability for me.
Who is online
Users browsing this forum: No registered users and 11 guests