diff --git a/source/newuser/user.ahk.api b/source/newuser/user.ahk.api deleted file mode 100644 index e69de29..0000000 diff --git a/source/toolbar/Toolbar.ahk b/source/toolbar/Toolbar.ahk index 9ae6013..a231e6b 100644 --- a/source/toolbar/Toolbar.ahk +++ b/source/toolbar/Toolbar.ahk @@ -112,8 +112,21 @@ if SciTEVersion && (SciTEVersion != CurrentSciTEVersion) if !IsPortable && (!FileExist(LocalPropsPath) || !SciTEVersion) { + ; Rename the old SciTE folder + IfExist, %LocalSciTEPath% + { + FileMoveDir, %LocalSciTEPath%, %LocalSciTEPath%%A_TickCount%, R + if ErrorLevel + { + MsgBox, 16, SciTE4AutoHotkey Toolbar, Could not safely rename old SciTE settings folder! + ExitApp + } + } + ; Create the SciTE user folder - RunWait, "%A_AhkPath%" "%SciTEDir%\tools\NewUser.ahk" + FileCreateDir, %A_MyDocuments%\AutoHotkey\Lib ; ensure dir structure exists + FileCopyDir, %SciTEDir%\newuser, %LocalSciTEPath% + FileDelete, %LocalSciTEPath%\$VER FileAppend, %CurrentSciTEVersion%, %LocalSciTEPath%\$VER diff --git a/source/tools/NewUser.ahk b/source/tools/NewUser.ahk deleted file mode 100644 index 7976e27..0000000 --- a/source/tools/NewUser.ahk +++ /dev/null @@ -1,25 +0,0 @@ -; -; SciTE4AutoHotkey New User Profile Script -; - -#NoEnv -#NoTrayIcon -#SingleInstance Ignore -SendMode Input -SetWorkingDir, %A_ScriptDir% - -Progress, m2 b zh0, Preparing SciTE4AutoHotkey to run for the first time... - -FileCreateDir, %A_MyDocuments%\AutoHotkey -FileCreateDir, %A_MyDocuments%\AutoHotkey\Lib -IfExist, %A_MyDocuments%\AutoHotkey\SciTE -{ - FileMoveDir, %A_MyDocuments%\AutoHotkey\SciTE, %A_MyDocuments%\AutoHotkey\SciTE%A_TickCount%, R - if ErrorLevel - ExitApp -} - -FileCopyDir, %A_ScriptDir%\..\newuser, %A_MyDocuments%\AutoHotkey\SciTE - -; Mainly to avoid an annoying flashing window: -Sleep, 1000