Please help - main script file is corrupted Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
MIRKOSOFT
Posts: 334
Joined: 23 Sep 2014, 14:29

Please help - main script file is corrupted

17 Mar 2018, 20:51

Hi!

Title of this thread is something worst what happened me ever.
Main script was correctly running and I tried to modify it to use code from help in other thread - but editor reports error:

Code: Select all

---------------------------
Notepad3
---------------------------
Error loading "D:\Commodore\Commodore 128\VICE NEW\KeyboardDriver\HotKey\pc.ahk".
Data error (cyclic redundancy check).
---------------------------
OK   
---------------------------
I tried to edit by Notepad++ and binary editor - program freezes or reports error that is not possible to read it.
Why is it so big problem?
Main script has more than 12 000 lines of code.

I tried to copy it to other location - impossible - possible is only rename it.
I rebooted computer and this I never had to do - at startup script starts not.
So, I was searching web for repairing corrupted text files and found many DOC, DOCX or PDF items.

Really don't know what happened.

Knows anyone any tool how to fix it?
Or is it gone?

Please help me, last bakup is from February and it is missing many components - I'm working on script each day.

Thank you for each word in reply.
Miro
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Please help - main script file is corrupted

18 Mar 2018, 04:12

Well, probably your whole data is at risk: https://www.google.de/search?q=data+err ... +drive+fix

:?:

PS. Editors (like Notepad2/SciTE) offer a backupcopy-file option! Go for that.
MIRKOSOFT
Posts: 334
Joined: 23 Sep 2014, 14:29

Re: Please help - main script file is corrupted

19 Mar 2018, 12:35

So, I tried CRC repair tool iSkysoft Data Recovery and it found few files in directory as poor, but my pc.ahk was not in list even when I used deep scan...

I try else SciTE 'cause I'm using Notepad3 for all files which using Notepad - I used Notepad Replacing Tool which leaves user select Notepad replacement application.

Miro
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Please help - main script file is corrupted

19 Mar 2018, 13:20

MIRKOSOFT wrote:So, I tried CRC repair tool iSkysoft Data Recovery and it found few files in directory as poor, but my pc.ahk was not in list even when I used deep scan...

I try else SciTE 'cause I'm using Notepad3 for all files which using Notepad - I used Notepad Replacing Tool which leaves user select Notepad replacement application.

Miro
It's not about an editors string-replacement-feature, it's about the option to auto-create a copy of your last/recently changed file. So you will have a backup copy of your script every time you've edited it.
gregster
Posts: 8930
Joined: 30 Sep 2013, 06:48

Re: Please help - main script file is corrupted

19 Mar 2018, 13:25

But a CRC error might still affect your automated backups, I suppose, as long it is on the same hard drive. So, it doesn't free you from regular backups on an external drive. The lack of these backups seems to be the bigger problem here: " last bakup is from February and it is missing many components - I'm working on script each day"
MIRKOSOFT
Posts: 334
Joined: 23 Sep 2014, 14:29

Re: Please help - main script file is corrupted

19 Mar 2018, 13:34

I'm using 6 harddisks and one with single partition is for backup data. There I'm placing backups and there are also AHK script backups.
Problem is that I didn't it long time and last backup works.
Current damaged file is on other disk and when you're talking about auto backups - Q: is possible to let AutoHotKey automatic backupping?
File found as poor are not important or very old backups from years 2014and 2015.
Damaged file is not posible to open, so I'm going to try SciTE and will see...

Miro
MIRKOSOFT
Posts: 334
Joined: 23 Sep 2014, 14:29

Re: Please help - main script file is corrupted

19 Mar 2018, 14:39

I tried to open it with SciTE and it was long waiting and result was empty file.
Really is not empty and contains data.
I'm using XYplorer and have licensed Xplorer² too - they providing preview - other AHK files correctly, but this file both displays: Preview is not available.

Really I try maybe disk editor or so.
Have you any idea about other fix? Something like file CRC repair tool?
Miro
Guest

Re: Please help - main script file is corrupted

19 Mar 2018, 15:18

If you still have your script running: Recover deleted but still running AHK script
https://autohotkey.com/board/topic/5586 ... hk-script/

Re backups: follow the The 3–2–1 backup rule:
- Keep 3 copies of your data
- Use 2 different storage devices to backup your data
- Have 1 backup offsite

Given the many (possible) complications re backups I wouldn't rely on AutoHotkey but a dedicated backup program which will take care of it for you, set it up correctly and then you can "forget about it" until you need it.
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Please help - main script file is corrupted

19 Mar 2018, 16:14

And another rule when it comes to data forensic, create a few copies of the corrupted file to play with bc you can't be sure if whatever tool will damage your original file even further until you've found the right one.
MIRKOSOFT
Posts: 334
Joined: 23 Sep 2014, 14:29

Re: Please help - main script file is corrupted

19 Mar 2018, 16:48

Problem is that corrupted file
1. is not possibleto open
2. is not possible generate preview in Explorer replacements
3. is not possible to copy
4. is not possibleto use Hex Editor buiit-in Properties menu
It is possible only rename and script is not running now - sadly I reboot computer...

Miro
MIRKOSOFT
Posts: 334
Joined: 23 Sep 2014, 14:29

Re: Please help - main script file is corrupted

20 Mar 2018, 21:54

This night last attempt was using Recuva.
When I selected to save selected file it reports this message:
Image

Exist any context menu CRC fix tool or is anything possible?

Miro
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Please help - main script file is corrupted

20 Mar 2018, 22:56

Did you not try CHKDSK? If you can't repair the file, unless the entire sector is damaged, you should be able to use a HDD manager to dump the relevant sector on a binary level. You should then be able to restore the non-damaged parts of the file manually, but parts not present will be permanently lost. I'd recommend checking the entire disk for block errors, as to not lose any more data in the case of a failing HDD.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
MIRKOSOFT
Posts: 334
Joined: 23 Sep 2014, 14:29

Re: Please help - main script file is corrupted

20 Mar 2018, 23:05

Ok, Ivtry it.
But how to find relevant sectors?

Thank you very much
Miro
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Please help - main script file is corrupted

20 Mar 2018, 23:27

You'll have to do a header search. I've never actually done one myself, but with a quick search, this could be a starting point for you: https://www.youtube.com/watch?v=UoqC_-aacgo
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
MIRKOSOFT
Posts: 334
Joined: 23 Sep 2014, 14:29

Re: Please help - main script file is corrupted

07 Apr 2018, 13:56

I tried all - nothing helped - I must to try to make image of partition and try to use it on virtual machine, but I think it helps not..

Have anybody any idea?

Miro
TinyDancer

Re: Please help - main script file is corrupted

07 Apr 2018, 14:02

what happens if you try to compile the file into an exe?

can you upload the ahk file somewhere?
MIRKOSOFT
Posts: 334
Joined: 23 Sep 2014, 14:29

Re: Please help - main script file is corrupted

07 Apr 2018, 14:40

Compilation result is ceated, but if I try to start it, it does norhing.

Upload Itried after your Q to my domain and result is same like copying - CRC error.

Miro
TinyDancer

Re: Please help - main script file is corrupted

07 Apr 2018, 15:11

MIRKOSOFT wrote:Compilation result is ceated, but if I try to start it, it does norhing.

Upload Itried after your Q to my domain and result is same like copying - CRC error.

Miro
what happens if you select to unzip that exe you created, give it a try
also try rebooting in safe mode then right click on the ahk file and select to open with notepad
MIRKOSOFT
Posts: 334
Joined: 23 Sep 2014, 14:29

Re: Please help - main script file is corrupted

07 Apr 2018, 16:53

Extracting EXE helped not - archive contains nothing, so it means that file was not really compiled for CRC error.

Opening in Notepad in safe mode reports this error:
Notes error.png
Notes error.png (3.97 KiB) Viewed 2377 times
So, what really to do?

Miro
MIRKOSOFT
Posts: 334
Joined: 23 Sep 2014, 14:29

Re: Please help - main script file is corrupted

08 Apr 2018, 01:26

So, I found Raw folder/file copier and copied corupted file.

It loks not good, it must to be used original, but here's:
pc.ahk
(208.03 KiB) Downloaded 26 times
I'm not sure if it helps. It was my last attempt to do anything, have anybody any idea?

Miro

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 153 guests