Jump to content

Scite Editor Autoit Settings


Recommended Posts

  • Developers

I saved a screen shot, but I don't have an address to send it to???

If you still need the screenshot, please can e-mail me an address to send it to.

Would appreciate the screen shot so i can estimate the increase of the fields sizes thats needed...

My Email address is in the Tidy.AU3 source.... (jvdzande at yahoo dot com)

tnx

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 post
Share on other sites
  • Replies 136
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Developers

Made ver 1.0.5 available that has the following changes:

- Bigger Config Window

- Bigger ProgressOn window so hopefully the Title will fit now.

- Made some changes to the text on the config screen

- Added basic documentation to the ZIP file which is also available here: Tidy_Doc

Gene/Lilla, Let me know if this fixed the issues you both had with the text/title on your pc's .... tnx

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 post
Share on other sites

Gene,

I received your EMail with the screen captures... I will have a look at making some fields bigger. Don't know why the Combo boxes won't drop, maybe its because some of the selections are to wide ?... will check that out...

Will make the changes like you suggested and do some testing with the field sizes  later today...

I remember there being some commentary about not letting things overlap, was that just horizontally, or did it include the verticle too?

Gene :D

[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

Link to post
Share on other sites

Made ver 1.0.5 available that has the following changes:

- Bigger Config Window

- Bigger ProgressOn window so hopefully the Title will fit now.

- Made some changes to the text on the config screen

- Added basic documentation to the ZIP file which is also available here: Tidy_Doc

Gene/Lilla, Let me know if this fixed the issues you both had with the text/title on your pc's .... tnx

I emailed three screenshots to you, which document the observations noted below.

I installed v1.0.5 and made these observations:

Fixed - Progress window is now wide enough, {PAUSE}=Config is nolonger chopped off.

Problem with Config window. 1) some text is being chopped eventhough there is plenty of width. 2) screen is too wide, looks not so good.

Tidy is looking good. Nice work!

Lilla

Edited by Lilla
Link to post
Share on other sites

I sent an email with 4 more screen shots and comments. I'm repeating the comments here on the off chance they would be of interest to someone else.

The dropdowns still don't work. :huh2:

I wish that the END key wasn't a hotkey, I use the END key a lot. I can't remember using the SCROLL LOCK key since DOS was King. How about some choices for the hot keys? I know I can do it for my copy, but if you do it and put it in the INI everyone will have them. :D

While I have made suggestions about spacing, spelling, and capitalization, the only real complaint I have is with the time it takes. Some time ago, I began a project with some similarities to "Tidy"; (Process Script Variables in the files section), the processing time had become an issue for me, and I was thinking about ways to reduce it when you uploaded the first "Tidy". I stopped development because you were so much further along than me that it didn't sense to do two of them unless I didn't like yours. Getting back to time, I was about to start kicking off as separate jobs the processing of VARIABLES, MACROS, and UDFs. I suppose GUIs could be lumped into UDFs or treated as a special UDF now that it appears the GUI functions will be integrated into AutoIt. The idea was to try to process those items in parallel. Obviously I haven't studied your code, I wanted to suggest looking for opportunities to parallel process, as a way to reduce the overall processing time.

Gene

:)

Edited by Gene

[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

Link to post
Share on other sites

Gene,

Think I found a work-around for the Combo not dropping on a Win98 Pc. Sent a link to a test version to you to see if it now also works for you...

I will add the 2 Hotkeys as optional keys to the ini file and describe them in the Tidy_dom.htm. I do not plan to add these to the config window or do any validation for valid keys.

I had looked at speeding the process up  before and don't know how to speed it up much more. I implemented Shell-sort and Binary searches for Function and Keyword lookups....

If you run Tidy just for Indents without the Proper-Function-Names option it will be about 3 times faster.

They way it works today is that the script reads a record and then first determines the indent-level, then if the "Proper" portion need to be done it does the following:

- Split the record in a code and comments section.

- Process the code section through FUNC Change2Proper.

  This function goes through the code character by character to

determine the different type of keywords/functions etc ..

The Lookups in the arrays are Binary.

I don't see how i can spin-off multiple processes and gain much time... but any suggestion is welcome.

The processing of the Tidy.au3 script (831 lines) took 35 secs with all options on except the doc option and took 12 seconds for just the Indent option, on a Celeron 2.4GHz and On a P3 - 860 Mhz it took 51 secs and 16 secs ....

Are you running is so often or do you have so many scripts that processtime is an issue ?

I'll check it out later today...

Sure, as regards HotKeys.

Depending on how much data you're sorting at a time, Quick Sort might be worth the effort.

Instead of character by character for AutoIt words/names, consider

using FileRead ( "scriptname", FileGetSize ( "scriptname" ) ) to load the entire script into a variable. Spin all the (pre cased) AutoIt words/names into an array using StringSplit(), use StringInStr() and the Array data to to StringReplace() all the AutoIt words/names in the variable. It eliminates all the file reads but one. In the same time frame, you could have another process building, casing and sorting a list of variables. Another could be doing the same for Macros and or UDFs, as these lists become available, your central process can pick them up into a variable, use stringsplit() to put them in arrays and again use the search and replace process to fix the case of all those words/names in the variable with the script file in it. Having fixed all the case issues, you could then indent the script in the variable, save it and then process the script in the variable for the report. I'm sure I have left off some odds-n-ends, but this method eliminates nearly all the file reads and writes as well as a fair amount of processing.

You'd still have to do some char. by char. processing but not as much (you have to find the end of the variables. Since they all begin with $ signs you can skip from the end of a variable to the next $ sign. Obviously UDFs are not quite as easy as Macros but almost.

Not all of us have speedy PCs. When I run Tidy.exe against Tidy.au3, it takes well over a 1000 seconds.

Another thought, are you looking for undefined variables or UDFs? This would have the effect of spell checking as well as reporting loose ends.

[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

Link to post
Share on other sites
  • Developers

I'll check it out later today...

Sure, as regards HotKeys.

Depending on how much data you're sorting at a time, Quick Sort might be worth the effort.

Instead of character by character for AutoIt words/names, consider

using FileRead ( "scriptname", FileGetSize ( "scriptname" ) ) to load the entire script into a variable.  Spin all the (pre cased) AutoIt words/names into an array using StringSplit(), use StringInStr() and the Array data to to StringReplace() all the AutoIt words/names in the variable.  It eliminates all the file reads but one.  In the same time frame, you could have another process building, casing and sorting a list of variables.  Another could be doing the same for Macros and or UDFs, as these lists become available, your central process can pick them up into a variable, use stringsplit() to put them in arrays and again use the search and replace process to fix the case of all those words/names in the variable with the script file in it.  Having fixed all the case issues, you could then indent the script in the variable, save it and then process the script in the variable for the report.  I'm sure I have left off some odds-n-ends, but this method eliminates nearly all the file reads and writes as well as a fair amount of processing.  

You'd still have to do some char. by char. processing but not as much (you have to find the end of the variables.  Since they all begin with $ signs you can skip from the end of a variable to the next $ sign.  Obviously UDFs are not quite as easy as Macros but almost.

Not all of us have speedy PCs.  When I run Tidy.exe against Tidy.au3, it takes well over a 1000 seconds.

Another thought, are you looking for undefined variables or UDFs?  This would have the effect of spell checking as well as reporting loose ends.

EDIT:Started a new topic and removed tidy stuff from this thread..

Edited by JdeB

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 post
Share on other sites

More Tidy suggestions:

Put one space on both sides of operators. This will put a space if there is not one and it will remove extras if they exist. For example:

$x=     "The random number is "&int(RANDOM(10) )

becomes

$x = "The random number is " & Int(Random(10))

This should be activated by an option on the configuration, as this could slow the process down considerably.

BTW, what process do you use to determine how UDF should be capitalized? Is it the case of the Func statement?

David Nuttall
Nuttall Computer Consulting

An Aquarius born during the Age of Aquarius

AutoIt allows me to re-invent the wheel so much faster.

I'm off to write a wizard, a wonderful wizard of odd...

Link to post
Share on other sites
  • Developers

EDIT:Started a new topic and removed tidy stuff from this thread..

Edited by JdeB

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 post
Share on other sites

JdeB, I just downloaded the latest version of Scite with your folding lexer and I noticed a problem with the syntax highlighting. There is a style for numbers, but it doesn't appear to work. Numbers always appear in default color, even if I have something set.

Number support and pre-processor support are the only two other styles I would like to see control over. Other than that, everything else seems to be fully covered.

Link to post
Share on other sites
  • Developers

Tnx Valik, I noticed that as well after i sent the fix for the folding....

I cleaned up the code before sending it to Neil the first time and thought i didn't need the Folding bit of code in the Lexer (WRONG ... folding stopped working...)

So sent an update to Neil 2 weeks ago for the Folding fix and only discovered after that that the number bit wasn't working.... So made the changes and have another one ready to sent to him soon that fixes the Number highlighting.

The Scite.zip does contain the last version, so maybe you could test with that version to see if it works as it needs to for numbers ?

Could you explain the Preprocessor item you mentioned ?

Edited by JdeB

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 post
Share on other sites

You have pre-processor keywords grouped together with the other keywords (For, Next, While, et cetera). I would like to see them in their own seperate list so they can be styled seperately. I don't like them the same color as the other keywords.

Edit: Tested the latest you posted and the number styling works fine with whole numbers, hex notation, and scientific notation.

Edited by Valik
Link to post
Share on other sites
  • Developers

So you would like to add to the in AU3.properties file the following:

keywords5.$(file.patterns.au3)= #Include #include-once

(they are the only pre-processors at the moment ...right?)

And add:

# PreProcessor

style.au3.11=fore:#FFFFFF

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 post
Share on other sites
  • Developers

Valik, here's one that has a seperate preprocessor table and color....

SciLexer.zip

How does that look ?

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 post
Share on other sites
  • Developers

JdeB, I just downloaded the latest version of Scite with your folding lexer and I noticed a problem with the syntax highlighting.  There is a style for numbers, but it doesn't appear to work.  Numbers always appear in default color, even if I have something set. 

Number support and pre-processor support are the only two other styles I would like to see control over.  Other than that, everything else seems to be fully covered.

This version of scite.zip has the fix included for the Number Style Highlighting and the extra Keyword group added for PreProcessor like Valik suggested.

You need to update your au3.properties for it to work correctly... an example is include in the Zip file.

Also added some comment keywords to the au3.properties example file, which enable the Block/Box/Stream comment options in Scite. You can find those under the Edit Menu option.

Will submit the au3lexer changes in a couple of days to Neil (Creator of Scite/Scintilla) , when there are no reports of problems with the Lexer.

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 post
Share on other sites
  • Developers

()[] no longer show up in the operator highlight color.  Was this by design or a bug?

Made my own IsAOperator bool test because the buildin isoperator didn't look right for AutoIt3 ... and i forgot to put the []() in there...

Fixed that and uploaded it... do you see any others i forgot ?

inline bool IsAOperator(char ch) {
    if (isascii(ch) && isalnum(ch))
  return false;
    if (ch == '+' || ch == '-' || ch == '*' || ch == '/' ||
     ch == '&' || ch == '^' || ch == '=' || ch == '<' || ch == '>' ||
     ch == '(' || ch == ')' || ch == '[' || ch == ']'    )
  return true;
    return false;
}

inline bool isoperator(char ch) {
    if (isascii(ch) && isalnum(ch))
  return false;
    // '.' left out as it is used to make up numbers
    if (ch == '%' || ch == '^' || ch == '&' || ch == '*' ||
         ch == '(' || ch == ')' || ch == '-' || ch == '+' ||
         ch == '=' || ch == '|' || ch == '{' || ch == '}' ||
         ch == '[' || ch == ']' || ch == ':' || ch == ';' ||
         ch == '<' || ch == '>' || ch == ',' || ch == '/' ||
         ch == '?' || ch == '!' || ch == '.' || ch == '~')
  return true;
    return false;
{

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 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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...