Jump to content

Autoit get Scite version


NassauSky
 Share

Recommended Posts

I'm working with autoit on multiple PC's over time and one script (maybe more moving forward) is dependent on knowing if it's running from Scite Full vs Scite Lite.  Does anyone have any sample code or tricks to determine if it's Full or Lite?

 

Thanks!

Edited by NassauSky
Link to comment
Share on other sites

Func IsScite_v4()
    Local $sAutoIt3root = StringLeft(@AutoItExe, StringInStr(@AutoItExe, '\', 0, -1) - 1)
    Local $sSciteVersion = FileGetVersion($sAutoIt3root & '\SciTE\SciLexer.dll')
    Return Int($sSciteVersion) = 4
EndFunc   ;==>IsScite_v4

Returns true if SciTE is full v. 4.x.x.x

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

  • Developers

SciTE full or Lite isn't determined by the SciTE version but rather the fact whether autoit3wrapper.au3 is ran on compile/run.

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

Thanks @argumentum I created something like that already. I added VB runtime downloader to it and also config file setup to it since at minimum I like the following settings:
 

Func TweakSciTE()
    ZipSciteConfigFiles() ; Make a zipped backup of all existing config files

    ; Create SciTE User Settings file
    Local $sBatchContent = '' & _
        '#SciTE User Settings: ' & @CRLF & _
        'split.vertical=0 ' & @CRLF & _
        'save.session=0 ' & @CRLF & _
        'save.position=1 ' & @CRLF & _
        'output.horizontal.size=300 ' & @CRLF & _
        'fold=1 ' & @CRLF & _
        'fold.on.open=1 ' & @CRLF & _
        'fold.compact=0 ' & @CRLF & _
        'output.initial.hide=0 ' & @CRLF & _
        'line.margin.visible=1 ' & @CRLF & _
        'clear.before.execute=1 ' & @CRLF & _
        'backup.files=0 ' & @CRLF & _
        'indicators.under=0 ' & @CRLF & _
        'open.dialog.in.file.directory=1 ' & @CRLF & _
        'find.use.strip=0 ' & @CRLF & _
        'are.you.sure=1 ' & @CRLF & _
        'statusbar.visible=0 ' & @CRLF

    Local $sStartupFolder = @HomeDrive & "\Users\" & @UserName & "\"
    Local $sBatchFilePath = $sStartupFolder & "\SciteUser.properties"

    FileDelete($sBatchFilePath)
    If Not FileExists($sStartupFolder) Then DirCreate($sStartupFolder)
    FileWrite($sBatchFilePath, $sBatchContent)

    If FileExists($sBatchFilePath) Then
        SplashTextOn("", "Added & Backed up config", 600, 100)
            Sleep(1800)
        SplashOff()
    Else
        MsgBox($MB_TOPMOST + 16, "Error", "Failed to create batch script.")
    EndIf
EndFunc

 

 

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