hcI

[Sloved] Red syntax in scite

10 posts in this topic

#1 ·  Posted (edited)

Hello !

I have question about the scite and maybe hidden functions ?

In the editor when you write a function, the text is black, but, when I wrote "SelfDelete" the text appeared to be red, but it's not a function.. why ?

Edited by hcI
Problem solved

Share this post


Link to post
Share on other sites



#2 ·  Posted

Hi.

Everything in quotation marks (including them) is appearing in red. These are strings.

Conrad


SciTE = 3.6.2.0/full   AutoIt = 3.3.14.2   AutoItX64 = 0   OS = Win7Pro SP1   OSArch = X64   Language = 0407/german
H:\...\AutoIt3\SciTE   H:\...\AutoIt3   H:\...\AutoIt3\Include   H: = Network Drive

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

Share this post


Link to post
Share on other sites

#3 ·  Posted

And why is this not a string and still appears in red ?

O.bmp

Share this post


Link to post
Share on other sites

#4 ·  Posted

This is because it is an abbreviation. Type in small letters selfdelete and then press the spacebar or Ctrl+B.

This will expand the abbreviation to:

Func _SelfDelete($iDelay = 0)
    Local $sCmdFile
    FileDelete(@TempDir & "scratch.bat")
    $sCmdFile = 'ping -n ' & $iDelay & '127.0.0.1 > nul' & @CRLF _
            & ':loop' & @CRLF _
            & 'del "' & @ScriptFullPath & '" > nul' & @CRLF _
            & 'if exist "' & @ScriptFullPath & '" goto loop' & @CRLF _
            & 'del ' & @TempDir & 'scratch.bat'
    FileWrite(@TempDir & "scratch.bat", $sCmdFile)
    Run(@TempDir & "scratch.bat", @TempDir, @SW_HIDE)
EndFunc

Conrad

P.S. There are a lot af abbreviations. Try ww and spacebar and so on.


SciTE = 3.6.2.0/full   AutoIt = 3.3.14.2   AutoItX64 = 0   OS = Win7Pro SP1   OSArch = X64   Language = 0407/german
H:\...\AutoIt3\SciTE   H:\...\AutoIt3   H:\...\AutoIt3\Include   H: = Network Drive

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

Share this post


Link to post
Share on other sites

#5 ·  Posted

I understand now but _SelfDelete don't seems to be in the help file, do you know why ? Do you know some others ?

Share this post


Link to post
Share on other sites

#6 ·  Posted

Look inside SciTE: Options - open au3abbrev.properties.

Syntax is like:

cr1=& @CRLF |

What means typing 'cr1' and spacebar changes to '& @CRLF '. The '|' at the end means after changing the abbreviation the cursor should go to here. If you look inside there are a lot of abbreviations. There is also the possibility to build your own (but it's not that easy as typing in your syntax into au3abbrev.properties). If you want to build your own then I could give you explanation to that (but I had to look how to to myself - because I wrote an autoit script doing it for me).

Conrad


SciTE = 3.6.2.0/full   AutoIt = 3.3.14.2   AutoItX64 = 0   OS = Win7Pro SP1   OSArch = X64   Language = 0407/german
H:\...\AutoIt3\SciTE   H:\...\AutoIt3   H:\...\AutoIt3\Include   H: = Network Drive

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

Share this post


Link to post
Share on other sites

#7 ·  Posted

Simpel,

Quote

but it's not that easy as typing in your syntax into au3abbrev.properties

Which is why we added the SciTE Abbreviation Manager to SciTEConfig - look under the <Other Tools> tab.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

#8 ·  Posted

Wow I see thanks for the help !

@Melba23

Where is the <other Tools> tab ? I can't find it :sweating:

 

hcI

Share this post


Link to post
Share on other sites

#9 ·  Posted

hcl,

Firstly, you need to have the full SciTE4AutoIt3 package installed - then you need to have an .au3 file loaded - then you open SciTEConfig from the <Tools> menu - and finally select the "Other Tools" tab at the top of the SciTEConfig GUI.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

#10 ·  Posted

Thanks man :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now