Jump to content

Little Au3-Backup-Script


gosu
 Share

Recommended Posts

Hi guys. Because I often mess up a lot in a short time, I´ve created this script.

It copies your script into folder "Backup" with time and date. I modified my au3.properties a little to easily run it from Scite:

command.3.*.au3="YOURPATH\Au3Backup.exe" "$(FilePath)"
command.subsystem.3.*.au3=1
command.name.3.*.au3=Backup
command.shortcut.3.*.au3=Shift+F1
command.save.before.3.*.au3=1

You have to compile it to get it running. Maybe someones else than me finds it useful. Have fun :lmao:

$from = $CmdLine[1]
$to = _OrdnerHerausfiltern($CmdLine[1]) & "Backup\" & _DateiNameHerausfiltern($CmdLine[1]) & ". " & @MDAY & "." & @Mon & "." & @Year & ", " & @Hour & "-" & @Min & "-" & @Sec
If FileExists(_OrdnerHerausfiltern($CmdLine[1]) & "Backup") <> 1 Then
   DirCreate(_OrdnerHerausfiltern($CmdLine[1]) & "Backup")
EndIf
FileCopy($from,$to)

Func _DateiNameHerausfiltern($pfadunddatei)
   $position  = StringInStr($pfadunddatei, "\", 0, -1)
   Return StringMid($pfadunddatei, $position + 1, StringLen($pfadunddatei) - $position)
EndFunc
Func _OrdnerHerausfiltern($pfadunddatei)
   $position  = StringInStr($pfadunddatei, "\", 0, -1)
   Return StringMid($pfadunddatei, 1, $position)
EndFunc
Edited by gosu

[quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote]

Link to comment
Share on other sites

Hi guys. Because I often mess up a lot in a short time, I´ve created this script.

It copies your script into folder "Backup" with time and date. I modified my au3.properties a little to easily run it from Scite:

<{POST_SNAPBACK}>

Very nice, thanks for sharing. I've been doing this manually, even though SciTE makes "old" backups (which now I would like to prevent).

I added the code to SciTEUser.properties instead of au3.properties as I think that's a safer place (although when the SciTE Config utility is used, it cause the entries to be lost, so keep a backup).

Phillip

Link to comment
Share on other sites

Very nice, thanks for sharing.  I've been doing this manually, even though SciTE makes "old" backups (which now I would like to prevent).

I added the code to SciTEUser.properties instead of au3.properties as I think that's a safer place (although when the SciTE Config utility is used, it cause the entries to be lost, so keep a backup).

<{POST_SNAPBACK}>

Thanks.

Didn´t even know you can add it to SciTEUser.properties :lmao:

[quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote]

Link to comment
Share on other sites

  • Developers

Hi guys. Because I often mess up a lot in a short time, I´ve created this script.

It copies your script into folder "Backup" with time and date. I modified my au3.properties a little to easily run it from Scite:

command.3.*.au3="YOURPATH\Au3Backup.exe" "$(FilePath)"
command.subsystem.3.*.au3=1
command.name.3.*.au3=Backup
command.shortcut.3.*.au3=Shift+F1
command.save.before.3.*.au3=1

You have to compile it to get it running. Maybe someones else than me finds it useful. Have fun :lmao:

<{POST_SNAPBACK}>

I wouldn't use command.3.*.au3 since that is already used for FuncPopUp. command.31.*.au3 through command.40.*.au3 are available at this moment.

SciTEUser.properties isn't part of the installer so your changes arn't lost.

Very nice, thanks for sharing.  I've been doing this manually, even though SciTE makes "old" backups (which now I would like to prevent).

<{POST_SNAPBACK}>

SciTE doesnt make any old backup files to my knowledge. I guess you are referring to the backup files Tidy makes. In the Tidy setup menu you can define how many backup you want to save every time Tidy is processed. (1 is the minimum)

I added the code to SciTEUser.properties instead of au3.properties as I think that's a safer place (although when the SciTE Config utility is used, it cause the entries to be lost, so keep a backup).

<{POST_SNAPBACK}>

What do you mean when you say entries get lost?

SciteConfig only takes out the lines it has generated itself between the below lines and possible font and color settings you had in the file already, because they need to be overridden.

As long as you dont put any stuff between these lines you should be save. If thats not the case then let me know so I can research if there is an issue with SciTEConfig. Tnx

#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#

Created by SciteConfig

#------------------------------------------------------------

font.base=font:Verdana,size:10,$(font.override)

font.monospace=font:Courier New,size:10

font.override=$(font.monospace)

use.tabs=0

indent.size=3

indent.size.*.au3=3

tabsize=3

#Background

style.au3.32=style.*.32=$(font.base),back:#F2F2F2

-snip-

#Special

style.au3.12=fore:#A00FF0,italics

#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#

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

command.31.*.au3 through command.40.*.au3 are available at this moment.

SciTE doesnt make any old backup files to my knowledge.

What do you mean when you say entries get lost?

<{POST_SNAPBACK}>

Thanks Jdeb. I'll change from .3 to .40. I changed Tidy setup to save only one backup in the Backup folder (that should be better).

Yes, the lines I added to SciTEUser.properties were between those lines. I didn't know I couldn't since there is no notation in the file. Have moved my stuff above the top "-#-#-#-#-#-#" line. Thanks for the info.

While on the subject, when the SciTE Config dialog opens, it always checks 6 of the Italic boxes, even though I have unchecked some of them. Same kind of thing with the Bold check boxes. Underline seems to stay as set. The things I set up are applied properly, they just are not remembered by the dialog. Am I doing something wrong?

Phillip

Link to comment
Share on other sites

I´ve chosen entry number 3 because I never used the function popup and didn´t know there were still free entrys.

Thanks for the hint :lmao:

[quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote]

Link to comment
Share on other sites

  • Developers

Thanks Jdeb.  I'll change from .3 to .40.  I changed Tidy setup to save only one backup in the Backup folder (that should be better).

Yes, the lines I added to SciTEUser.properties were between those lines.  I didn't know I couldn't since there is no notation in the file.  Have moved my stuff above the top "-#-#-#-#-#-#" line.  Thanks for the info.

While on the subject, when the SciTE Config dialog opens, it always checks 6 of the Italic boxes, even though I have unchecked some of them.  Same kind of thing with the Bold check boxes.  Underline seems to stay as set.  The things I set up are applied properly, they just are not remembered by the dialog.  Am I doing something wrong?

<{POST_SNAPBACK}>

You are right... its a bug that it keeps the Italic... Will be fixed in next upload

Also changed the start and stop lines to tell ppl not to make changes :

# DO NOT CHANGE ANYTHING BETWEEN THESE LINES #-#-#-#-#-#-#

Thanks for the feedback...

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