Jump to content

Recommended Posts

Posted

Hi everyone,

Is it possible in AutoIt to stop the syntax matching (using the default scite as the editor) when you are typing a comment? Mainly I get tired of - when typing a comment, using the ';' to mark the line as such - AutoIt trying to syntax match every second word I type, so I was looking for a way to disable it for comments only.

Regards,

CM

Posted

Hi everyone,

Is it possible in AutoIt to stop the syntax matching (using the default scite as the editor) when you are typing a comment? Mainly I get tired of - when typing a comment, using the ';' to mark the line as such - AutoIt trying to syntax match every second word I type, so I was looking for a way to disable it for comments only.

Regards,

CM

#cs
TYPE YOUR COMMENTS HERE
#ce
Posted

#cs
TYPE YOUR COMMENTS HERE
#ce
Hi c4nm7,

I couldn't get that to work. To test, I just started a blank script. On the first line, I typed:

#cs

On the second line, I then started to type in my comments, and AutoIt/scite still started to syntax match (bring up the dropdown showing a list of the possible commands you were trying to type).

I then thought that maybe I had to type the #ce line as well, and then go back and enter some blank lines between the two tags and start typing then. But that didn't work either - AutoIt/scite still attempts to syntax match.

Regards,

CM

Posted (edited)

Hi c4nm7,

I couldn't get that to work. To test, I just started a blank script. On the first line, I typed:

#cs

On the second line, I then started to type in my comments, and AutoIt/scite still started to syntax match (bring up the dropdown showing a list of the possible commands you were trying to type).

I then thought that maybe I had to type the #ce line as well, and then go back and enter some blank lines between the two tags and start typing then. But that didn't work either - AutoIt/scite still attempts to syntax match.

Regards,

CM

This cant be happening! Tray again open a new AutoIt script using the scite editor and u will see this text

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.4.9
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below hereoÝ÷ Úz0­êeiǰ«^½êÛzÜzw,jw{­*.­Ê&éí±©Ýué^µë§ç±ªòr¦z{ljëh×6#cs ----------------------------------------------------------------------------
(YOUR COMMENTS)
#ce ----------------------------------------------------------------------------

if this doesnt work, then re-install scite;;;

Edited by c4nm7
Posted

Hi everyone,

Is it possible in AutoIt to stop the syntax matching (using the default scite as the editor) when you are typing a comment? Mainly I get tired of - when typing a comment, using the ';' to mark the line as such - AutoIt trying to syntax match every second word I type, so I was looking for a way to disable it for comments only.

Regards,

CM

Are you using the full Scite4AutoIt3 Installation that contains a lua script that disables highlighting and calltips in the comment lines?

:rolleyes:

Posted (edited)

Hi guys,

Maybe there is some confusion about what I am asking. Basically, I start a new script. I see the template as posted by c4nm7 above. I go down to the line below where it says "; Script Start - Add your code below here" and type in an AutoIt command. After that command, I then put a ";" and then start to type a comment about what the command does. scite then puts up a dropdown giving me potentital AutoIt command matches for the word I am typing in. For example, if I type:

; t

scite will pop up a list that has

Tan

TCPAccept

TCPCloseSocket

TCPConnect

TCPListen

when the word I was actually wanting to type was 'test'. Because this is a comment, I don't want scite to attempt to match what I am typing with an AutoIt command - that pop-up box just gets annoying. It's fine when I am typing a line of code, but I've used the ";" to indicate a comment, so I was wondering if scite was smart enough to realise this. As well as trying #cs, I also tried #comments-start. Neither of these work - scite does exactly the same thing as it does when I use the ";" to indicate a comment.

The version of scite I am using is just the one you get when you run the AutoIt installer (i.e. autoit-v3.2.4.9-setup.exe).

Regards,

CM

Edited by romulous
Posted

It doesn't matter, as long as you have a ; before it SciTe won't recongize it in your script, just type as normal and ignore those boxes.....

  • 3 weeks later...
Posted

No confusion.

Download:

AutoIt3.lua_file.zip

Add the file inside the zip to the same directory as Scite.exe and restart Scite.exe. Done.

:whistle:

Hm, I think I must be cursed - I downloaded the file, unzipped to the scite.exe folder, and restarted scite, but it made no difference. After typing a ";" scite still insists on popping up that dropdown with potential command matches. Could it be bcause I only have the version of scite that comes with the AuotIt installer (in that I didn't install scite separately)?

CM

Posted

Hm, I think I must be cursed - I downloaded the file, unzipped to the scite.exe folder, and restarted scite, but it made no difference. After typing a ";" scite still insists on popping up that dropdown with potential command matches. Could it be bcause I only have the version of scite that comes with the AuotIt installer (in that I didn't install scite separately)?

CM

When you start typing are you just clicking the new button in scite then typing?

If so it doesn't know it is an Autoit script. you need to save the file first with an .au3 file extension before scite knows how to behave

Posted

Hi,

I like the default AutoIt template (with the comment block at the top), so generally what I do is open Explorer, right click in the folder I want to create the script in, go New-AutoIt v3 Script (.au3) and then type in a name in the dialog box (e.g. test.au3) and then when the file is created, right click on it in Explorer and select Edit Script. This opens up a blank file with the following:

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.4.9
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

I then click on the second blank line below the "; Script Start" and type in a command, then a space, then a ";" to indicate a comment, then another space and then I start typing the comments. This is when the pop-up box with possible command matches appear. I know that because there is a ";" before it, those commands aren't ran when you run the AutoIt script, it's just that the pop-up box annoys me. I did consider turning it off for all typing (even with the non comment commands), but I couldn't even work out how to do that, apart from using another editor like Notepad to create a script.

Regards,

CM

Posted (edited)

OK, lets say in scite I type ;Msgbox(0,"","MyMessage box") which is a comment, when I get to the point ofMsgbox(0,"", then it gives me the code sysntax even though it is a coment, the comas invoke the code syntax. Is this what your reffering to?

That is the only way I can do what your describing is by actually writing au3 code as comments

Edited by ChrisL
  • Developers
Posted

Could it be bcause I only have the version of scite that comes with the AuotIt installer (in that I didn't install scite separately)?

CM

Yes, you need the Full installer of SciTe4Autoit3 for this to work properly .... :whistle:

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

  • 2 weeks later...
Posted

I've just had a chance to install the full version of scite, and that has done the trick. No more pop-up's when I type ";" followed by a comment. Thanks everyone :whistle:

Regards,

CM

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