Jump to content

Scite Editor Autoit Settings


Recommended Posts

SciTE is a SCIntilla based Text Editor. Originally built to demonstrate Scintilla, it has grown to be a generally useful editor with facilities for building and running programs.

Anyone that wants to try it out , this is what you need to do to get it to work for AutoIt3:

- First install the SciTE program from : Scite Editor

- Download the Autoit lexer and settings files Scite.zip into the SCiTe editor program directory.

- unzip it and away you go.

It will do:

- syntax highlighting

- Auto Complete AutoIt commands with Ctrl+I

- Intellisense (like CyberSlugs script)

- Code folding

- auto indentation

- F1 will open Helpfile on the keyword were the cursor is located

- F5 will Run your autoit program

- F7 Will Build (compile) your script

- Ctrl+9 will run Tidy.exe (included in the zip file) to auto indent your source file.

Let me know when you have questions/suggestions etc...

Thank you for sharing this. And for creating Tidy, and the rules AutoIt3 files for SciTE.

I just installed it per your instructions, and it looks really nice.

It's nice to have Tidy accessable via the editor the way you did.

I tried Tidy on my (one so far) converted (v2tov3) script and it made it much easier to work with.

Installation tip #1: When you unzip the scite.zip, be sure to check the option to 'Use folder names' (at least this is the terminology used in WinZip). If you fail to check this option, you will get an error message (indicating file not found) when you try to use Tidy from SciTE (via Tools menu or by pressing Ctrl+9) because it is looking for a subfolder called Tidy and there isn't one.

Installation tip #2: For those that might not already know ...

The following settings enable you to right-click on a .au3 file and choose Edit Script from the context menu. The script will open in SciTE.

Control Panel > Folder Options > File Types (tab)

Scroll down to Extension AU3 - AutoIt v3 Script

Click Advanced button

Under Actions, choose Edit Script

Click Edit button

change the fields as shown below:

Action: Edit Script

Application used to perform action: "C:\Program Files\SciTE Editor\SciTE.exe" "%1"

Note: change this line to match the folder you installed SciTE into.

[x] Use DDE

DDE message: <blank>

Application: SciTE

DDE Application Not Running: <blank>

Topic: System

Edited by Lilla
Link to post
Share on other sites
  • Replies 136
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Developers

Installation tip #2: For those that might not already know ...

The following settings enable you to right-click on an .au3 file and choose Edit Script from the context menu. The script will open in SciTE.

-snip-

Tnx for sharing your tips ...

To accommodate the tip#2, I added an AutoIt3 script that does this for you, to the Zip file called install_SciTe.au3.

Just run it to update the "Edit" option for AutoIt3 files to use Scite and optionally changes the default setting from "Run" to "Edit". (I like it better when double clicking a script that it goes to my editor instead of starting the script.)

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
  • Developers

btw I still need a cliplibrary to make a complete switchover, any ideas on that?

The only thing SciTe can do is work with abbreviations as far as I know.

This is an example of the way that works:

Add this to the abbrev.properties file in the Scite directory:

Sel=Select\n\tCase |\n\tCase \n\tCase Else\nEndSelect

Then in Scite type sel and Hit Ctrl+B ,it will then expand to:

Select
   Case 
   Case 
   Case Else
EndSelect

with the Cursor after the first Case statement.

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

Why would you need a cliplibrary with the tooltip it displays though? Given that with a clip library, you have to go back and edit out what you don't want or need and have to change that which you do want, I would consider a tooltip showing you what you need to type, but not actually filling those fields in far quicker...

Link to post
Share on other sites

Thanks for sharing this JdeB, love it :whistle:

And btw., good to see not only AutoIt matured a lot (v2 "non-standard" Syntax was the only reason for me not to use it), but so did SciTE... it's actually a nice general purpose editor now.

Gotta love open source projects with active maintainers keeping everything going (thanks Jon =) )

Link to post
Share on other sites
  • Developers

Just made a new version of Tidy available that has a Config window... (Thanks JPM.... really nice to code this stuff ! )

The AU3 needs to be compiled with JPM's AutoIt3Gui version, but the EXE is included. Download here

The first time you run this version of Tidy, it will prompt you for your preferred settings, which are save in an INI file.

Anytime during the processing of Tidy you can hit the PAUSE key, which will bring you to the config window again, after which it will restart itself.

This new version is also included in the SciTe.Zip.

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
Guest rathore

Congratulations on all the improvements!... its just great!

may i suggest another option during installation:

'Add Tidy to context menu of AutoIt3 Scripts'

(would help very much to users who don't use editors with support for custom tools)

Link to post
Share on other sites
  • Developers

Congratulations on all the improvements!... its just great!

may i suggest another option during installation:

'Add Tidy to context menu of AutoIt3 Scripts'

(would help very much to users who don't use editors with support for custom tools)

tnx for the feedback...

I added the shortcut like you suggested the setup of Tidy and uploaded it.

It adds an option called Tidy to the RigtMouseClick menu for AU3 files when you select it on the Tidy setup menu and removes it when deselected.

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
Guest rathore

the option of rt. click menu is there in the .au3 file but the .exe give error while running...

and where can i get the GUI verion of autoit?

( i posted a reply earlier...but it got totally crapped so deleted )

Link to post
Share on other sites

Just made a new version of Tidy available that has a Config window... (Thanks JPM....  really nice to code this stuff ! )

The AU3 needs to be compiled with JPM's AutoIt3Gui version, but the EXE is included.  Download here

The first time you run this version of Tidy, it will prompt you for your preferred settings, which are save in an INI file.

Anytime during the processing of Tidy you can hit the PAUSE key, which will bring you to the config window again, after which it will restart itself.

This new version is also included in the SciTe.Zip.

I downloaded TidyZIP, extracted Tidy.exe, ran it and got the following error.

>>>>>>>>>>>>( Window Title )<<<<<<<<<<<<<

AutoIt Error

( classname=#32770 )

>>>>>>>>>>>( Mouse Position )<<<<<<<<<<<<

On Desktop: x: 900 y: 389

In Window: x: 430 y: -17

>>>>>>>>>>>>>( Pixel Color Under Mouse)<<<<<<<<<<<<<

Dec: 12632256 Hex: 0xC0C0C0

>>>>>>>>>>>( Window Position )<<<<<<<<<<<

left: 470 top: 406 width: 346 height: 202

>>>>>>>>( Last Control Under Mouse )<<<<<<<

>>>>>>>>>( Status Bar Text )<<<<<<<<

>>>>>>>>>>>( Visible Window Text )<<<<<<<<<

OK

ÿ

Line 0:

HotKeySet($HOTKEY)

HotKeySet(^ ERROR

Error: Variable used without being declared.

>>>>>>>>>>( Hidden Window Text )<<<<<<<<<

:whistle:

Gene

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

Link to post
Share on other sites

Until JdeB uploads a fixed version:

Goto line #746 in tidy.au3

remove the 11 from ProgressOff()11

Goto line #37

move the line If Not FileExists(@ScriptDir & "\Tidy.ini") Then Tidy_Config_GUI() so that is appears between

HotKeySet($HOTKEYCFG,"Tidy_Config_GUI")

;Break(0)

around approx line #50

recompile

Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to post
Share on other sites
  • Developers

:whistle: oops ... made the correction and uploaded the files again...

I did test it this time also when the INI file doesn't exists yet... B)

DownLoad Tidy

CyberSlug, Like you said, i needed to define the $HOTKEY & $HOTKEYCFG before the If Not FileExists test..... tnx

I am only a bit puzzled about the "11" you mention behind the ProgressOff() .. I don't have that in my source.

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

I am only a bit puzzled about  the "11" you mention behind the ProgressOff() .. I don't have that in my source.

I re-extracted from the zip file, and it didn't see the 11 anymore. Maybe my hands slipped on the keyboard the first time :whistle:

I really like the new version of tidy, by the way!

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to post
Share on other sites

:whistle:  oops ... made the correction and uploaded the files again...

I did test it this time also when the INI file doesn't exists yet...  B)

DownLoad Tidy

Thank you. It looks really good.

Problem: the window is not wide enough to display the {STOP}{PAUSE} key definitions shown in the title.

So, the new/ocassional user might not know what {PAUSE} key does.

Possible solutions that come to mind: make window wider, or show {STOP}{PAUSE} as text in the window, or a startup window with buttons to run tidy or configure tidy.

Lilla

Edited by Lilla
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
  • Developers

I went ahead and made the Progress window a bit wider to make sure the title fits, also for bigger fonts.

Let me know if that works for you ... (ver 1.0.4 uploaded )

Also changed the File handling in Tidy when it's started without a filename as parameter. It now works in the same way as it does when started with a filename as parameter:so it will always replace the original file after it created an backup called scriptname.old?.au3 (where ? is an sequence number)

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

I went ahead and made the Progress window a bit wider to make sure the title fits, also for bigger fonts.

Let me know if that works for you ... (ver 1.0.4 uploaded )

Also changed the File handling in Tidy when it's started without a filename as parameter. It now works in the same way as it does when started with a filename as parameter:so it will always replace the original file after it created an backup called scriptname.old?.au3 (where ? is an sequence number)

I haven't been able figure out who you are. My address is etsears@mindspring.com. Send me a note and I'll send you the screenshot. Tidy is very interesting, but the two list boxes don't appear to work (they don't dropdown, and even if there was only one item, I would expect it to drop down), and some of the label text is cramped. Even though they don't dropdown, I was able to scroll through them with the arrow keys. I run Win98se, MSIE 5.5 sp2.

Suggestions:

1- "Change Variables" could be "Variable Case", then "UnChanged" could be "As Is", "LowerCase" could be "Lower", "UpperCase" could be "Upper".

2- "Add an comment AfterEndFunc... should be "Add a comment after EndFunc...

2a- For the remainder of that line, you might consider indenting it and putting it on a second line.

3- "Add Tidy to the right mouseClickmenu for AU3 files" should be "Add Tidy to the right mouse popup menu for AU3 files"

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

Link to post
Share on other sites

I went ahead and made the Progress window a bit wider to make sure the title fits, also for bigger fonts.

Let me know if that works for you ... (ver 1.0.4 uploaded )

I use Win XP Home 2002 (includes SP1), with the Large Fonts setting

The title line I see looks like this...

AutoIt Tidy(1.0.4) {Esc}=Stop {Pause}...

It shows "{Pause}..." exactly like that including the three dots

The file name above the progress bar extends off the screen too... so wider would look better there too.

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.

Lilla

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

Tidy is very interesting, but the two list boxes don't appear to work (they don't dropdown, and even if there was only one item, I would expect it to drop down), and some of the label text is cramped.  Even though they don't dropdown, I was able to scroll through them with the arrow keys.  I run Win98se, MSIE 5.5 sp2.

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...

Suggestions:

1- "Change Variables"  could be "Variable Case", then "UnChanged" could be "As Is", "LowerCase" could be "Lower", "UpperCase" could be "Upper".

2- "Add an comment AfterEndFunc... should be "Add a comment after EndFunc...

2a- For the remainder of that line, you might consider indenting it and putting it on a second line.

3- "Add Tidy to the right mouseClickmenu for AU3 files" should be "Add Tidy to the right mouse popup menu for AU3 files"

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

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...