Jump to content

AutoIt Editor


RazerM
 Share

Recommended Posts

  • Replies 135
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Can you please help to implement "Stop Executing" (ctrl + break) command as SCITE has?

I would try adding a hot key for {BREAK} and then do ProcessClose($AutoItPID).

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

I would try adding a hot key for {BREAK} and then do ProcessClose($AutoItPID).

Thanks Martin, but how would I know to manage the current running $AutoitPID withing the Editor?

I will try and if this wont work for me I may ask help again. Thanks again!

You could do that yourself.

When someone ask help it is because he needs help.

If you don't want gives help then please save your words.

Be Green Now or Never (BGNN)!

Link to comment
Share on other sites

Thanks Martin, but how would I know to manage the current running $AutoitPID withing the Editor?

I will try and if this wont work for me I may ask help again. Thanks again!

Not sure if I understand your question.

the variable $autoitPID is assigned to the process which is running the script; if you search for it you will see it is used for beta and production running, so I expect you only need to add what I said, is ProcessClose($AutoiPID) whever Break is pressed.

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

Not sure if I understand your question.

the variable $autoitPID is assigned to the process which is running the script; if you search for it you will see it is used for beta and production running, so I expect you only need to add what I said, is ProcessClose($AutoiPID) whever Break is pressed.

Thanks for the help, I solved this little issue ...

EDIT: I removed some stupid things that I wrote...:)

Edited by lsakizada

Be Green Now or Never (BGNN)!

Link to comment
Share on other sites

Thanks for the help, I solved this little issue ...

NP

EDIT: I removed some stupid things that I wrote...:)

I don't know what they were, but very wise. (I wish I could remove some stupid things I've done ^_^ )
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.
Link to comment
Share on other sites

  • 3 weeks later...

Well, this is my first time in autoit :)

I like this example amongs other examples that I have seen on this powerful scripting tool.

I hope the authour of this script may explain me how to change the script that it would support Perl script (SCILexer.dll syntax).

I have read the code and as much as I understood there some variables that the scilexer.dll distinguise languages.

I can gues that the variable $SCLEX_AU3 determine the current programing language that the utility use.

Is there anything else should be modified to support Perl (Except for the Run and Run Beta functions to run Autoit)?

Does someone please direct me exactly what the meaning of all variables that was created in the scintilla.h.au3 file.?

Best to you!

Link to comment
Share on other sites

I had minor problem with error if I had closed the last tab when there was more than one tab open. I have modified the Function _RemoveDoc as below which has overcome the problem for me.

Func _RemoveDoc($iDoc)
    If $aTabs[0][0] = 1 Then Return SetError(1, 0, 0)
    GUICtrlDelete($aTabs[$iDoc][0])
    If $iDoc - 1 > 0 Then
        SendMessage($Sci, $SCI_SETDOCPOINTER, 0, $aTabs[$iDoc - 1][1])
        _GUICtrlTab_SetCurSel($tab, $iDoc - 2)
        $iOldTab = $iDoc - 1;==added by martin
    Else
        SendMessage($Sci, $SCI_SETDOCPOINTER, 0, $aTabs[1][$iDoc + 1][1])
        _GUICtrlTab_SetCurSel($tab,$iDoc - 1)
        $iOldTab = 1;==added by martin
    EndIf
    SendMessage($Sci, $SCI_RELEASEDOCUMENT, 0, $aTabs[$iDoc][1])
    _Array2DDelete($aTabs, $iDoc)
    $aTabs[0][0] -= 1
EndFunc  ;==>_RemoveDoc
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.
Link to comment
Share on other sites

I had minor problem with error if I had closed the last tab when there was more than one tab open. I have modified the Function _RemoveDoc as below which has overcome the problem for me.

Func _RemoveDoc($iDoc)
    If $aTabs[0][0] = 1 Then Return SetError(1, 0, 0)
    GUICtrlDelete($aTabs[$iDoc][0])
    If $iDoc - 1 > 0 Then
        SendMessage($Sci, $SCI_SETDOCPOINTER, 0, $aTabs[$iDoc - 1][1])
        _GUICtrlTab_SetCurSel($tab, $iDoc - 2)
        $iOldTab = $iDoc - 1;==added by martin
    Else
        SendMessage($Sci, $SCI_SETDOCPOINTER, 0, $aTabs[1][$iDoc + 1][1])
        _GUICtrlTab_SetCurSel($tab,$iDoc - 1)
        $iOldTab = 1;==added by martin
    EndIf
    SendMessage($Sci, $SCI_RELEASEDOCUMENT, 0, $aTabs[$iDoc][1])
    _Array2DDelete($aTabs, $iDoc)
    $aTabs[0][0] -= 1
EndFunc;==>_RemoveDoc

There is another bug in case it is important for you.

When you do <-- (the back keyword not the left error keyword!) fast enough on the editor then the all GUI is freezing.

this line of code causing it: ~ line # 240 in 'Autoit Editor.au3'

$Col = SendMessage($Sci, $SCI_GETCOLUMN, $iPos, 0) + 1
Edited by Revenge
Link to comment
Share on other sites

There is another bug in case it is important for you.

When you do <-- (the back keyword not the left error keyword!) fast enough on the editor then the all GUI is freezing.

this line of code causing it: ~ line # 240 in 'Autoit Editor.au3'

$Col = SendMessage($Sci, $SCI_GETCOLUMN, $iPos, 0) + 1
How did you find out that it was that line? And have you got a fix for it?
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.
Link to comment
Share on other sites

How did you find out that it was that line? And have you got a fix for it?

If you comment this line then it will work properly.

No, I do not know how to fix it. I have tried many things. no successful.

If I will not find way to fix it then I will gave up the column/line reporting to the taskbar feature. It is realy nasty freazing problem.

and I will not be that happy too :)

i was thinking to work around with this case. I wanted to catch the 'back' key to handle this case outside of the while loop.

looks for me that the problem is inside the SCIlexer.dll file. but not sure.

Maybe needs to use other version of the lexer????

Link to comment
Share on other sites

If you comment this line then it will work properly.

No, I do not know how to fix it. I have tried many things. no successful.

If I will not find way to fix it then I will gave up the column/line reporting to the taskbar feature. It is realy nasty freazing problem.

and I will not be that happy too :)

i was thinking to work around with this case. I wanted to catch the 'back' key to handle this case outside of the while loop.

looks for me that the problem is inside the SCIlexer.dll file. but not sure.

Maybe needs to use other version of the lexer????

This seems to fix it.

If Not _IsPressed("8") Then
           $iPos = SendMessage($Sci, $SCI_GETCURRENTPOS, 0, 0)
           $Line = SendMessage($Sci, $SCI_LINEFROMPOSITION, $iPos, 0) + 1
           $Col = SendMessage($Sci, $SCI_GETCOLUMN, $iPos, 0) + 1
EndIf
[/code


            
                


    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.
        
    

        
    

    

    




    Link to comment
    
        
    
    
    

    
    Share on other sites
    

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    


    
    More sharing options...

    


    

                    
                    
                    
                

                    

                    
                    





    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


lsakizada
            
            
                Posted 
                
            
        
    
    
        


lsakizada
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 450
                            
                                
                            
                        
                        
                    
                
            
            
                

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            Posted 
            
            
                
                
            
        
    

    

    

    
        
        
            
Martin and Revenge (What a name ),

Please replace the SCILexer.dll

Do not use the one that came withe the AutoitEditor zip file, download version 1.75  from scintilla website.

Version 1.75 is working without this problem.


            
        

        

        
            

    
        

        
            Be Green Now or Never (BGNN)!
        
    

        
    

    

    




    Link to comment
    
        
    
    
    

    
    Share on other sites
    

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    


    
    More sharing options...

    


    

                    
                    
                    
                

                    

                    
                    





    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


lsakizada
            
            
                Posted 
                
            
        
    
    
        


lsakizada
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 450
                            
                                
                            
                        
                        
                    
                
            
            
                

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            Posted 
            
            
                
                
            
        
    

    

    

    
        
        
            
This seems to fix it.
 

If Not _IsPressed("8") Then

$iPos = SendMessage($Sci, $SCI_GETCURRENTPOS, 0, 0)

$Line = SendMessage($Sci, $SCI_LINEFROMPOSITION, $iPos, 0) + 1

$Col = SendMessage($Sci, $SCI_GETCOLUMN, $iPos, 0) + 1

EndIf

[/code

The task bar would not report current line/column unless the key will be released.

Why not replacing to version 1.75? With the hope no new regression bugs will be revealed :)

Be Green Now or Never (BGNN)!

Link to comment
Share on other sites

Hey, Love the script. But I'm trying to use it and its throwing all kinds of errors. the compiled works great but the script is giving me recreating const errors and it doesnt know $StatusBar = _GUICtrlStatusBarCreate($GUI, -1, $aText)

Unknown function name???

Could you make it bare-bones?

Can you please update it?

THanks

Edited by CyberZeroCool

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

Hey, Love the script. But I'm trying to use it and its throwing all kinds of errors. the compiled works great but the script is giving me recreating const errors and it doesnt know $StatusBar = _GUICtrlStatusBarCreate($GUI, -1, $aText)

Unknown function name???

Could you make it bare-bones?

Can you please update it?

THanks

Until RazerM updates it, I try to keep the copy in my debugger up to date for the latest version of AutoIt so you coud use that. I also try to apply any fixes which appear in this thread. See my signature. The debugger doesn't need to be used; there is just one extra button shown on the editor to turn on the debugging features.

I can also supply it compiled so that the AutoIt version doesn't matter.

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

Minor problem with editor when you choose to close a file. If you select cancel the editor closes.

Fix is to this area of code, remove the line "ExitLoop" as commented.

Case $FileClose, $IconClose
                    Local $fCancel = False
                    $iTab = GUICtrlRead($tab) + 1
                    If $aTabs[0][0] > 1 Then
                        If SendMessage($Sci, $SCI_GETMODIFY, 0, 0) <> 0 Then
                            $iRet = MsgBox(3, "Save", "Save changes to " & $aTabs[$iTab][2] & ".au3?")
                            Switch $iRet
                                Case 6;yes
                                    If $aTabs[$iTab][3] <> -1 Then
                                        FileDelete($aTabs[$iTab][3])
                                        _CheckExt($aTabs[$iTab][3], ".au3")
                                        FileWrite($aTabs[$iTab][3], SCI_GETTEXT($Sci))
                                        $sTempFile = $aTabs[$iTab][3]
                                    Else
                                        $sTempFile = FileSaveDialog("Save", @MyDocumentsDir, "AutoIt Scripts(*.au3)", 16, "Untitled.au3")
                                        If Not @error Then
                                            _CheckExt($sTempFile, ".au3")
                                            FileDelete($sTempFile)
                                            FileWrite($sTempFile, SCI_GETTEXT($Sci))
                                            $aTabs[$iTab][3] = $sTempFile
                                        EndIf
                                    EndIf
                                Case 2
                                    $fCancel = True
                                ;ExitLoop ;<----this line should be removed
                            EndSwitch
                        EndIf
                        If Not $fCancel Then _RemoveDoc(GUICtrlRead($tab) + 1)
                    EndIf
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.
Link to comment
Share on other sites

Thanks yours seems to be the same, but it works. I can't seem to find how to create the scite object. Could you let me know what I need to create just the editor in a gui.

THanks

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

Thanks yours seems to be the same, but it works. I can't seem to find how to create the scite object. Could you let me know what I need to create just the editor in a gui.

THanks

The editor window is created with the CreateEditor, which creates the editor as a child of $GUI, and InitEditor functions.

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.
Link to comment
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
 Share

  • Recently Browsing   0 members

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