Jump to content

How to save every version of a script in SciTE


Docfxit
 Share

Recommended Posts

  • Developers

What do you mean by every version? If you mean you want to use a versioning system then you should look as cvsWrapper that supports both CVS and SVN.

It also explains what to install and configure to either use AutoIt3Wrapper directives of simply F12 to commit your changes.

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

I prefer using SVN, have a look at cvsWrapper >> http://www.autoitscript.com/autoit3/scite/cvsWrapper/

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

I think each time you run tidy.exe (ctrl + t) scite or tidy creates a backup in backup folder.

I imagine if there were a way to name those backup files incrementily, it would be quite easy and ace.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

As JohnOne says, Tidy can number them like script_old1.au3 script_old2.au3 with the highest number being the most recent Tidy backup. I wrote a small program to put in SendTo folder that makes it obvious the version of the saved file(s). Before going into SciTE I will select the latest source and exe, right click and run SaveVersion. You can get a stand-alone obfuscated version of the source

But what you are talking about was the feature I liked about the VMS file system. Every time you hit the Save button in any ediotr, it numbered the backups. It was built right into the file system.

Anyway, my SaveVersion assumes the exe has file version info compiled into the resource and that the script has compile settings included at the top. It works on both .au3 and .ahk scripts. Just a quick and dirty approach without getting into full blown vcs.

Link to comment
Share on other sites

Thanks for the information.

I've been wanting to try SVN for years. I did try it years ago and couldn't get it running. I tried it again today and still can't get it running.

I installed SubversionEdge-3.2.2_setup.exe, I created a repository with the "Create standard trunk/branches/tags structure" option.

It says the first time I run the script with F12 it will

will update the CVS repository

Nothing happens when I press F12

I didn't install TortoiseCVS. It sounds like it's for CVS

It sounds like this is for CVS only also:

Add these lines to SciTEUser.properties:

# 42 Update Source in CVS
command.42.*.au3=$(SciteDefaultHome)\cvsWrapper\CvsWrapper.exe "$(FilePath)"
command.name.42.*.au3=CVS Update Source
command.save.before.42.*.au3=1
command.shortcut.42.*.au3=F12
# 43 Compare current Source with CVS version
command.43.*.au3=$(SciteDefaultHome)\cvsWrapper\CvsWrapper.exe "$(FilePath)" /ShowDiff
command.name.43.*.au3=CVS Diff Source
command.save.before.43.*.au3=1
command.shortcut.43.*.au3=Alt+F12
# 44 Open ScriptSource Directory
command.44.*.au3=$(SciteDefaultHome)\cvsWrapper\CvsWrapper.exe "$(FilePath)" /ShowRepository
command.name.44.*.au3=CVS Open Source Directory
command.save.before.44.*.au3=1
command.shortcut.44.*.au3=Ctrl+F12

I don't understand what else I need to do to get it running.

Please guide me.

Thanks,

Docfxit

Link to comment
Share on other sites

If it helps I use TortoiseSVN. Simple, easy to use and just works.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

A simple method that I use to save a copy of the exe and au3 files, with the version number as part of the file name. If you are using SciTE4AutoIt3, just add these lines to the AutoIt3Wrapper directives.

#AutoIt3Wrapper_Run_Before=MKDIR "%scriptdir%\Archive"
#AutoIt3Wrapper_Run_After=copy "%out%" "%scriptdir%\Archive\%scriptfile%.%fileversion%.exe"
#AutoIt3Wrapper_Run_After=copy "%in%" "%scriptdir%\Archive\%scriptfile%.%fileversion%.au3"

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Link to comment
Share on other sites

Nice Bowmore. I still prefer SVN, but this is ideal when testing and playing around with code. Thanks.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

  • 1 year later...

Tidy backup seems to work only when compiling and it doesn't add date/time into the filename.

Using Tools -> SciTe Config script allows you set number of backup to keep, however it saves files with .orig.bak extension instead of .bak.orig (not nice if you edit multiple file types), but most importantly it saves backups into the same directory as the original, it gets crowed quickly.

A simple method that I use to save a copy of the exe and au3 files, with the version number as part of the file name. If you are using SciTE4AutoIt3, just add these lines to the AutoIt3Wrapper directives.

#AutoIt3Wrapper_Run_Before=MKDIR "%scriptdir%\Archive"
#AutoIt3Wrapper_Run_After=copy "%out%" "%scriptdir%\Archive\%scriptfile%.%fileversion%.exe"
#AutoIt3Wrapper_Run_After=copy "%in%" "%scriptdir%\Archive\%scriptfile%.%fileversion%.au3"

this works in particular script, but would be nice have something like this automatic for all.

Is this possible?

Thank you.

Link to comment
Share on other sites

Use SVN or something like Git.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Again, 3nd party tools, not built-in. Hard to configure and require knowledge of commands to use it.

SciTe is capable of doing backups via config or lua of some sort...

For example:

'?do=embed' frameborder='0' data-embedContent>>

I couldn't make it to work, perhaps because it was written in 2005? No such file as AutoIt3.LUA, creating one didn't do anything.

Or

'?do=embed' frameborder='0' data-embedContent>>

requires you add some lines into each .au3 file - not good

Or

'?do=embed' frameborder='0' data-embedContent>>

not automatic

[EDIT]

@BrewManNH below:

Often no reply is more helpful then reply with no useful information.

As I said above, SVN and Git are two different languages by themselves. They came to windows world from type-every-freaking-thing-manually-before-you-can-do-anything linux and one must learn the whole language before it become some-what useful.

Thank you.

Edited by VAN0
Link to comment
Share on other sites

Doing things the hard way isn't noble or to be looked up to. So what if it's a 3rd party tool? SciTE is a 3rd party tool used to write text files that are interpreted by AutoIt3.exe.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

On the same idea of Bowmore, you can use this :

#AutoIt3Wrapper_Run_Before=MKDIR "%scriptdir%\Archive"
#AutoIt3Wrapper_Run_After=copy "%in%" "%scriptdir%\Archive\%scriptfile%.%date:~6,4%%date:~3,2%%date:~0,2%-%Time:~0,2%%Time:~3,2%%Time:~6,2%.au3"

No need to use automatic revision incrementation and with this, you can play with date and time variables to create your hown "serial number" or revision system. ;)

Best Regards.Thierry

Link to comment
Share on other sites

Download Link

Post on IDM Forums

Okay I wrote a little tool for UltraEdit for VCS, and it should probably be fairly easy to adapt to SciTe,

Hell maybe even BrewManNH can add it to his Toolbar for SciTe..as a normal menu rather than a pop-up context menu.

It currently has INI's for TortoiseGit, TortoiseHg, TortoiseSVN of course other VCS's can be added...would be nice to see a INI for Fossil since it keeps popping up.

Anyways food for thought. :)

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