/*
comments
*/
function() {
}
SciTE4ahk custom intellisense generator follow-up
Re: SciTE4ahk custom intellisense generator follow-up
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
Re: SciTE4ahk custom intellisense generator follow-up
Thanks. I tried with both formats (your is 1 and mine is 2) and only labels get indexed in user.ahk.api, no function.
; comments on 1
Test1Function() {
}
Test2Function()
; comments on 2
{
}
; comments on 1
Test1Function() {
}
Test2Function()
; comments on 2
{
}
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Re: SciTE4ahk custom intellisense generator follow-up
I can't think why you're having this issue. Could you please try run the function on a .ahk file that only has a few test functions and see if it can index them?JnLlnd wrote:Thanks. I tried with both formats (your is 1 and mine is 2) and only labels get indexed in user.ahk.api, no function.
; comments on 1
Test1Function() {
}
Test2Function()
; comments on 2
{
}
Re: SciTE4ahk custom intellisense generator follow-up
It works now with the following simple file including both labels and functions. Not sure what I was doing wrong before. But it still fail to index functions in my larger "real-life" script (15 K lines).XeroByte wrote:I can't think why you're having this issue. Could you please try run the function on a .ahk file that only has a few test functions and see if it can index them?
The test script:
Code: Select all
#NoEnv
#SingleInstance force
BuildUserAhkApi(A_ScriptFullPath,1)
return
Test1Label:
return
; comments on 1
Test1Function() {
}
Test2Function()
; comments on 2
{
}
Test2Label:
return
Code: Select all
Test1Function ()\n; comments on 1\n; Location: C:\\Dropbox\\AutoHotkey\\SciTE-Intellisense\\TestBuildUserAhkApi.ahk
Test2Function ()\n; comments on 2\n; Location: C:\\Dropbox\\AutoHotkey\\SciTE-Intellisense\\TestBuildUserAhkApi.ahk
Test1Label \n; Location: C:\\Dropbox\\AutoHotkey\\SciTE-Intellisense\\TestBuildUserAhkApi.ahk
Test2Label \n; Location: C:\\Dropbox\\AutoHotkey\\SciTE-Intellisense\\TestBuildUserAhkApi.ahk
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Re: SciTE4ahk custom intellisense generator follow-up
If it's a RegEx issue (which it sounds like it may be) then I'm not sure that debugging code will help. I guess you probably don't want to send me your real-life script with all its 15K lines - but if you did I could look into it.JnLlnd wrote:I will insert debugging code in your script and try to see if I can find what is happening.
Alternatively - if you just sent me (or posted here) your script from the first line until the end of the first function that appears in your script then that may be enough to work with.
Re: SciTE4ahk custom intellisense generator follow-up
@XeroByte: If you offer to debug using my script, here is the source file: https://raw.githubusercontent.com/JnLln ... sPopup.ahk
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Re: SciTE4ahk custom intellisense generator follow-up
The main problem I found is that in your file the lines all end in just the LF character rather than CR + LF. This interferes with the 'beginning' and 'end' of lines detection by the RegEx.JnLlnd wrote:@XeroByte: If you offer to debug using my script, here is the source file: https://raw.githubusercontent.com/JnLln ... sPopup.ahk
As soon as I converted the file to Windows CR LF (using notepad++ Edit > EOL Conversion > Windows Format) then this issue disappears. It may be possible to account for this in the RegEx, but I probably won't because I don't believe that it is normal for AHK code to be written without the windows CR LF end of lines.
The other issue I can see is (something I should probably fix) - labels are being identified - but they're not actually supposed to be labels since they are inside /* */ comment blocks.
Let me know how you go with this, and if you're OK with converting your AHK to the Windows CRLF end of line.
- Joe Glines
- Posts: 771
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: SciTE4ahk custom intellisense generator follow-up
@JnLlnd: I was looking at changing the default line break in SciTE. Perhaps you've changed the default but below is how you can control it in your User.Properties file.
# Setting default End of Line: LF for Unix, CR for Mac prior to OS X CRLF for Dos/Windows
eol.mode=CRLF
# Setting default End of Line: LF for Unix, CR for Mac prior to OS X CRLF for Dos/Windows
eol.mode=CRLF
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Re: SciTE4ahk custom intellisense generator follow-up
Hi,
Thanks for looking at the file on GitHub.
It seems that somewhere in the transfers from my system to GitHub from GitHub to yours, the EOL were transformed because on my system the file is saved with CR/LF. See screen capture:
Could you try with my original file zipped here?
http://www.jeanlalonde.ca/temp/QuickAcc ... Source.zip
> The other issue I can see is (something I should probably fix) - labels are being identified - but they're not actually supposed to be labels since they are inside /* */ comment blocks.
Yes, I saw that the "Version: x.x..." were indexed as labels even if they are inside a comment block. If the regex could fix it, it would be great.
@Joe: Thanks for the tip. I check my user.properties file and there is no specific config for EOL.
Thanks for looking at the file on GitHub.
It seems that somewhere in the transfers from my system to GitHub from GitHub to yours, the EOL were transformed because on my system the file is saved with CR/LF. See screen capture:
Could you try with my original file zipped here?
http://www.jeanlalonde.ca/temp/QuickAcc ... Source.zip
> The other issue I can see is (something I should probably fix) - labels are being identified - but they're not actually supposed to be labels since they are inside /* */ comment blocks.
Yes, I saw that the "Version: x.x..." were indexed as labels even if they are inside a comment block. If the regex could fix it, it would be great.
@Joe: Thanks for the tip. I check my user.properties file and there is no specific config for EOL.
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Re: SciTE4ahk custom intellisense generator follow-up
Hey Jean,JnLlnd wrote:Could you try with my original file zipped here?
http://www.jeanlalonde.ca/temp/QuickAcc ... Source.zip.
My apologies - looks like I jumped to the wrong conclusion there. I got a bit excited when I saw just the LF, so i didn't investigate any further. I've inspected it a bit closer now and realised that it was exactly as you said - no functions were appearing in the api file, only labels.
A little digging showed the RegEx is producing a -21 error which I have never seen before. Apparently this means "Recursion too deep"... I need to dig a little deeper into this but the AHK docs say to modify the pattern to be more restrictive. I'll put a bit of work into that and see if i can get it working on your file.
For the moment I believe this error will only trigger on large files like yours.
Re: SciTE4ahk custom intellisense generator follow-up
I hope you can find a solution to this "Recursion too deep" issue. Thanks for your time, XeroByte.
Jean
Jean
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Re: SciTE4ahk custom intellisense generator follow-up
Hi All, Sorry it's been so long.
I've attempted to tackle this issue a few times now but couldn't come up a reasonable solution. I think this will take a near complete rewrite (probably involving splitting up the different coding styles and dealing with them individually).
I've attempted to tackle this issue a few times now but couldn't come up a reasonable solution. I think this will take a near complete rewrite (probably involving splitting up the different coding styles and dealing with them individually).
Re: SciTE4ahk custom intellisense generator follow-up
No problem, XeroByte. These things happen... Do as you can and let us know :-)
Thanks,
Jean
Thanks,
Jean
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey