xiantez

SciTE Config - Syntax Color Question

9 posts in this topic

Hey Community,

I was changing around my color scheme manually for syntax highlighting. I really enjoy using a dark background color. However, this seems to be problematic because my blinking cursor is also very dark. Is there a setting in the ScITE config where I can manipulate the blinking cursor to be a different color like "white" so it is easy to spot when coding. The closest thing I found was "Caret Line Color", but this just changes the line highlight.  Your help is greatly appreciated!!

ScITE config.png

Share this post


Link to post
Share on other sites



not sure how to do what you asked, but if it helps, at the very bottom bar of the SciTE window frame it shows the position (line and column) of the cursor.

ex. li=31 co=74


if @error Then
	MsgBox(262192,"",@ComputerName&" slaps "&@UserName&" around a bit with a large trout!")
	EndIf

>Exit code: 0

REAL search results

"Yeah yeah yeah, patience. How long will that take?"  -Ed Gruberman

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

 


Although I would recommend ISN AutoIt Studio. Here's my config that will give you a nice pretty dark style. Right underneath my post is the workaround to change the caret color.

Edited by InunoTaishou

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

1 hour ago, InunoTaishou said:

Hey InunoTaishou,

Thanks for the advice.... I have never used the ISN AutoIt Studio, what are some of the key benefits of this application? Also, I grabbed your code for the theme.... I am not sure where I need to apply it though....

 

 

scripteditor_font=Consolas
scripteditor_size=10
scripteditor_bgcolour=0x1F1F1F
scripteditor_rowcolour=0x585858
scripteditor_marccolour=0xFFFFFF
scripteditor_highlightcolour=0x3C9BFF
treefont_font=Segoe UI
treefont_size=9
treefont_colour=0x000000
default_font=Segoe UI
default_font_size=9
AU3_DEFAULT_STYLE1=0xC8C8C8|0x1F1F1F|0|0|0
AU3_DEFAULT_STYLE2=0xC8C8C8|0x1F1F1F|0|0|0
AU3_COMMENT_STYLE1=0x23BC4C|0x1F1F1F|0|1|0
AU3_COMMENT_STYLE2=0x23BC4C|0x1F1F1F|0|0|0
AU3_COMMENTBLOCK_STYLE1=0x23BC4C|0x1F1F1F|0|1|0
AU3_COMMENTBLOCK_STYLE2=0x23BC4C|0x1F1F1F|0|0|0
AU3_NUM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ommend ISN AutoIt Studio. Here's my config that will give you a nice pretty dark style. Right underneath my post is the workaround to change the caret color.

 

Edited by xiantez

Share this post


Link to post
Share on other sites

It's the closest thing to an IDE for AutoIt that we have. Much more than just the basic Scite Editor.

Once you've got it installed, and you've ran ISN to set everything up first, there's a config.ini under D:\Users\Your Username\My Documents\ISN AutoIt Studio\Data\ You can put those values in the post in that config file. You can also edit more settings by going to File -> Settings (Under Script Editor is the colors)

As for the Macro, to change the color for the caret. Project -> Macros -> New Macro. Click the + button next to functions and make the trigger Open File. Click the + button next to Details and select Execute Command. Hit OK and use this command

SendMessage($SCE_EDITOR[_GUICtrlTab_GetCurFocus($hTab)], $SCI_SETCARETFORE, 0xFFFFFF, 0)

You can change 0xFFFFF to whatever color you want the caret to be. Save your macro and re-open your script to update the caret.

Until the updated ISN comes up you'll have to add the macro to each project, so just save the macro and import it when you start a new project.

1 person likes this

Share this post


Link to post
Share on other sites

Well I am using ISN AutoIt Studio now... it is really neat... however I still have the same issues.... Cannot figure out how to change the blinking cursor color to white, since I have a black background....

Share this post


Link to post
Share on other sites

The post right under where my config is (in the ISN autoit studio topic) tells you how to change the caret color (the blinking cursor is called the caret)

I also explained how to, step by step, add the macro to change the caret color in my last post in this topic.

2 hours ago, InunoTaishou said:

As for the Macro, to change the color for the caret. Project -> Macros -> New Macro. Click the + button next to functions and make the trigger Open File. Click the + button next to Details and select Execute Command. Hit OK and use this command

SendMessage($SCE_EDITOR[_GUICtrlTab_GetCurFocus($hTab)], $SCI_SETCARETFORE, 0xFFFFFF, 0)

You can change 0xFFFFF to whatever color you want the caret to be. Save your macro and re-open your script to update the caret.

Until the updated ISN comes up you'll have to add the macro to each project, so just save the macro and import it when you start a new project.

 

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

This color is not part of the SciTEConfig options but can be manually added by adding this line in SciTEUser.properties:

# Make caret white
caret.fore=#FFFFFF

Jos

Dup Threads merged.

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Oh ok...i apologize for the confusion.... I appreciate all your help!

 

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

  • Similar Content

    • algiuxas
      By algiuxas
      Hello everybody!
      I get these weird errors in SciTE console:
      [0801/210405:ERROR:tcp_socket_win.cc(335)] bind() returned an error: Only one usage of each socket address (protocol/network address/port) is normally permitted. (0x2740) [0801/210405:ERROR:devtools_http_handler.cc(229)] Cannot start http server for devtools. Stop devtools. [0801/210405:ERROR:browser_gpu_channel_host_factory.cc(119)] Failed to launch GPU process. [0801/210405:ERROR:browser_gpu_channel_host_factory.cc(119)] Failed to launch GPU process. My script:
      #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Misc.au3> #NoTrayIcon $title = "Hello" $txt = "..." ; TODO: Make 4 of them ;~ #Region ### START Koda GUI section ### Form= ;~ $1_GUI = GUICreate($title, 370, 120, -1, -1) ;~ GUISetBkColor(0xFFFFFF) ;~ $1_B1 = GUICtrlCreateButton("B1", 136, 80, 107, 25) ;~ GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") ;~ $1_B2 = GUICtrlCreateButton("B2", 248, 80, 107, 25) ;~ GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") ;~ GUICtrlCreateLabel($txt, 16, 24, 338, 52) ;~ GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") ;~ GUICtrlSetColor(-1, 0x000000) ;~ GUISetState(@SW_SHOW) ;~ #EndRegion ### END Koda GUI section ### #Region ### START Koda GUI section ### Form= $2_GUI = GUICreate($title, 370, 0?"Hi :)":120, -1, -1) GUISetBkColor(0xFFFFFF) $2_B1 = GUICtrlCreateButton("B1", 136, 80, 107, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $2_B2 = GUICtrlCreateButton(0?":D":"B2", 248, 80, 107, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlCreateLabel($txt, 16, 24, 338, 52) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $u32dll = DllOpen("user32.dll") ;~ Opt("GUIOnEventMode", 1) ;~ GUICtrlSetOnEvent(-3, "_Exit") ; TODO: Fix, doesn't work with 2 GUI at the same time ;~ GUICtrlSetOnEvent($B11, "_Exit") ;~ GUICtrlSetOnEvent($B21, "_Exit") ;~ GUICtrlSetOnEvent($B12, "_Exit") ;~ GUICtrlSetOnEvent($B22, "_Exit") ;~ $pos1 = WinGetPos($GUI1) ;~ $pos2 = WinGetPos($GUI1) While 1 ;~ $pos1 = WinGetPos($GUI1) ;~ $pos2 = WinGetPos($GUI1) ;~ $x = $pos1[0] - 370 ;~ $y = $pos1[1] ;~ WinMove($GUI2, "", $x, $y, $pos1[2], $pos1[3], 1) ; Press middle mouse button to close (it's gonna be a non malicious prank for my friend) If _IsPressed(4, $u32dll) Then Exit $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _Exit() ;~ Case $1_B1 ;~ _Exit() ;~ Case $1_B2 ;~ _Exit() Case $2_B1 _Exit() Case $2_B2 _Exit() EndSwitch WEnd Func _Exit() ; TODO: ... ;~ GUIDelete($1_GUI) GUIDelete($2_GUI) Exit EndFunc ;==>_Exit How to get rid of these errors?
    • Nareshm
      By Nareshm
      I create message box but i dont know how to add button action when i click it.

      Help for : Add script for Button : Left, Right, Right Finger
      example when i press Left finger button do Case $idNotepad
                      $iPID = WinActivate ( " :PS :: Version - 2.8.0.0  - [eFS Bill]")
                              ControlSend(" :DS  - eF :: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:btnReset]", "{esc}")
                              ControlClick ( " :DS  - eF :: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:txtrdNo]")
                              ControlSend(" :DS  - eF:: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:txtrdNo]", "^v")
                              ControlSend(" :DS  - eF :: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:txtrdNo]", "{enter}")
      How to add like above ?
                    
                                                                sorry for my bad english
       
    • Altor
      By Altor
      Hi all:
      In Scite it is possible to expand and collapse  all  the #Region at time  with a shortcut ..?
      Now I use the + key to expand and collapse but I can only use this suggestion for a one # Region
      If I collapse all the regions one by one  in order to have the code more understandable when I re-open the script all the regions are expanded and I need to collapse all again one by one.
      Thank.s to all
      Altor
    • corgano
      By corgano
      Edit: A solution was found! Thanks Jos and others who helped me find this:
      You can have AutoIt run a different "Main" autoit script when you hit F5 instead of the current one, per folder, by doing the following:
      Run SciTE (might need administrator, depending on how autoit was installed) Options -> global properties (alt o g) Uncomment properties.directory.enable=1 (line 270 in my case) create a file SciTEDirectory.properties in the project's main folder Alternatively, if you don't have admin or don't want to edit the global.properties for whatever reason, you can just skip step 1,2,3 and name it SciTE.properties Put in the file you created command.go.$(au3)="$(SciteDefaultHome)\..\AutoIt3.exe" "$(SciteDefaultHome)\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "NAME OF SCRIPT HERE.au3" /UserParams $(1) $(2) $(3) $(4) Save the file. Now anything you run in that folder or subfolder will run the main script when you hit F5 Using SciTEDirectory.properties effects that folder and subfolders, where as SciTE.properties only effects that folder. Apart from that they work the same

      Original question:
      I have a main script, and a bunch of includes / udf's. Almost every single time I edit my includes I hit F5 to run the script, but it runs the include instead. I'm tired of switching back to the main script's tab in SciTE to run it, just to switch back to the include. Is there some kind of #flag or option to set a "main au3 file" so when I hit F5, it will see that and run the main file instead?
    • AndyS19
      By AndyS19
      I have a au3.properties file that adds a search command to the right click context menu.  This command does a FINDSTR on all .au3 files in the "Program Files" directory.  However, on 32 bit Windows 7 and 8.1 OS's, 32 bit executables are now run from a "Program Files (x86)" directory.
      I have a construct that builds a path variable that holds the locations to search.  In this variable, I have both "Program Files" and "Program Files (x86)", as well as a directory that holds my library file.
      The constructor looks like this:
      findcmd="C:\Windows\System32\Findstr.exe" myLib="C:\Andy\AutoIT-src\myLib" where1="C:\Program Files\autoit3\include\*.au3" "C:\Program Files (x86)\autoit3\include\*.au3" $(myLib)\*.au3 Then in the command definition, I use it like this:
      # "Find Definitions" # Look in the C:\Program Files (x86)\AutoIt3\Include directory for any .au3 file # that has a definition for the currently selected word (or the word the # cursor is on) # command.name.42.$(au3)= command.42.$(au3)=$(findcmd) /N /R /I /C:"^global [0-9a-f].* $(CurrentWord) =" $(where1) command.subsystem.42.$(au3)=0 command.save.before.42.$(au3)=2 The problem is that on 32 bit systems without the "Program Files (x86)" directory, I get this error:
          FINDSTR: Cannot open C:\Program Files (x86)\autoit3\include\*.au3
      I think that what I need is an 'if then else' something like this:
       
      if exists "C:\Program Files (x86)" then where1=""C:\Program Files (x86)" $(myLib)\*.au3 else where1=""C:\Program Files" $(myLib)\*.au3 endif How can I conditionally define the search path?