Sign in to follow this  
Followers 0
JackDinn

SciTE hotkeys & manipulation

9 posts in this topic

#1 ·  Posted (edited)

Hi,

Iv just done a little ConsoleWrite() replacement that suites my purposes (i know there's a few already, but where's the fun in that :unsure:).

I was just wondering how i would go about adding a hotkey for it that will write the line _Debug() and also fill it with the text that the cursor is currently in or selected (just like Alt+D does for ConsoleWrite() ) ?

I have had a good look through all the SciTE options / properties / abbreviations and found a few entries that mention the hot keys but i cant see how to extract the info i need.

If i could just find how the Alt+D works and where its all setup i might be able to see what i need but all i can find is this in the au3.Properties

# 25 Add a Console msg for debugging

command.name.25.$(au3)=Debug to Console

command.subsystem.25.$(au3)=3

command.25.$(au3)=InvokeTool AutoItTools.DebugConsoleWriteAdd

command.shortcut.25.$(au3)=Alt+D

command.save.before.25.$(au3)=2

But this really dont tell me much.

I did find this thread but Jos said "All Options can be found in file IFaceTable.cxx which I have attached." but i cant see this IFaceTable.cxx

Thx.

Edited by JackDinn

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Share this post


Link to post
Share on other sites



Look in the file called AutoItTools.lua, that's where the code for that is.


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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Ahh, many thx, should be able to work with that :unsure: (hopefully, lol)

will the .LUA file be overwritten if i ever update SciTE ?or am i supposed to make a "User" .lua file somewhere ?

Edited by JackDinn

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Share this post


Link to post
Share on other sites

I would suppose that it will be over written if you ever update the software. You can always make a back-up of it though. Or make your own .lua file and have it loaded at startup, the startup lua files are called from SciteStartup.lua.


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

Share this post


Link to post
Share on other sites

Im wondering why when i use my little debug() func on my current script project to view the main array it colours some of the console output red ?

It dont do it if i test it on a quick test script.

post-38939-0-47466300-1304862112_thumb.p

The output is only generated by a normal ConsoleWrite :- ConsoleWrite("Array =: " & $text & " :=" & @CRLF & $output & @CRLF).

This has got me thinking , i would like some red parts but how do i control which parts of the output are coloured red ?


Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Share this post


Link to post
Share on other sites

This is from the FAQ:

How do I get SciTE to understand the error messages from my compiler?

The set of error message formats is embedded in the Scintilla and SciTE code. To add support for another compiler, you will need to add a new style to scintilla/include/Scintilla.iface after the other SCE_ERR_* values, run HFacer.py, edit RecogniseErrorListLine in scintilla/src/LexOthers.cxx to recognise the error message, and edit DecodeMessage in scite/src/SciTEBuffers.cxx to extract the file name and line number.

So when you want to understand how SciTE recognises errors then that is where you can find the details.

You can also play with the start characters of the outputlines by using on of these: + - ! >

Jos


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

Share this post


Link to post
Share on other sites

phew , that quote went straight over my head , lol, i shall have a play with the first characters.

It just looked odd because which line is coloured is random, there's no difference between each line. I would be happy to just remove the red colouring all together, i thought it might have something to do with the fact that the output was still flowing whilst the script was continuing past the debug but iv tried sleeping while the console buffer is still writing the output but makes no difference.

Looks like its to much for me to understand , I will prob just have to leave it as it is.

Thx anyhow :unsure:


Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

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
Sign in to follow this  
Followers 0