SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

The popular SciTE-based AutoHotkey Script Editor
kon
Posts: 1756
Joined: 29 Sep 2013, 17:11

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

03 Mar 2016, 18:36

1. I found this page (see "find.mark.indicator"). Putting find.mark.indicator=style:roundbox,colour:#0080FF,under,outlinealpha:140,fillalpha:80, as shown in the example, into my SciTEUser.properties file seems to have done the trick. The user properties file can be opened in SciTE from the menu: Options > Open User properties.

2. It will pass command line parameters to your script when you run (F5) it. You can run this AHK script to display parameter number one:

Code: Select all

one = %1%
MsgBox, % one
(Also see "Command Line Parameters" in the AHK docs.)
drako223344

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

05 Mar 2016, 06:20

Thank you kon! Very good to know on the parameters window! I knew it would probably be useful :-P

on the settings for the find: I tried to add this to the user properties file:

find.mark.indicator=style:compositionthick,colour:#0080FF,under:yes,outlinealpha:140,fillalpha:80

and I restart SciTe but nothing changes :-(

I tried also to put it like this:

find.mark.indicator=style:compositionthick,colour:#0080FF,under,outlinealpha:140,fillalpha:80

but I get the same result: nothing changes.
Any idea what am I doing wrong?
User avatar
haichen
Posts: 631
Joined: 09 Feb 2014, 08:24

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

05 Mar 2016, 07:13

highlight.current.word.indicator=style:compositionthick,colour:#0080FF,under
( I don't think you need outlinealpha:140,fillalpha:80 with underline )
If you set the caret in the word all occurrences are underlined. This works with words ... I don't know how to do it with a selection.

And your previous find.mark.indicator work if you use the "mark all" option in the search.
You don't need to restart. Just save the SciTEUser.properties.
Drako223344

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

05 Mar 2016, 14:52

I get it. Ya, it works fine with the option Mark All, no problems with that. I was looking for some ways to modify the way the Find function highlights the found text as its not so visible. Fine, I guess Ill have to live with that.
Thank you for everything!
lexikos
Posts: 9690
Joined: 30 Sep 2013, 04:07
Contact:

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

06 Mar 2016, 20:48

Doesn't the Find function just select the text? You'd have to change the overall text selection colours.
Drako223344

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

07 Mar 2016, 06:52

yes lexikos, that's correct. But I have no idea how to do that... :think:
User avatar
haichen
Posts: 631
Joined: 09 Feb 2014, 08:24

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

07 Mar 2016, 07:51

https://autohotkey.com/boards/viewtopic ... arkedwords
You can use the extension from my last! contribution and change

scite.SendEditor(SCI_INDICSETSTYLE, 0, INDIC_ROUNDBOX)
scite.SendEditor(SCI_INDICSETSTYLE, 0, INDIC_COMPOSITIONTHICK)
lexikos
Posts: 9690
Joined: 30 Sep 2013, 04:07
Contact:

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

07 Mar 2016, 19:15

@Drako223344: Simply change the appropriate properties...
http://www.scintilla.org/SciTEDoc.html
User avatar
derz00
Posts: 497
Joined: 02 Feb 2016, 17:54
Location: Middle of the round cube
Contact:

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

21 Mar 2016, 17:01

Hey fincs or whoever knows. I use SciTE4AutoHotkey all the time, but just recently when I started it, (I was opening a file over vpn, so took long) and there was an error message about line 225 in toolbar.ahk. Sure enough, the toolbar had not launched. So the furthest to the right button on top is the "replace" button. This has happened before, and I just unistalled the program, deleted the SciTE folder (it doesn't automatically) and reinstalled it. Problem fixed of course. But this is naturally a bit of a pain, so I don't know if you could fix the problem in an update or someone could tell me how to fix it easily.
Thanks for your help!

Edit: All it took was a computer restart, but I don't know if it will happen again.... :roll:
try it and see
...
User avatar
Joe Glines
Posts: 771
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

23 Mar 2016, 21:11

I had this idea which i fleshed-out the basics (so y'all could understand my request- I know my code is crap, but it was done quickly because I think some powerful RegEx will be needed to get it done "right")

Anyway, I'd love to be able to hit a hotkey and show what variables are defined in my script. Since we can easily connect to SciTE via COM, I figured getting the list is easy enough (again, more robust solution would be needed but the below works for this example).

Ideally I'd like to have it built into SciTE Intellisense type or Tilla goto. Does anyone else think it would be cool to hit a hotkey and have the variables defined in the working syntad file displayed for selecting?

Code: Select all

;************************************************************
oSciTE := ComObjActive("SciTE4AHK.Application") ;get pointer to active SciTE window
text:= oSciTE.Document ;get entire SciTE document
my=hello
My=World
;~ Joe:="hi there"
Pos:=1 ;set starting point

;*********Don't include lines that are commented out********************* 
Loop, parse, Text, `n, `r 
{
    Line:=A_Loopfield
if (SubStr(line,1,1) <>";")
   NewText.=A_loopfield "`r`n"
}

;***********now iterate over and find variables******************* 
loop, {
Posit:=RegExMatch(Newtext, "([\w]+)[:|.]?=.*?",Obj,Pos)
if not obj
    break ;if no more, break the loop
	
Vars.=obj1 "`r`n" ;store variables
Pos:=Posit+StrLen(obj)+1 ;increment counter so moves forward
}

sort, Vars, U ;remove duplicates
MsgBox % Vars
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
lexikos
Posts: 9690
Joined: 30 Sep 2013, 04:07
Contact:

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

23 Mar 2016, 21:41

derz00 wrote:Edit: All it took was a computer restart, but I don't know if it will happen again.... :roll:
I'd bet you can just close SciTE and terminate any remaining InternalAHK.exe process.

To avoid the problem, open SciTE before opening any files for editing across the network, and do not leave such files open when you close SciTE.

I think the problem may have already been fixed in the current version available on GitHub.
Joe Glines wrote:Anyway, I'd love to be able to hit a hotkey and show what variables are defined in my script.
For what purpose? My SciTE auto-complete script collects words from the current file for auto-complete and adds them to the words listed in the API file. It will include words that aren't variables (or aren't variables in the current scope) - it takes much more than just a complex regex to accurately detect variable references. Ctrl+Space activates the auto-complete list.

If you specifically want a list of global variables, ListVars and the debugger are the only reliable ways to get it. See dbgp_listvars.ahk - you can probably adapt it (perhaps after learning from dbgp_test.ahk) to query the list of variables without actually executing the script.
User avatar
Joe Glines
Posts: 771
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

24 Mar 2016, 05:58

Hi lexikos- thank you for your reply! The purpose would be so I can pick and choose from a list of variables in the script I'm working on (instead of trying to remember them and typing the wrong name or fat-fingering them and wasting time )

I have a decent idea how tricky it would be to get a complete list of variables but I'm okay with it getting 90% of them (and keeping the regex much simpler). Basically the list of variables could be seen as a helper but if one you expect isn't in it, you'd have to go look for it.

I really didn't want to be grabbing it from a running script because, to me, this functionality would be most helpful when you are in your early stages of the script's creation and the script possibly is not even in a stage that is executable.

I'll look at the SciTE auto-complete script you mentioned. Thank you, again, for your time and thoughts!
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Casper
Posts: 2
Joined: 09 Mar 2016, 12:37

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

09 Apr 2016, 16:05

Domain went kaput.
Website is now offline and SciTE4AutoHotkey cannot be downloaded.
User avatar
joedf
Posts: 9000
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

10 Apr 2016, 17:03

Casper wrote:Domain went kaput.
Website is now offline and SciTE4AutoHotkey cannot be downloaded.
Hmm, seems to work fine for me... try it with a proxy maybe?
Image Image Image Image Image
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]
kon
Posts: 1756
Joined: 29 Sep 2013, 17:11

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

10 Apr 2016, 17:31

It was down, now it's back up. (at least for me)
dipahk
Posts: 18
Joined: 15 Apr 2016, 16:01
Location: Germany

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

15 Apr 2016, 16:08

Since I upgrade my computer from Windows 7 to Windows 10 I cannot use the debug function in Scite4autohotkey anymore. When I click on the Debug button the tool tip "Waiting for Autohotkey to connect..." appears but if fails to connect. Running the script without debugging works perfectly but I cannot get debugging to work. Does anybody have any hint what may be wrong?

Thanks a lot for any help.
lexikos
Posts: 9690
Joined: 30 Sep 2013, 04:07
Contact:

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

15 Apr 2016, 22:37

@dipahk: The debug protocol uses TCP/IP, even locally. Try disabling your firewall software (e.g. Windows Firewall). If that works, you can re-enable it and configure it to allow SciTE\InternalAHK.exe to accept connections on port 9000.
dipahk
Posts: 18
Joined: 15 Apr 2016, 16:01
Location: Germany

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

16 Apr 2016, 07:30

Thanks, this was right tip. It was not the firewall but there was another newly installed service which listens on port 9000 and thus SciTE could not connect. I disabled the other services and now debugging works again.
wideeyedguy
Posts: 60
Joined: 11 Feb 2016, 11:49

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

19 Apr 2016, 10:37

When using ST4, at some point it seems to lose the connection with F1-Help. When I put the cursor on a command or such and press F1, nothing happens. I have to quit and reload ST4 to get it to reconnect(?) with the Help functionality.
Is there another way to get it to refresh the connection without restarting the program?

Thanks,
weg
I say this optimistically . . . One day I'll understand it.
But today is not that day!
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

19 Apr 2016, 11:15

wideeyedguy wrote:When using ST4, at some point it seems to lose the connection with F1-Help. When I put the cursor on a command or such and press F1, nothing happens. I have to quit and reload ST4 to get it to reconnect(?) with the Help functionality.
Is there another way to get it to refresh the connection without restarting the program?

Thanks,
weg
Happens to me quite often, too. I found that reloading the script using the icon in the systemtray seems to help.
There is always a script running when it happens, and the script was started from SciTE4AHK.

Return to “SciTE4AutoHotkey”

Who is online

Users browsing this forum: No registered users and 14 guests