Jump to content
Sign in to follow this  
RazerM

AutoIt Editor

Recommended Posts

am i doing something wrong or....

there is very few syntax highlighting! not even #incldue and GuiCreate has, not any other help

previous versions were better

try (in "init", when is first loading) this:

SendMessageString($Sci, $SCI_SETKEYWORDS, 0, FileRead(@ScriptDir & "\Keywords.txt"))
    SendMessageString($Sci, $SCI_SETKEYWORDS, 1, FileRead(@ScriptDir & "\Functions.txt"))
    SendMessageString($Sci, $SCI_SETKEYWORDS, 2, FileRead(@ScriptDir & "\Macros.txt"))
    SendMessageString($Sci, $SCI_SETKEYWORDS, 3, FileRead(@ScriptDir & "\SendKeys.txt"))
    SendMessageString($Sci, $SCI_SETKEYWORDS, 4, FileRead(@ScriptDir & "\PreProcessor.txt"))
    SendMessageString($Sci, $SCI_SETKEYWORDS, 5, FileRead(@ScriptDir & "\Special.txt"))
            SendMessageString($Sci, $SCI_SETKEYWORDS, 6, FileRead(@ScriptDir & "\MyFrendsName.txt"))

The file with keywords, func, e.t.c. you could made it from Scite dir-just see au3.properties file

Important: Set properties for each style (you coul load up to 32 style, even your family name) like any athers:

SendMessage($Sci, $SCI_STYLESETBACK, $STYLE Number, 0xbackcolor)

SendMessage($Sci, $SCI_STYLESETFORE, $STYLE Number, 0xforecolor)

I made my Editor, whith autocompletion and user list- and work well,including calltips for uour own function in script file.

If RazerM want to implement this, i could post heare-it seams that I do not have right to open an new item


Ovoid

Share this post


Link to post
Share on other sites

I'm not at my computer just now but I changed the directory where syntax files are stored, and did not place it in the zip.


My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

File updated, Definitions are now there.


My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

Yeh well talk about that and a few other things when I've finished AInstall.


My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

this is great but i wanna add a function that will add say mouseclick("left",0,0) to the file that is open


[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Share this post


Link to post
Share on other sites

For EagleClaw, I don't know if thats wat are you want

func gotomouspos()
        $p=MouseGetPos()
        $WP=WinGetPos($Sci) ;that is for difference of coordinates-Scintilla is in activX window($Sci)
        $p[0]-=$WP[0]
        $p[1]-=$WP[1]
        SendMessage($Sci,$SCI_GOTOPOS,SendMessage($Sci,$SCI_POSITIONFROMPOINT,$p[0], $p[1]),0)
;SendMessage($Sci,$SCI_POSITIONFROMPOINT,x, y) - heare you get position from x,y 
;SendMessage($Sci,$SCI_GOTOPOS,$pos,0) - heare you go to specific position
;if you go to an abstract position, use SendMessage($Sci,$SCI_POSITIONFROMPOINTCLOSE, x,  y)
;because it return -1 if no char close to position or the pos is outside window
Endfunc
[code=auto:0]


            
        

        
            
                
                    

        
        
            
                
                
                    
                
            
            
            
        
    

                
            
            
                
                    
                    
                    
                
                
                    
                
            
        

        
            

    
        
            

        
            Ovoid
        
    

        
    

    
        
            Share this post
            
            Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    

    

                    
                
                    
                    
                    






    

    
        
            

Gif
              

    
        
    
             2
    
        
    

        
        
            


    
        
    

        
    
    
        

Gif
               

    
        
    
             2
    
        
    


        
            
                Laikon Kafekoption
            
            

            
                


    
        
    

            
            Active Members
            
            
                

    
        
    
             2
    
        
    

                1,068 posts
                
                

            
        
    
    
        


    

    
        
            
                
                
                
                    
                
                
            
        

        
            Posted 
            
                
                    (edited)
                
                
            
        
    

    


    
        
        
            Great job, but 2 things:

1. cant run big scripts , i tried one thats 6000 lines several times but...
2. add a context menu on the tabs with Close option to make it more easier to use

yet great job..


            
                


    Edited  by c4nm7
    
    

            
        

        
            
                
                    

        
        
            
                
                
                    
                
            
            
            
        
    

                
            
            
                
                    
                    
                    
                
                
                    
                
            
        

        
    

    
        
            Share this post
            
            Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    

    

                    
                
                    
                    
                    






    

    
        
            

RazerM
              

    
        
    
             0
    
        
    

        
        
            


    
        
    

        
    
    
        

RazerM
               

    
        
    
             0
    
        
    


        
            
                cowinkeedenky - coincidence?
            
            

            
                


    
        
    

            
            Active Members
            
            
                

    
        
    
             0
    
        
    

                1,211 posts
                
                

            
        
    
    
        


    

    
        
            
                
                
                
                    
                
                
            
        

        
            Posted 
            
                
                
            
        
    

    


    
        
        
            It runs slower but an 8000 line script worked fine. I'll have a look at context menu on tabs.


            
        

        
            
                
                    

        
        
            
                
                
                    
                
            
            
            
        
    

                
            
            
                
                    
                    
                    
                
                
                    
                
            
        

        
            

    
        
            

        
            My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
        
    

        
    

    
        
            Share this post
            
            Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    

    

                    
                
                    
                    
                    






    

    
        
            

Gif
              

    
        
    
             2
    
        
    

        
        
            


    
        
    

        
    
    
        

Gif
               

    
        
    
             2
    
        
    


        
            
                Laikon Kafekoption
            
            

            
                


    
        
    

            
            Active Members
            
            
                

    
        
    
             2
    
        
    

                1,068 posts
                
                

            
        
    
    
        


    

    
        
            
                
                
                
                    
                
                
            
        

        
            Posted 
            
                
                    (edited)
                
                
            
        
    

    


    
        
        
            It runs slower but an 8000 line script worked fine. I'll have a look at context menu on tabs.yes i just tried again, it takes about 10 seconds for the script to run but it .. runs, alos try autocomplete and some funcs like tidy, and it would be a complete scite replacerPS:also include help file


            
                


    Edited  by c4nm7
    
    

            
        

        
            
                
                    

        
        
            
                
                
                    
                
            
            
            
        
    

                
            
            
                
                    
                    
                    
                
                
                    
                
            
        

        
    

    
        
            Share this post
            
            Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    

    

                    
                
                    
                    
                    






    

    
        
            

martin
              

    
        
    
             80
    
        
    

        
        
            


    
        
    

        
    
    
        

martin
               

    
        
    
             80
    
        
    


        
            
                ~~\o/~~~/0\=¬''~~~
            
            

            
                


    
        
    

            
            MVPs
            
                
            
            
                

    
        
    
             80
    
        
    

                7,148 posts
                
                

            
        
    
    
        


    

    
        
            
                
                
                
                    
                
                
            
        

        
            Posted 
            
                
                
            
        
    

    


    
        
        
            
@RazerM. Thanks for this script, it's a gift from the Gods! I hope you keep working on it. I hope to see automatic formatting in a future version.Question. Why do you use api calls so much rather than the in-built AutoIt functions?Problem. (My problem not yours.)I want to make a modified version of your script. I will have a window which has 3 or 4 sections. The different sections will be divided up by splitter bars. The main section, top left, will be the editor.The other sections will contain things like tree view, a listview and an edit box. I imagine that maybe other people could want to do similar things. For example, the treeview could contain all the variables used divided by function name, and the editor could contain a clipboard. My problem is that if I produce a bespoke version of your editor then I might have a small maintenance problem with each release you make. If you think this sort of requirement is worth supporting, then what I'd like is that in your Case EVENT_RESIZED you have a way of dealing with custom positioning. Perhaps something like thisCase $GUI_EVENT_RESIZED, $GUI_EVENT_MINIMIZE, $GUI_EVENT_MAXIMIZE, $GUI_EVENT_RESTORE
                    $aiSize = WinGetClientSize($GUI)
                    $iSPlitYPos = $aiSize[1] - $iOutputHeight - 35

                    SetWindowPos($Sci, 0, 10 + $CustomMargin[0], 70 + $CustomMargin[1], $aiSize[0] - 20 - $CustomMargin[2], $iSPlitYPos - 70 - $CustomMargin[3], 0)

                    $SciSize = WinGetClientSize($Sci)

                    SetWindowPos($SciOut, 0, 10 + $CustomMargin[0], $SciSize[1] + 95  + $CustomMargin[1], $aiSize[0] - 20- $CustomMargin[2], $aiSize[1] - $iSPlitYPos - 35- $CustomMargin[3], 0)

                    GUICtrlSetPos($hSplit, 10, $SciSize[1] + 90, $aiSize[0] - 20, 5)
                    _GUICtrlStatusBarResize($StatusBar)

That way I would just have to add your script as an include file and not worry about changes you made.

If you think this is a silly idea then I hope you didn't mind my asking. :)


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

What do you mean by "automatic formatting"?

What api calls would be better as AutoIt functions?

And lastly if you mean for example, another box under the console, I like the idea. I am working on a new version with many changes and upgrades. One upgrade is the ability of plugins (coded in AutoIt) to interact with the editor, I will think about adding plugin-defined "spaces"

An example plugin is as below

 #NoTrayIcon
#include <Misc.au3>
#include "Pluginheader.au3"
#include "..\Includes\scintilla.h.au3"

Global $hMenu, $hConfig, $hTest

$PID = PluginInit ("HandleNotification")
While 1
    If Not ProcessExists($PID) Then Exit
    Sleep(100)
WEnd

Func HandleNotification($hWndGUI, $MsgID, $wParam, $lParam)
    Local $iMsg, $iFileLength, $sFile, $iCtrlID
    PluginGetNotification ($lParam, $iMsg, $iFileLength, $sFile, $iCtrlID)

    Switch $iMsg
        Case $AEN_START
            $hMenu = SendPMessage ($AEP_SUBMENUCREATE, "Example")
            $hConfig = SendPMessage ($AEP_MENUITEMCREATE, "Configuration", $hMenu)
            $hTest = SendPMessage ($AEP_MENUITEMCREATE, "Test")
        Case $AEN_EXIT
            SendPMessage($AEP_CTRLDELETE, $hConfig)
            SendPMessage($AEP_CTRLDELETE, $hTest)
            SendPMessage($AEP_CTRLDELETE, $hMenu)
            Exit
        Case $AEN_MENUSELECT
            Switch $iCtrlID
                Case $hConfig
                    MsgBox(0, "Menu Clicked", "Config")
                Case $hTest
                    MsgBox(0, "Menu Clicked", "Test")
            EndSwitch
            
        Case $AEN_NEWDOC
            SendPMessage ($AEP_SETSCIMSG, $SCI_SETTEXT)
            SendPMessage ($AEP_SETSCITYPE, "int;str")
            SendPMessage ($AEP_SCIEXEC, 0, _
                    ";===============================================================================" & @CRLF & _
                    ";" & @CRLF & _
                    "; Program Name:" & @TAB & @TAB & @CRLF & _
                    "; Description:" & @TAB & @TAB & @CRLF & _
                    "; Requirement(s):" & @TAB & @CRLF & _
                    "; Author(s):" & @TAB & @TAB & @CRLF & _
                    ";" & @CRLF & _
                    ";===============================================================================" & @CRLF & _
                    ";" & @CRLF)
            SendPMessage ($AEP_SETSCIMSG, $SCI_SETSAVEPOINT)
            SendPMessage ($AEP_SCIEXEC)
    EndSwitch
EndFunc   ;==>HandleNotification
Edited by RazerM

My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

What do you mean by "automatic formatting"?

I meant Tidy. But if you have added automatic indenting then that's what I was after.

What api calls would be better as AutoIt functions?

I didn't say that. What I wondered was why you had not used AutoIt functions sometimes, but perhaps I just misunderstand your script. You use CreateWindowEx but is that diferent to using GuiCreate?

And lastly if you mean for example, another box under the console, I like the idea. I am working on a new version with many changes and upgrades. One upgrade is the ability of plugins (coded in AutoIt) to interact with the editor, I will think about adding plugin-defined "spaces"

What I am thinking of is a design like the draft below. (The editor includes the console.)

post-3602-1190304792_thumb.png

Would this be possible with your plugin-defined spaces idea? My first idea was to just add code to your script, or use your script as an include file, and then dictate the area to be occupied by the editor and console, which is why I asked about the $Customxtent feature. To me it sounds easier to have the plugin defining the area where the editor goes rather than trying to handle all the sections someone might want. I think if someone wants areas like in my example then it is better to let them control them. If someone wants 7 defined spacers then it's going to be very difficult for you to deal with it, but if they just say the editor has to fit in this area then you don't have a problem and it's a very simple change to your code.

I can't try your example because I need Pluginheader.au3, can you post that?

Glad to see you're still developing the editor, the list of improvements is very impressive. You've obviuosly got a lot to deal with on this project without someone like me asking for silly features, but nevertheless there's another one I'm interested in. How could I get the text of the variable or string which the cursor is hovering over?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

I like your feedback a lot. :)

The example can't be run, it is a plugin for the unreleased version of autoit editor, and shows how a plugin can interact with the editor. I'm very busy with 5 subjects at Higher level in school at the moment so I don't have much free time. Thanks again for the feedback.


My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

Small bug in function LoadDocs().

If a file is deleted which was previously edited with AutoIt Editor then the script will hang on startup.

Needs change as shown below.

Func LoadDocs()
    Local $iCount = 1
    If Not FileExists($sDocFile) Then Return
    While 1
        $asDocSection = IniReadSection($sDocFile, "Document" & $iCount)
        If @error Then ExitLoop
        ConsoleWrite("icount = " & $iCount & @LF)
        For $iKey = 1 To $asDocSection[0][0]
            Switch $asDocSection[$iKey][0]
                Case "Filename"
                    $iTab = GUICtrlRead($tab) + 1
                    $iCount += 1;<---------------------------------move line to here
                    If FileExists($asDocSection[$iKey][1]) Then
                    ;$iCount += 1;<-------------------------move this line outside of If clause
                        $sTempFile = $asDocSection[$iKey][1]

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

The script seems to crash the moment I open it. Both the exe and the au3. It doesn't produce an error, it just crashes.


Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites

here .exe and .au3 never really starts... just runs in the background and i have to terminate it through task manager

Share this post


Link to post
Share on other sites

The script seems to crash the moment I open it. Both the exe and the au3. It doesn't produce an error, it just crashes.

If no error then what does crash mean?

here .exe and .au3 never really starts... just runs in the background and i have to terminate it through task manager

Have you seen post #75 in case you have the same problem I had? Edited by martin

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

lol thnx martin that was the problem :), i just saw the topic from post #76....

i deleted the files that have the previous paths and editor started

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...