Jump to content

SciTE PlusBar


ioa747
 Share

Recommended Posts

  • Developers

Nice addition!

I would make the integration simpler and not use an EXE .... especially not IPXed!.

  1. Unzip the source & ico's to the SciTE Subdir in  SciTE_PlusBar.
  2. Add something like this to your SciteUser.properties : (Use any free number above 39)
    # 45 SciTE_PlusBar  
    command.45.$(au3)="$(SciteDefaultHome)\..\AutoIt3.exe" "$(SciteDefaultHome)\SciTE_PlusBar\SciTE_PlusBar.au3"
    command.name.45.$(au3)=SciTE_PlusBar
    command.shortcut.45.$(au3)=Ctrl+Alt+T
    command.subsystem.45.$(au3)=2
    command.save.before.45.$(au3)=0
    command.quiet.45.$(au3)=1
  3. Make these changes in the Script: Add FileChangeDir to set the workdir to the scriptdir:
    FileChangeDir(@ScriptDir)
    ; Create an ImageList control for icons

You probably also want to test whether the script is already running to avoid running it multiple times!

#include <Misc.au3>
If _Singleton("SciTE_PlusBar", 1) = 0 Then Exit

 

It would be nice to develop this further by moving all options into an array at the top so it is easily configured as far as which option to show/hide and they sequence. :) 

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

  • 3 weeks later...

a attached Menu bar for SciTE  UpGrade :)

Add new ability:
Menu editor
to reorder the items,
enable, disable items
add any existing menu by simply add the text name,
add any script or executable as entry,
many different settings,
and many  different profile for other programs from SciTE 

1505051_summaryinstructions.thumb.png.3865e78a601640a61b6d353dbde0c2bc.png.09623c504bf3589e530a48ccf6b1a2f2.png

 

Please, leave your comments and experiences here

Edited May 14, 2023 by ioa747
The last edition in the first post
Back to first post

 

Edited by ioa747
UpDate

I know that I know nothing

Link to comment
Share on other sites

a good addition is the command  'possibly used before declaration'   SQLiteAutoIT.png.ca1955b2dc5dd2f0f5aa7aa604d08bb6.png
it happens regularly that we get a script from the forum, and when we go to run it we get an error,
: warning: $<variable> possibly used before declaration.     or     : error:  <function()> : undefined function.
this happens because, either it is part of an entire script, and the #include <filename> is missing, or it is from an older version of AutoIT
and the #include changed its name

1505472_SciTE_CarL0.png.3b6fe1556a555800d8aba2298cde1bc1.png

1505472_SciTE_hLd5f.png.890fd7c915281d9bd5636f61f7efdfbe.png

now we can mark with a double click the orphan variable or the orphan function, and  click the 'possibly used before declaration'   SQLiteAutoIT.png.ca1955b2dc5dd2f0f5aa7aa604d08bb6.png cmd
a Msgbox is coming with information about the missing include, the value, and the description of the Variable or thf function.
With OK the #include <filename> copied to clipboard, and we can paste  in the header of the script.

1505472_SciTE_FDspk.thumb.png.4774ab4ae752bf2d50b0e03e7c266749.png

1505472_SciTE_YGKGP.png.e2e0a3df43a22d4c0e262c7b68d9a5cf.png

Edited January 13, 2023 by ioa747 UpDate: Update the data base to Autoit_Ver 3.3.16.1

Edited May 14, 2023 by ioa747
The last edition in the first post
Back to first post

 

Edited by ioa747
UpDate

I know that I know nothing

Link to comment
Share on other sites

Update the data base to Autoit_Ver 3.3.16.1 for the ('possibly used before declaration'   find  from selected const or func #include)

Just replace the entire _sqlite folder where it is in CMD folder ;)

Edited January 14, 2023 by ioa747 Re-update: because I left the #include <> word in the UDF functions. Sorry for that

Edited March 1, 2023 by ioa747 Removed: because included in  SciTE_PlusBar_1.0.0.25

Edited May 14, 2023 by ioa747
The last edition in the first post
Back to first post

Edited by ioa747
synopsis

I know that I know nothing

Link to comment
Share on other sites

GoToHeadUrl.png  GoToHeadUrl.au3

Open the link from current line or from the script header

Because I usually put a link at the top of script, which refers me to or from the post

i add a command, it look in the current line first, if there is a link opens it

If there is not, go to the header if there is a link opens it .   :) Thanks 

; https://www.autoitscript.com/forum/topic/208404-scite-plusbar/?do=findComment&comment=1512082
;------------------------------------------------------------------------------
; Title...........: GoToHeadUrl.au3
; Description.....: Open the link from curent line or from the script header
;------------------------------------------------------------------------------
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\ICO\GoToHeadUrl.ico
#AutoIt3Wrapper_Res_Description=Open the link from curent line or from the script header
#AutoIt3Wrapper_Res_Fileversion=0.0.0.7
#AutoIt3Wrapper_Res_ProductName=GoToHeadUrl
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

Global $sData, $ClipBack, $StrLink, $StrStart

Send("{HOME}") ; Go to start of line Ctrl+Home
Send("+!{END}") ; Extend selection to end of line. Shift+Alt+End

$ClipBack = ClipGet() ; backup clip data
Send("^c") ; copy curent line
Sleep(50) ;<-- increase if needed

$sData = ClipGet() ; retrive clip data
$StrStart = StringInStr($sData, "http")

If $StrStart > 0 Then
    $StrLink = StringTrimLeft($sData, $StrStart - 1)
Else ; nothing in line and go in header
    Send("^{HOME}") ; Go to start of document. Ctrl+Home
    Send("+!{END}") ; Extend selection to end of line. Shift+Alt+End
    Send("^c") ; copy curent line
    Sleep(10) ;<-- increase if needed
    $sData = ClipGet() ; retrive clip data
    $StrStart = StringInStr($sData, "http")
    If $StrStart > 0 Then
        $StrLink = StringTrimLeft($sData, $StrStart - 1)
    Else
        ToolTip(" No link found " & @TAB & @TAB & @TAB , @DesktopWidth / 3, @DesktopHeight / 10, " info", 1)
        Sleep(3000)
        Exit
    EndIf
EndIf

Send("{HOME}") ; Go to start of line
ClipPut($ClipBack) ; set old data back to clipboard
ShellExecute($StrLink) ; open the link

Re-update: January 23, 2023 last line from ShellExecute($sData)  to ShellExecute($StrLink)

and I also show how it will enter SciTE PlusBar together with the icon

Edited May 14, 2023 by ioa747
The last edition in the first post
Back to first post

 

Edited by ioa747
UpDate to Version 0.0.0.7

I know that I know nothing

Link to comment
Share on other sites

PSPadCompareWith.png  PSPadCompareWith.au3

Compare current script file with the given one (PSPad Text Diff)

  Open dialog box will come up. Select  File2, and perform Text Differences, with  current  File.

PSPad must be installed   http://www.pspad.com/en/download.php

; https://www.autoitscript.com/forum/topic/208404-scite-plusbar/?do=findComment&comment=1512404
;----------------------------------------------------------------------------------------
; Title..........:  PSPadCompareWith.au3
; Description....:  Compare current script file with the given one (PSPad Text Diff)
;----------------------------------------------------------------------------------------
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\ICO\PSPadCompareWith.ico
#AutoIt3Wrapper_Res_Description=Compare current script file with the given one (PSPad Text Diff)
#AutoIt3Wrapper_Res_Fileversion=0.0.0.12
#AutoIt3Wrapper_Res_ProductName=PSPadCompareWith.au3
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include <FileConstants.au3>

Global $PSPad = "D:\i\Pro\PSPad\PSPad.exe" ; * <-- give hear the PSPad executable path
Global $TmpSciteFile = SciTE_CurrentFile()
If $TmpSciteFile Then PSPadCompareWith($TmpSciteFile)

Exit
;----------------------------------------------------------------------------------------
Func PSPadCompareWith($MainScript)
    Local $iPos = StringInStr($MainScript, "\", 0, -1)
    Local $MyDir = StringLeft($MainScript, $iPos)

    Local Const $sMessage = "Select a script file to compare with curent."
    Local $sFileOpenDialog = FileOpenDialog($sMessage, $MyDir, "Autoit (*.au3)", $FD_FILEMUSTEXIST)
    If @error Then
        MsgBox(4144, "file error", "No file found and cancel the operation")
        Exit
    Else
        ; "drive:\path\PSPad.EXE" [/switch  -switch] "file1" ["file2" ...]
        ShellExecute($PSPad, '-D ' & '"' & $sFileOpenDialog & '" "' & $MainScript & '"')
    EndIf

EndFunc   ;==>PSPadCompareWith
;----------------------------------------------------------------------------------------
Func SciTE_CurrentFile($FullPath = 1) ; Return the Current Scite [0=ScriptName; 1=ScriptFullPath]

    Local $ClipBack = ClipGet() ; backup clip data

    WinMenuSelectItem("[CLASS:SciTEWindow]", "", "&File", "Copy Pat&h")

    Local $ScriptName, $ScriptFullPath = ClipGet()
    ConsoleWrite("$ScriptFullPath=" & $ScriptFullPath & @CRLF)

    If Not FileExists($ScriptFullPath) Then
        Return SetError(1, 0, "")
    EndIf

    If $FullPath = 0 Then
        Local $sSplit = StringSplit($ScriptFullPath, "\")
        $ScriptName = $sSplit[$sSplit[0]]
    Else
        $ScriptName = $ScriptFullPath
    EndIf

    ClipPut($ClipBack) ; Restore clip data

    Return $ScriptName

EndFunc   ;==>SciTE_CurrentFile
;----------------------------------------------------------------------------------------

 

Back to first post

 

Edited by ioa747
UpDate to Version 0.0.0.12

I know that I know nothing

Link to comment
Share on other sites

MakeExecuteShortcut.png  MakeExecuteShortcut.au3 

Make a executable shortcut of the given script file

; https://www.autoitscript.com/forum/topic/208404-scite-plusbar/?do=findComment&comment=1512608
;------------------------------------------------------------------------------
; Title...........: MakeExecuteShortcut.au3
; Description.....: Make a executable shortcut of the given script file
;------------------------------------------------------------------------------
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\ICO\MakeExecuteShortcut.ico
#AutoIt3Wrapper_Res_Description=Make a executable shortcut of the given script file
#AutoIt3Wrapper_Res_Fileversion=0.0.0.10
#AutoIt3Wrapper_Res_ProductName=MakeExecuteShortcut.au3
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include <File.au3>

Global $iParams
$iParams = $CmdLine[0]
If Not $iParams Then
    MsgBox(0, "* No command line parameters exist", "This means that you have run the" & @CRLF & @CRLF _
             & "    ***  " & @ScriptName & "  ***  " & @CRLF & @CRLF _
             & "without command line parameters." & @CRLF _
             & "and for this session it runs with the current file." & @CRLF & @CRLF _
             & "You can give a .au3 file as parameter" & @CRLF _
             & "or '[SCITE]' for the current file in SciTe" & @CRLF & @CRLF _
             & "or you can drop the .au3 file on the shortcut" & @CRLF _
             & "which I will do")

    Global $iParams[2] = [1, @ScriptFullPath]

Else
    $iParams = $CmdLine
EndIf

MakeExecuteShortcut($iParams[1])

Exit
;----------------------------------------------------------------------------------------
Func MakeExecuteShortcut($au3Path, $PreFix = "")  ; Make Execute Shortcut .execute.lnk
    ; $PreFix = e.g. PrefixFileName.execute.lnk

    Local $TmpSciteFile

    If $au3Path = "[SCITE]" Then
        $TmpSciteFile = SciTE_CurrentFile()
        If $TmpSciteFile Then
            $au3Path = $TmpSciteFile
        Else
            Return SetError(1, 0, "")
        EndIf
    EndIf

    Local $sDrive, $sDir, $sFileName, $sExtension
    _PathSplit($au3Path, $sDrive, $sDir, $sFileName, $sExtension)
    ;where 0=original path, 1=drive, 2=directory, 3=filename, 4=extension

    ; Create a constant variable in Local scope of the shortcut filepath.
    Local Const $sortFilePath = $sDrive & $sDir & $PreFix & $sFileName & ".execute.lnk"
    ;ConsoleWrite("- CreateShortcut: " & $sortFilePath & @CRLF)

    ; Create a shortcut
    FileCreateShortcut(FileGetShortName(@AutoItExe), _  ;file
            $sortFilePath, _   ;lnk
            $sDrive & $sDir, _  ;workdir
            " /AutoIt3ExecuteScript " & $sDrive & $sDir & $sFileName & $sExtension, _  ;args
            "Execute: " & $sFileName & $sExtension, _   ;desc
            StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", $STR_NOCASESENSEBASIC, -1) - 1) & "\Icons\MyAutoIt3_Red.ico")  ;icon

EndFunc   ;==>MakeExecuteShortcut
;--------------------------------------------------------------------------------------------
Func SciTE_CurrentFile($FullPath = 1) ; Return the Current Scite [0=ScriptName; 1=ScriptFullPath]

    Local $ClipBack = ClipGet() ; backup clip data

    WinMenuSelectItem("[CLASS:SciTEWindow]", "", "&File", "Copy Pat&h")

    Local $ScriptName, $ScriptFullPath = ClipGet()
    ConsoleWrite("$ScriptFullPath=" & $ScriptFullPath & @CRLF)

    If Not FileExists($ScriptFullPath) Then
        Return SetError(1, 0, "")
    EndIf

    If $FullPath = 0 Then
        Local $sSplit = StringSplit($ScriptFullPath, "\")
        $ScriptName = $sSplit[$sSplit[0]]
    Else
        $ScriptName = $ScriptFullPath
    EndIf

    ClipPut($ClipBack) ; Restore clip data

    Return $ScriptName

EndFunc   ;==>SciTE_CurrentFile
;----------------------------------------------------------------------------------------

 

 

Don't forget to give as Command Line Parameters  [SCITE]

; because it can also run like this
Local $FilePath = "D:\i\Pro\.AutoIT\SciTE_PlusBar_1.0.0.5\SciTE\CMD\MakeExecuteShortcut.au3"
Local $Param = "D:\i\Pro\.AutoIT\PreX\PreX.au3"
Run(FileGetShortName(@AutoItExe) & " " & FileGetShortName($FilePath) & " " & $Param)
; or like
Run(FileGetShortName(@AutoItExe) & " " & FileGetShortName($FilePath) & " " & @ScriptFullPath)

 

Back to first post

 

Edited by ioa747
UpDate to Version 0.0.0.10

I know that I know nothing

Link to comment
Share on other sites

 

This is a Great Add on for Scite !

How do you create a New INi File that has all of the settings , thought it would be new profile , but not following why it is asking for a Select(activate) the window you want to track and then click on ok.

I worked around this by copying an exiting ini and renaming it and then editing that.

Are you working on any new enhancements currently looks like 1.0.0.5 is the latest version

 

 

Link to comment
Share on other sites

1 hour ago, HighlanderSword said:

Are you working on any new enhancements

As you can see here, I upload everything I do here

I have made some modifications to the main program as well, but they are small
I'm waiting for it to ripen and will upload it here as well
Glad you liked it

Thank you very much  :)

I know that I know nothing

Link to comment
Share on other sites

ExecuteScript.png  ExecuteScript.au3

Send the Script to @AutoItExe

sends the script to AutoItExe independently, to keep the inner F5, available

; https://www.autoitscript.com/forum/topic/208404-scite-plusbar/?do=findComment&comment=1513137
;------------------------------------------------------------------------------
; Title...........: ExecuteScript.au3
; Description.....: Send the Script to @AutoItExe
;------------------------------------------------------------------------------
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\ICO\ExecuteScript.ico
#AutoIt3Wrapper_Res_Description=Send the Script to @AutoItExe
#AutoIt3Wrapper_Res_Fileversion=0.0.0.1
#AutoIt3Wrapper_Res_ProductName=ExecuteScript.au3
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****


Global $au3Path = SciTE_CurrentFile()

If Not $au3Path Then Exit

ToolTip($au3Path, @DesktopWidth / 3, @DesktopHeight / 10, " execute:", 1)
Sleep(3000)

Run(FileGetShortName(@AutoItExe) & " " & FileGetShortName($au3Path))

Exit
;----------------------------------------------------------------------------------------
Func SciTE_CurrentFile($FullPath = 1) ; Return the Current Scite [0=ScriptName; 1=ScriptFullPath]

    Local $ClipBack = ClipGet() ; backup clip data

    WinMenuSelectItem("[CLASS:SciTEWindow]", "", "&File", "Copy Pat&h")

    Local $ScriptName, $ScriptFullPath = ClipGet()
    ConsoleWrite("$ScriptFullPath=" & $ScriptFullPath & @CRLF)

    If Not FileExists($ScriptFullPath) Then
        Return SetError(1, 0, "")
    EndIf

    If $FullPath = 0 Then
        Local $sSplit = StringSplit($ScriptFullPath, "\")
        $ScriptName = $sSplit[$sSplit[0]]
    Else
        $ScriptName = $ScriptFullPath
    EndIf

    ClipPut($ClipBack) ; Restore clip data

    Return $ScriptName

EndFunc   ;==>SciTE_CurrentFile
;----------------------------------------------------------------------------------------

 

Back to first post

 

Edited by ioa747
UpDate to Version 0.0.0.1

I know that I know nothing

Link to comment
Share on other sites

Tips - instructions   How add new cmd in SciTE PlusBar     (type=4, for .lnk .exe )

 

it has happened to me many times while the script is running in the SciTE that I want the infoTool, but it is not available while the script is running.

That's why I suggest, at the SciTE PlusBar, not to call the tools internally, but externally.

The way I prefer is to make a shortcut in the link folder, and then

insert the shortcut into the PlusBar .

 

  1. Hit the plus sign to Add itemEbVZY.png.f079adf868aa139872e5f0ce2be4eb4e.png
  2.  Give the proper name
  3.  Give description as tool tip
  4.  As type give 4
  5.  Select the shortcut or just drop it
  6.  Select the icon or just drop it
  7.  hit the v sign to save and activate

 

 

Please, leave your comments and experiences here !

Thank you very much  :)

Edited by ioa747
UpDate

I know that I know nothing

Link to comment
Share on other sites

To be honest @ioa747,

this would be a great community project 😀 , in case you would pulish the project/the add-on on GitHub (or similar).
At least in my opinion, it would be nice to contribute on this SciTE addition. There are so many people who use and love SciTE in combination with AutoIt - my assumption would be a big interest on this.

Great job @ioa747 👍 .

Btw.: I personally don't use SciTE, but I would support it nevertheless.

Best regards
Sven

Stay innovative!

Spoiler

🌍 Au3Forums

🎲 AutoIt (en) Cheat Sheet

📊 AutoIt limits/defaults

💎 Code Katas: [...] (comming soon)

🎭 Collection of GitHub users with AutoIt projects

🐞 False-Positives

🔮 Me on GitHub

💬 Opinion about new forum sub category

📑 UDF wiki list

✂ VSCode-AutoItSnippets

📑 WebDriver FAQs

👨‍🏫 WebDriver Tutorial (coming soon)

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

×
×
  • Create New...