Jump to content

New SciTE4AutoIt3 available with SciTE v1.79


Jos
 Share

Recommended Posts

  • Moderators

HimashuGoel,

In the past this has been linked to a virus infection - check your system. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Replies 299
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Something i have bumped into a couple of times throughout the years is that when there is a comment after an #include, the include will be skipped by the CTRL+J (go to function) command.

Example that works:

#Include <WinAPI.au3>
_WinAPI_ShowMsg($sText)

Example that fails:

#Include <WinAPI.au3> ;
_WinAPI_ShowMsg($sText)

It doesn't need to be any text, it's the semi-colon that confuses stuff.

Kinda annoying.

Why would you want a comment after a include?

Maybe to say where it came from, or to give credit to someone.

#Include <WinAPI.au3> ;From AutoIt official includes
#Include <WinAPI.au3> ;Uses _WinAPI_ShowMsg by PaulIA

Yes, it's similar to the thing I posted about earlier in the thread, but this thing makes less sense than those (I think :) )

On the other hand, this is easier to circumvent :)

Edited by AdmiralAlkex
Link to comment
Share on other sites

  • Developers

Something i have bumped into a couple of times throughout the years is that when there is a comment after an #include, the include will be skipped by the CTRL+J (go to function) command.

Try this version of AutoItGotoDefinition.lua

Jos :)

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

  • Developers

OK I will check my system but I found a nice alternative. :)

I found that Notepad++ also has the syntax highlighting for AutoIt so thats my code editor for now. :)

Notepad++ uses the same Scintilla AutoIt3 lexer I wrote and we use in SciTE4AutoIt3. :P

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

  • Developers

Remember to disable the debug before you make a release with it :)

oops... Updated the File to disable debugging.

tnx

Jos

Edited by Jos

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

#AutoIt3Wrapper_Res_Field=CompanyName|Jos van der Zande ICT Consultancy
:) ... mmm, sluipreclame.

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

I got SciTE to work on a different system when I noticed the predictive text.I also found that notepad++ does not highlight GUI commands. Is there any way to change the lexer ? Does the latest version support GUI syntax highlighting? ???

Edited by HimashuGoel
Link to comment
Share on other sites

I got SciTE to work on a different system when I noticed this.I also found that notepad++ does not highlight GUI commands. Is there any way to change the lexer ? Does the latest version support GUI syntax highlighting? ???

Got the predictive text working in Notepad++. I went to the Settings Menu -> preferences -> tab BackUp/AutoCompletion -> Checked Word Completion.

The GUI also works and it was a false belief of mine thinking that the GUI was not supported. :):P:)

Link to comment
Share on other sites

You can get Notepad ++ and several other editors to work with AutoIt but what you will not have is the many great tools provided in Scite4AutoIt3. Believe me, I've been there as Jos can well testify to.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

  • 3 weeks later...
  • Developers

Uploaded AutoIt3Wrapper v2.0.1.36 that now supports RT_STRING resource updates which is written by wraithdu (Thanks!)

To use this feature you need to create an INI format file like this: (test_rt_string.ini)

# string ID = WORD (16 bits):
# first 4 bits = string index in the block, 0-15
# top 12 bits = block ID - 1
# blocks must start at 1, so top 12 bits equal to 0 is block 1
#
# the section heading is the language to update
# be aware that AutoIt uses several string blocks in the UK language 2057 for built-in strings
#
[0]
0=first string in first block
1=second string in first block
15=last string in first block
32=first string in third block
33=second string in third block

[2057]
0=this is UK string 1
1=this is UK string 2

.. and then add the following line to your script:

#AutoIt3Wrapper_res_file_add=test_rt_string.ini,RT_STRING

Enjoy,

Jos

Edited by Jos

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

  • Developers

Uploaded AutoIt3Wrapper v2.0.1.37 that now supports UTF encoded files in AutoIT3Wrapper to update any #AutoIT3Wrapper_Directives coded by jchd:

2.0.1.37 added support for UTF files coded by jchd.

Please test to see if this indeed solves the AutIt3Wrapper GUI and Directive changes for all you UNICODE sourcefile people.

Jos :unsure:

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

  • Developers

Still need to do some work on UTF8 files without BOM that are still now recognised and changed to default encoding by AutoIt3Wrapper.

Jos

Edited by Jos

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

  • Developers

Could I ask a favour of people using UNICODE (UTF) encoded files to test the below script to see if that works correctly detecting UNICODE files?

Help is appreciated or other ideas are welcome.

Jos

#cs
    Found on page: http://www.w3.org/International/questions/qa-forms-utf-8.en.php
    $field =~
    m/\A(
    [\x09\x0A\x0D\x20-\x7E]            # ASCII
    | [\xC2-\xDF][\x80-\xBF]             # non-overlong 2-byte
    |  \xE0[\xA0-\xBF][\x80-\xBF]        # excluding overlongs
    | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}  # straight 3-byte
    |  \xED[\x80-\x9F][\x80-\xBF]        # excluding surrogates
    |  \xF0[\x90-\xBF][\x80-\xBF]{2}     # planes 1-3
    | [\xF1-\xF3][\x80-\xBF]{3}          # planes 4-15
    |  \xF4[\x80-\x8F][\x80-\xBF]{2}     # plane 16
    )*\z/x;
#ce
While 1
    $infile = FileOpenDialog("Select file to test for UTF", @ScriptDir, "AnyFile (*.*)", 3)
    If @error Then Exit
    $regtst = "\A([\x09\x0A\x0D\x20-\x7E]|[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF]|\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})*\z"
    $text = FileRead($infile)
    $x = StringRegExp($text, $regtst, 0)
    If $x Then
        MsgBox(0, "File does NOT contains UTF characters?", "File does NOT contains UTF characters?" & @crlf &"File:" & $infile)
    Else
        MsgBox(0, "File contains UTF characters?", "File does contains UTF characters?" & @crlf & "File:" & $infile)
    EndIf
WEnd

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

This is overcomplicated for today's AutoIt. We're using a small subset of Unicode encoded as UTF-16 called UCS-2 (one AutoIt char = one single 16-bit unit, no surrogates), hence there is no way to encounter anything (valid for AutoIt) in planes > 0 as it wouldn't be dealt with by interpreter or any other today's tool.

Then this regexp can only deal with UTF-8, not the other UTFs around.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

I made an .ico containing 256x256/48x48/24x24 size icons with IcoFX, but when I compile with

#AutoIt3Wrapper_icon=CC try1.ico

only the 48 and 16 pixels show in Explorer. Why is that?

The .ico file itself displays just fine.

Edit1: It seems to have fixed itself, no idea why, I will try some things and report back.

Edit2: No, this just doesn't work.

Edited by AdmiralAlkex
Link to comment
Share on other sites

Hi Jos,

Here are some issues with this regexp:

a) it will crash PCRE internal lib on any medium-sized text file. This is due to the need of PCRE to recursively call its internal match() function at every possible branch point, and for us that means at every character in the tested file. This quickly causes stack overflow.

:unsure: it will scan every file completely

c) it should work the other way round: it is actually a test for UTF-8 validity of the whole file contents, but what we need is the fastest way to detect at least one UTF-8 sequence.

d) it sticks to full UTF-8 specs, but we can't accept Unicode codepoints beyond plane 0 (remember AutoIt will behave inconsistently with codepoints > 16 significant bits).

A better regexp would be:

Global $infile, $regtst, $hin, $text, $x, $msg, 

While 1
    $infile = FileOpenDialog("Select file to test for UTF", @ScriptDir, "AnyFile (*.*)", 3)
    If @error Then Exit
    $regtst = "([\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF])"
    $hin = FileOpen($infile, 16)
    $text = FileRead(
    $x = StringRegExp($text, $regtst, 0)
    $msg = "File: " & $infile & @LF & @LF
    If $x Then
        MsgBox(0, "UTF-8 encoding test", $msg & "contains UTF-8 compatible character sequence(s)")
    Else
        MsgBox(0, "UTF-8 encoding test", $msg & "does NOT contains UTF-8 characters")
    EndIf
WEnd

But then we have another issue: FileRead will auto-determine the encoding as much as it can, and store in $text Unicode codepoints in range 0x0001..0xFFFF (possibly including invalid codepoints). Since it doesn't seem possible using native AutoIt calls to force open and read of the file in ANSI, we aren't fully confident that what we have in $text is a true copy of the actual file. It may be that FileRead detected UTF-8 without BOM in the head of the file.

It's still far from perfect but I believe that the following code will more reliably detect UTF-encoded files.

While 1
    Local $infile = FileOpenDialog("Select file to test for UTF", @ScriptDir, "AnyFile (*.*)", 3)
    If @error Then Exit
    Local $bytesize = FileGetSize($infile)          ; actual length in bytes
    Local $hin = FileOpen($infile, 128 + 16384)
    FileRead($hin)
    Local $utf8size = @extended     ; actual length in characters, whatever encoding the file uses
    FileClose($hin)
    Local $msg = "File: " & $infile & @LF & @LF
    If $utf8size < $bytesize Then
        MsgBox(0, "UTF encoding test", $msg & "contains UTF-compatible character sequence(s)")
    Else
        MsgBox(0, "UTF encoding test", $msg & "does NOT contains UTF-encoded characters")
    EndIf
WEnd

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

  • Developers

Thanks for the feedback and testing.

It wasn't my intent to use the code I posted as is and scan the whole file in one go, but this was just a POC.

My plan was to add it to the same Func as the other file with BOM detection where I loop through the records and whenever it finds a single UTF character in a line and no UTF file with BOM was detected before then assume its a UTF8 encode file and stop scanning for the rest of the records.

Jos

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

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...