Jump to content

SciTE File Association Problem


Recommended Posts

Guess you didn't use the installer.

Right Click/ Open With should also work ...

Jos

After you choose open with, choos pick a program form a list, you can then click the "always use this program" ceckbox and then select SciTe and then it should default to that..
Link to comment
Share on other sites

I used the installer after i had already associated an au3 with notepad, but when i do that it makes it so when i double click it'll open with SciTE, what i'm trying to do is make it so when i right click ~> edit it opens with SciTE not notepad

Link to comment
Share on other sites

I used the installer after i had already associated an au3 with notepad, but when i do that it makes it so when i double click it'll open with SciTE, what i'm trying to do is make it so when i right click ~> edit it opens with SciTE not notepad

well the just open with > Sciti barely any more effort
Link to comment
Share on other sites

  • Developers

I wrote this script a while ago to fix the file association abd helpfile issues:

See if that fixes it.

Jos

; Scriptname: FixHelpFileExamples.au3
; Script to fix Registry setting for SciTE/AutoIt3/Helpfile Open Button
;
If Not FileExists(@ScriptDir & '\Autoit3.exe') then
    MsgBox(16,"Autoit3.exe error",'File Autoit3.exe not found. Place this script in the AutoIt3 program directory and run it again.')
    Exit
EndIf
If Not FileExists(@ScriptDir & '\SciTE\SciTE.exe') then
    MsgBox(16,"SciTE.exe error",'File ..\SciTE\SciTE.exe not found. Something is not installer the standard way. Exiting.')
    Exit
EndIf
$Open_SciTe = '"' & @ScriptDir & '\SciTE\SciTE.exe" "%1"'
$Edit_SciTe = '"' & @ScriptDir & '\SciTE\SciTE.exe" "%1"'
$Run_SciTe = '"' & @ScriptDir & '\AutoIt3.exe" "%1" %*'
$Open = RegRead("HKCR\AutoIt3Script\Shell\Open\Command", "")
$Edit = RegRead("HKCR\AutoIt3Script\Shell\Edit\Command", "")
$Run = RegRead("HKCR\AutoIt3Script\Shell\Run\Command", "")
$FixedOpen = RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.au3", "Application")
; Check for "Always open with settings 
If $FixedOpen <> "" Then
    If MsgBox(4, "Override setting for Open on .AU3", 'You have specified to "Always Open" with:' & @CRLF & $FixedOpen & _
            @CRLF & " But this should be removed and the standard setting should be used!" & _
            @CRLF & @CRLF & "Click Yes to Remove this Keys") = 6 Then
        $rc = RegDelete("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.au3", "Application")
        ConsoleWrite('-RegDelete ("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.au3", "Application") $rc = ' & $rc & "  @Error=" & @error & @CRLF)
    Else
        ConsoleWrite('! Override setting for Open on .AU3 not removed' & @CRLF)
    EndIf
Else
    ConsoleWrite('+No Open override on .au3.' & @CRLF)
EndIf
; Check Edit Settings
If $Edit <> $Edit_SciTe Then
    If MsgBox(4, "Edit Settings for AU3", 'Your "Edit" settings are currently:' & @CRLF & $Edit & @CRLF & " But should be:" & @CRLF & $Edit_SciTe & @CRLF & @CRLF & " Update?") = 6 Then
        $rc = RegWrite("HKCR\AutoIt3Script\Shell\Edit\Command", "", "REG_SZ", $Edit_SciTe)
        ConsoleWrite('-RegWrite Edit $rc = ' & $rc & "  @Error=" & @error & @CRLF)
    EndIf
Else
    ConsoleWrite('+Edit already set to default = ' & $Edit & @CRLF)
EndIf
; Check Open Settings
If $Open <> $Open_SciTe Then
    If MsgBox(4, "Open Settings for AU3", 'Your "Open" settings are currently:' & @CRLF & $Open & @CRLF & " But should be:" & @CRLF & $Open_SciTe & @CRLF & @CRLF & " Update?") = 6 Then
        RegWrite("HKCR\AutoIt3Script\Shell\Open\Command", "", "REG_SZ", $Open_SciTe)
        ConsoleWrite('-RegWrite Open $rc = ' & $rc & "  @Error=" & @error & @CRLF)
    EndIf
Else
    ConsoleWrite('+Open already set to default = ' & $Open & @CRLF)
EndIf
; Check Run Settings
If $Run <> $Run_SciTe Then
    If MsgBox(4, "Run Setting for AU3", 'Your "Run" settings are currently:' & @CRLF & $Run & @CRLF & " But should be:" & @CRLF & $Run_SciTe & @CRLF & @CRLF & " Update?") = 6 Then
        RegWrite("HKCR\AutoIt3Script\Shell\Run\Command", "", "REG_SZ", $Run_SciTe)
        ConsoleWrite('-RegWrite Run $rc = ' & $rc & "  @Error=" & @error & @CRLF)
    EndIf
Else
    ConsoleWrite('+Run already set to default = ' & $Run & @CRLF)
EndIf
;
;Ensure hhctrl is properly registered
$rc = RunWait(@ComSpec & " /c regsvr32 hhctrl.ocx", "", @SW_HIDE)
ConsoleWrite('+RegSvr $rc = ' & $rc & @CRLF)
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

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