Jump to content

SciTE v 3.20 Beta available


Jos
 Share

Recommended Posts

  • Developers

@Valik... seen this post or did it get lost in the other updates?

Looks like we need to change the warning and error messages to lowercase to make it work.

Just update the outputpane messages to lowercase and double click them again... they change then to the correct color.

Did a quick update of the au3check and that looks better. uploaded a copy to the SciTE beta directory (not updated the version yet)

Need to check for a better way to clear the errors because clearing all bookmarks is not a real good option.

.. and this reset does work for getting the Annotations cleared for this function:

SendSciTE_Command($My_Hwnd, $SciTE_hwnd, "extender:dostring scite.SendEditor(SCI_ANNOTATIONCLEARALL)")

This is much better that removing all BookMarks.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Just uploaded an updated SciTE3.02 beta that will chomp the error further up to the second ":" in stead of the first only.

This changes the Error Annotation from:

"DevelopmentAutoIt3programstesttest3.au3"(2,9) : warning: $var: possibly used before declaration.

to

warning: $var: possibly used before declaration.

This is how it looks now when a Error or Warning is DoubleClicked:

Also added the updated AutoIt3Wrapper to Clear the Errors before each run of au3check.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I just updated the files in the SciTE 3.02 folder but can't seem to replicate the new addition as above, I'm using Windows 7 x64.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

  • Moderators

Jos,

Nor I - Vista x32. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Developers

Have you added the lines shown earlier in the thread to your Sciteuser.properties?

error.inline=1
style.error.1=fore:#FF0000,back:#FFFF00
style.error.2=fore:FFFFFF,back:#FF0000

Edit: And copy the latest au3check.exe from the Beta directory as well.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Sorry Jos. Now it works.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

  • Moderators

Jos,

Me too - thanks. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

That in-line error message is very handy.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

  • Developers

Made another update to AutoIt3Wrapper which now will do an F4 in case Errors/Warnings are detected.

This will automatically show the annotations and jump to the first one.

Next F4 will go to the next error and Shift+F4 to the previous error.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I'm really digging the inline errors :) I found a bug though. I can no longer click in the gray area just to the right of the line numbers (where the mouse cursor changes to a mirrored version) to insert a bookmark. It just highlights the line now and moves the cursor to the next line. Maybe this is an option now? Ctrl-F2 still works to insert bookmarks though.

Link to comment
Share on other sites

Jos, I've finally got around to messing with inline errors and integrating the stuff into my AutoIt3Wrapper equivalent. Nice work so far. I have a suggestion for you to improve things slightly. Instead of clearing annotations before Au3Check is started I recommend the following logic after it's already run:

; Send the command for SciTE to display the inline errors.  The delay is to ensure SciTE processes the command.
Sleep(100)
If $nExitCode Then
    SendSciTE_Command($hParent, $hScite, "menucommand:306") ; IDM_NEXTMSG
Else
    SendSciTE_Command($hParent, $hScite, "extender:dostring scite.SendEditor(SCI_ANNOTATIONCLEARALL)")
EndIf

This gives a much more polished effect. It eliminates the flicker caused by the annotations being cleared and then re-added. It's also safe to do it this way since if the script is fixed then it will still clear the errors and if the script still has problems then the call to IDM_NEXTMSG which update the annotations including remove those that don't apply and adding any new ones. And, of course, for errors that haven't changed they stay the same with no flicker. All-in-all a small but very nice change from a presentation standpoint.

I just have one question. Now I just need to figure out how to get the IDM_NEXTMSG to stick. With output.scroll=1 the IDM_NEXTMSG happens before the last line of output (The exit code as returned by the wrapper script) so SciTE re-scrolls to the end. I think it would be better if it was left on the first error because that is also where the editor has jumped to. Not a big deal but the current behavior feels a bit wrong to me.

Link to comment
Share on other sites

I have a small suggestion if you permit me:

It would be nice if there was a feature that i learned to really appreciate in Programmer's Notepad:

- When you select a text in the editor, all other (visible) instances of that text are highlighted.

PS: I'm actually working on a Project Manager for Scite, you can follow my work here

Edited by matwachich
Link to comment
Share on other sites

I have a small suggestion if you permit me:

It would be nice if there was a feature that i learned to really appreciate in Programmer's Notepad:

- When you select a text in the editor, all other (visible) instances of that text are highlighted.

I wrote exactly what you want a while back... got no comments on it surprisingly. Hopefully it suits your purpose:

Edited by wraithdu
Link to comment
Share on other sites

I wrote exactly what you want a while back...

Sweet! Just one thing though. The highlight doesn't go away when I unselect. Did I modify my LUA startup correctly?
--------------------------------------------------------------------------------
-- SciTE startup script.
--------------------------------------------------------------------------------

-- A table listing all loaded files.
LoadLuaFileList = { }

--------------------------------------------------------------------------------
-- LoadLuaFile(file, directory)
--
-- Helper function for easily loading Lua files.
--
-- Parameters:
--    file - The name of a Lua file to load.
--    directory - If specified, file is looked for in that directory.  By default,
--         this directory is $(SciTEDefaultHome)Lua.
--------------------------------------------------------------------------------
function LoadLuaFile(file, directory)
    if directory == nil then
        directory = props["SciteDefaultHome"] .. "Lua"
    end
    table.insert(LoadLuaFileList, directory .. file)
    dofile(directory .. file)
end    -- LoadLuaFile()

-- Load all the Lua files.
LoadLuaFile("Class.lua")    -- Always load first.
LoadLuaFile("Common.lua")    -- Always load second.
LoadLuaFile("AutoItPixmap.lua")
LoadLuaFile("AutoHScroll.lua")
LoadLuaFile("AutoItAutoComplete.lua")
LoadLuaFile("LoadSession.lua")
LoadLuaFile("AutoItIndentFix.lua")
LoadLuaFile("EdgeMode.lua")
LoadLuaFile("SmartAutoCompleteHide.lua")
LoadLuaFile("Tools.lua")
LoadLuaFile("AutoItTools.lua")
LoadLuaFile("AutoItGotoDefinition.lua")

-- Start up the events (Calls OnStartup()).
EventClass:BeginEvents()

MyTools = EventClass:new(Common)

function MyTools:OnStartup()
    -- class property to hold active marker state so we only update when necessary
    self.bMarkersActive = false
    -- class property to indicate programatic marker clearing and avoid double UI update
    self.lastSelText = ""
    -- initialize missing props
    if props['highlight.sel.text'] ~= '0' and props['highlight.sel.text'] ~= '1' then
        props['highlight.sel.text'] = '1'
    end
    if props['highlight.whole.word'] ~= '0' and props['highlight.whole.word'] ~= '1' then
        props['highlight.whole.word'] = '1'
    end
    if props['highlight.min.length'] == '' then
        props['highlight.min.length'] = '2'
    end
end

function MyTools:OnUpdateUI()
    if props['highlight.sel.text'] == '1' then
        local selText = editor:GetSelText()
        -- check if selection has changed, update accordingly
        if selText == self.lastSelText then
            return false
        else
            self.lastSelText = selText
        end
        --print('update')
        local selStart = editor.SelectionStart
        local selEnd = editor.SelectionEnd
        -- check if selected text is an allowed word
        if selStart ~= selEnd and self:IsWord(selText) then
            -- check for word boundaries at ends of selection
            if props['highlight.whole.word'] == '0' or (not self:IsWord(string.char(editor.CharAt[selStart-1])) and not self:IsWord(string.char(editor.CharAt[selEnd]))) then
                self:markOccurrences(selText)
            else
                self:clearOccurrences()
            end
        else
            self:clearOccurrences()
        end
    end

    return false
end

function MyTools:IsWord(word)
    if props['highlight.whole.word'] == '1' then
        -- look for anything not allowed
        local find = string.find(word, '[^%a%d_$#@.]')
        if find == nil then
            return true
        else
            return false
        end
    else
        -- return true if selection length is >= highlight.min.length and no new lines
        local find = string.find(word, '[rn]')
        if find == nil and string.len(word) >= tonumber(props['highlight.min.length']) then
            return true
        else
            return false
        end
    end
end

function MyTools:clearOccurrences()
    if self.bMarkersActive then
        --print('clearing')
        scite.SendEditor(SCI_INDICATORCLEARRANGE, 0, editor.Length)
        self.bMarkersActive = false
    end
end

function MyTools:markOccurrences(selText)
    self:clearOccurrences()
    -- set flag markers are active
    self.bMarkersActive = true
    -- set indicator style
    local curIndic = 0
    scite.SendEditor(SCI_SETINDICATORCURRENT, curIndic)
    scite.SendEditor(SCI_INDICSETALPHA, curIndic, 255)
    scite.SendEditor(SCI_INDICSETUNDER, curIndic, true)
    scite.SendEditor(SCI_INDICSETSTYLE, curIndic, INDIC_ROUNDBOX)
    scite.SendEditor(SCI_INDICSETFORE, curIndic, 0xFFF55D)
    -- set search flags
    --local flags = SCFIND_WHOLEWORD
    local flags = 0
    -- find each occurrence of the word and set the indicator range
    local s,e = editor:findtext(selText, flags, 0)
    while s do
        scite.SendEditor(SCI_INDICATORFILLRANGE, s, e - s)
        s,e = editor:findtext(selText, flags, e+1)
    end
end
Link to comment
Share on other sites

  • Developers

Jos, I've finally got around to messing with inline errors and integrating the stuff into my AutoIt3Wrapper equivalent. Nice work so far. I have a suggestion for you to improve things slightly. Instead of clearing annotations before Au3Check is started I recommend the following logic after it's already run:

; Send the command for SciTE to display the inline errors.  The delay is to ensure SciTE processes the command.
Sleep(100)
If $nExitCode Then
    SendSciTE_Command($hParent, $hScite, "menucommand:306") ; IDM_NEXTMSG
Else
    SendSciTE_Command($hParent, $hScite, "extender:dostring scite.SendEditor(SCI_ANNOTATIONCLEARALL)")
EndIf

This gives a much more polished effect. It eliminates the flicker caused by the annotations being cleared and then re-added. It's also safe to do it this way since if the script is fixed then it will still clear the errors and if the script still has problems then the call to IDM_NEXTMSG which update the annotations including remove those that don't apply and adding any new ones. And, of course, for errors that haven't changed they stay the same with no flicker. All-in-all a small but very nice change from a presentation standpoint.

I just have one question. Now I just need to figure out how to get the IDM_NEXTMSG to stick. With output.scroll=1 the IDM_NEXTMSG happens before the last line of output (The exit code as returned by the wrapper script) so SciTE re-scrolls to the end. I think it would be better if it was left on the first error because that is also where the editor has jumped to. Not a big deal but the current behavior feels a bit wrong to me.

looks like a good suggestion and will have a play with it and IDM_NEXTMSG that next week.

I wrote exactly what you want a while back... got not comments on it surprisingly. Hopefully it suits your purpose:

looking at this thread again it seems i totally missed it. Will have a look also next week to incorporate when i like it. :)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Sweet! Just one thing though. The highlight doesn't go away when I unselect. Did I modify my LUA startup correctly?

Eek, no. I didn't specify how to do that exactly...

Create a new LUA file somewhere on your computer. I keep mine in a location outside the Scite install so it is not touched by the installer/uninstaller. Then add the line to load it into SciTEStartup.lua:

-- ....

LoadLuaFile("AutoItTools.lua")
LoadLuaFile("AutoItGotoDefinition.lua")
-- your file here
LoadLuaFile("MyTools.lua", "C:somepathtofile")

You can change the indicator style in the markOccurrences function.

Then add the control properties to your SciTEUser.properties file.

Edited by wraithdu
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...