Page 1 of 2

Autosave

PostPosted: Sun Jan 12, 2014 2:20 pm
by ebear
Hello All,

I read the new future development of Neobook Mobile and I cannot await the day to try a Beta version of this product.

One suggestion: "Autosave" of the publication every XX minutes (eg. option in settings)

Why: I have often problems with Neobook hanging/ending, I don't know if I'm the only one who has these problems???? But of cause every time with loss of work.

Best regards,

Eric

Example_:
Image
Image

Re: Autosave

PostPosted: Mon Jan 13, 2014 10:48 am
by Neosoft Support
I don't remember anyone reporting that a very unusual error message before. I did a quick Google search and found a handful of references to similar error messages with other programs. The all seemed to be very isolated instances and the cause or solution was never identified.

Does the error always occur when clicking the full screen editor button?

Are there any specific steps that you can remember that trigger this error, such as accessing the action editor from a plug-in dialog box?

Re: Autosave

PostPosted: Mon Jan 13, 2014 1:36 pm
by ebear
Hello Dave,

This happens every time when I open the full screen editor, but I have Neobook installed on a new Notebook with windows 8.1, it is a very clean system with only the really needed things installed.
Before on my Windows 7 PC there was another problem also with the full screen editor. The editor opened normal, but if I did right click Word Wrap and then maximized the screen Neobook also crashed.

EDIT..... The problem on Windows 8.1 is the same as I described before on my Windows 7 system, Word Wrap crashes Neobook. This behavior I experienced on all the PC's in the past I had Neobook installed (I'm switching often PC systems)


But the main question was to implement in a new Neobook version the Autosave @ xx minutes, this will help also when external reasons (Power loss etc) ends Neobook.

I thought I was smart and....
I tried to develop a little app with Neobook started in a Run in Rectangle, with a timer and a sendkeys Ctrl-S, but Neobook doesn't run in a rectangle :(

Dave thanks for your quick reaction.

Regards,

Erc

Re: Autosave

PostPosted: Mon Jan 13, 2014 1:53 pm
by ebear
Hello Dave,

Please see also pictures below. I tried some things: I start the editor for "Page Enter Actions"

1. Start full screen editor with word wrap off, no problem,
2. Start full screen editor with word wrap on, Neobook crashes,
3. Switch in full screen word wrap on, no probem,
4. Maximize full screen editor with word wrap on (1920x1080) see effect on image 4

Images 1.
Image

Images 2/3.
Image
Image

Image 4.
Image

Reagrds,

Eric

Re: Autosave

PostPosted: Tue Jan 14, 2014 10:34 am
by Neosoft Support
Fortunately/unfortunately, I cannot reproduce the problem here.

Can you try shutting down NeoBook and renaming the following registry section:

HKEY_CURRENT_USER\Software\NeoSoft\NeoBook 5

Then restart NeoBook and try to reproduce the problem again.

Re: Autosave

PostPosted: Tue Jan 14, 2014 11:59 am
by mishem
There is a problem.
Maybe I'm doing other things, but I have another error.
In the video in more detail.

Re: Autosave

PostPosted: Tue Jan 14, 2014 12:32 pm
by ebear
Hello Misem and Dave,

Misem the problem is the same as I over here expire. I have also the "invalid pointer" errors. Futher I found out that the crash only takes place at starting the editor with word wrap in fullscreen on my Full HD monitor. On my notebook screen I have the same errors as you displayed in your video, but Neobook doesn't crash that quick.
I lost a few times a lot of work because of these crashes, and for this i started this tread to have a autosave in a future version. Even after a Crash my pub was damaged????

Regards,

Eric

Re: Autosave

PostPosted: Wed Jan 15, 2014 10:59 am
by Neosoft Support
I'm still not able to reproduce this problem. I tried to mimic the steps shown in the video, but I'm not seeing any error messages or other problems.

mishem:

I see that you're using a Russian translation of NeoBook, which is not an official version. Can you try installing the official English version from www.neosoftware.com/nbwdownload.html and see if that version behaves any differently for you?

Eric:

Did you try renaming the registry section?

Re: Autosave

PostPosted: Wed Jan 15, 2014 1:09 pm
by ebear
Hello David,

Yes I did the registry rename, the problem is the same with Word Wrap. David this is nothing new I remember I had this problem from the beginning when I started with Neobook, in the mean time I went from Windows XP, Windows 7 Pro to Windows 8.1 on 4 or 5 different PC systems and the problem was always the same. I didn't maximize the window after I worked out where the problem was.
I came up with this because a lot of work I lost due to this in a big project I'm working on, and this gave me the idea to have a Autosave function. (When you are in the fight with coding you forget to do sometimes Ctrl-S :oops: )

The first thing I tried to build a "shell" for Neobook with a Ctrl-S SendKeys timer, but I found out that NeoBook don't want to run in a Rectangle :( .

The whole thing is not about the problem I have with Word Wrap, its about a AutoSave function would be in General a good option as I already wrote before eg. power loss.

Regards,

Eric

Re: Autosave

PostPosted: Wed Jan 15, 2014 1:15 pm
by dec
Hello,

Two things, Eric. Firstly, fortunatelly/unfortunatelly I can't reproduce the problem here. But on the other hand I never get an error like this using NeoBook. I suggest a clean installation. Maybe you can do it above the current installation in order to do not loss your current installation features like plugins, etc. On the other hand, I will take a look if I can add something like you "Autosave" suggestion into my npTool plugin. I can't promise nothing but at the least I want to try it.

Re: Autosave

PostPosted: Wed Jan 15, 2014 1:36 pm
by mishem
I see that you're using a Russian translation of NeoBook, which is not an official version

By the way ...
Very high quality translation that does not touch the application files. It can be installed and removed without affecting the core files.
Image
I think you could add it on your site. Tested on many systems, and any errors immediately corrects Peter.

On the topic ...
Removed the translation and program. I downloaded and reinstalled. Clean install without any plug-ins and add-ons.

While little code in the editor. There are no errors.
Besides that text wraps, although this should not be done. Enough free space.
If a lot of code, there are errors.

More details inthe video.

I can lay out your project that you could try to more accurately reproduce the error.

Tried to add a new project in the subroutine section just a lot of text. The error is not repeated.

So immediately understand and predict the error can not be. :(

Re: Autosave

PostPosted: Wed Jan 15, 2014 1:41 pm
by mishem
I will take a look if I can add something like you "Autosave" suggestion


There are several problems.
1. Get window title pub it in my third level.
2. Can be opened simultaneously 2-3-5 projects.

This at first glance. So far, so anymore. :(

Re: Autosave

PostPosted: Wed Jan 15, 2014 1:53 pm
by mishem
Code: Select all
:Polygon_Left_Click
    dbpFind "Collage" "Tabl" "Name_Object" "[Self]" "ExactMatch=No;CaseSensitive=No"
Return

:Polygon_Right_Click
    dbpShowErrors "No"
    dbpFind "Collage" "Tabl" "Name_Object" "[Self]" "ExactMatch=No;CaseSensitive=No"
    GetMousePos "[x]" "[y]"
    GetObjectInfo "Menu" "Width" "[Menu_Width]"
    GetObjectInfo "Menu" "Height" "[Menu_Height]"
    If "[y]+[Menu_Height]" ">" "[PubHeight]"
        SetVar "[y]" "[y]-[Menu_Height]"
    EndIf
    If "[x]+[Menu_Width]" ">" "[PubWidth]"
        SetVar "[x]" "[x]-[Menu_Width]"
    EndIf
    MoveObject "Menu" "[x]" "[y]"
    ObjectToFront "Menu"
    ShowObject "Menu" "None" "0"
    MenuEx "[x]+[Menu_Width]-1" "[y]+2" "  " "[menu_result]" "1" "1"
    If "[menu_result]" "=" "0"
        ClickMouse
        HideObject "Menu" "None" "0"
        ClearVariables "x,y,Menu_Width,Menu_Height,menu_result"
    endif
Return

:Polygon_Mous_Enter

Return

:Polygon_Mous_Exit

Return

:Polygon_Drag_Drop
    dbpFind "Collage" "Tabl" "Name_Object" "[Self]" "ExactMatch=No;CaseSensitive=No"
    SetVar "[Collage.Tabl.Coordinate_Left]" "[DropX]"
    SetVar "[Collage.Tabl.Coordinate_Top]" "[DropY]"
    IfEx "[MenuItem3]<>[#34][#34] and [DropX]<160"
        SetVar "[Collage.Tabl.Coordinate_Left]" "160"
        MoveObject "[Collage.Tabl.Name_Object]" "160" "[Collage.Tabl.Coordinate_Top]"
        SetVar "[DropAccept]" "False"
    EndIf
Return

:ADD_Image
    Loop "1" "50" "[i]"
        GetObjectInfo "Polygon[i]" "FileName" "[Result]"
        If "[Result]" "=" ""
            ExitLoop
        EndIf
    EndLoop

    If "[Result]" "<>" ""
        AlertBox "Внимание" "Вы исчерпали допустимый лимит изображений!"
        Return
    EndIf

    HideObject "Polygon[i]" "None" "0"

    FileOpenBox "Открыть" "Файлы изображений|*.bmp;*.jpg;*.png;*.gif;*.mng;*.jng;*.dds;*.tga;*.jp2;*.psd;*.img;*.pgm;*.ppm;*.pam;*.pfm|Все файлы|*.*" "[LastDir]" "[OpenNameFile]" ""
    If "[OpenNameFile]" "=" ""
        Return
    EndIf
    CustomWindow "" "-1" "-1" "Container6" "NoBorder"
   
    SetVar "[NameFile]" "[TempDir]Image drag-and-drop editor\Polygon[i].png"

    npConvertirImagen "[OpenNameFile]" "[NameFile]"
   
    hpwImageSize "[NameFile]" "[Width]" "[Height]"

    HideObject "Determination_Pixel" "None" "0"
    SizeObject "Determination_Pixel" "[Width]" "[Height]"
    hpwImageCreate "Determination_Pixel" "" "" "" "" "" "" ""

    ShowErrors "False"
    hpwImageLoadFromFile "Determination_Pixel" "[NameFile]" "0" "0" "" ""
   
    If "[LastError]" "<>" ""
        AlertBox "Ошибка" "Невозможно открыть файл [OpenNameFile].|Не поддерживаемый формат файла, или он поврежден."
        ShowErrors "True"
        ClearVariables "OpenNameFile,Result,NameFile,i"
        CloseCustomWindow "Container6"
        Return
    EndIf
    ShowErrors "True"
    hpwImageGetColor "Determination_Pixel" "0" "0" "RGB" "[Color_Pixel]"
    hpwImageDelete "Determination_Pixel"
   
    IfEx "[Width]>=[PubWidth] or [Height]>=[PubHeight]"
        If "[Width]" ">" "[Height]"
            Math "[Width]/[Height]" "-1" "[Result]"
            SetVar "[Width]" "[PubWidth]-160"
            Math "[Width]/[Result]" "0" "[Height]"
        Else
            Math "[Height]/[Width]" "-1" "[Result]"
            SetVar "[Height]" "[PubHeight]-160"
            Math "[Height]/[Result]" "0" "[Width]"
        EndIf
        npTamanyoImagen "[NameFile]" "[NameFile]" "[Width]" "[Height]"
     EndIf

    IfEx "[Color_Pixel]<>255,255,255"
        SizeObject "Determination_Pixel" "[Width]+10" "[Height]+10"
        hpwImageCreate "Determination_Pixel" "" "" "" "" "" "" ""
        hpwImageFloodFill "Determination_Pixel" "0" "0" "clWhite"
        hpwImageLoadFromFile "Determination_Pixel" "[NameFile]" "5" "5" "0" ""
        hpwImageColorSwap "Determination_Pixel" "5" "5" "[Width]+4" "[Height]+4" "clWhite" "$00FAFAFA"
        hpwImageSaveToFile "Determination_Pixel" "[NameFile]" "0" "0" "[Width]+10" "[Height]+10"
        hpwImageDelete "Determination_Pixel"
    EndIf
   
    CloseCustomWindow "Container6"
   
    SetObjectFileName "Polygon[i]" "[NameFile]"
    MoveObject "Polygon[i]" "200" "10"
    ShowObject "Polygon[i]" "None" "0"
    ObjectToFront "Polygon[i]"

    dbpLast "Collage" "Tabl"
    If "[Collage.Tabl.ICO]" "<>" ""
       dbpAddRecord "Collage" "Tabl"
    EndIf
   
    If "[Width]" ">" "[Height]"
        Math "[Width]/[Height]" "-1" "[Result]"
        SetVar "[Width]" "32"
        Math "32/[Result]" "0" "[Height]"
    Else
        Math "[Height]/[Width]" "-1" "[Result]"
        SetVar "[Height]" "32"
        Math "32/[Result]" "0" "[Width]"
    EndIf
   
    npTamanyoImagen "[OpenNameFile]" "[TempDir]ico.png" "[Width]" "[Height]"
    SetVar "[Collage.Tabl.ICO]" "[TempDir]ico.png"
    SetVar "[Collage.Tabl.Name_Object]" "Polygon[i]"
    SetVar "[Collage.Tabl.Denomination]" "Изображение[i]"
    SetVar "[Collage.Tabl.Coordinate_Left]" "200"
    SetVar "[Collage.Tabl.Coordinate_Top]" "10"
    SetVar "[Collage.Tabl.INput_File]" "[OpenNameFile]"
    SetVar "[Collage.Tabl.Output_File]" "[NameFile]"
    SetVar "[Collage.Tabl.Name_File]" "[NameFile]"
    hpwImageSize "[NameFile]" "[Collage.Tabl.OUT_Width]" "[Collage.Tabl.OUT_Height]"
    SetVar "[Collage.Tabl.Transparent]" "[Color_Pixel]"
    dbpRefresh "Collage" "Tabl"
    ClearVariables "Result_Count,npResultadoAccion,Determination_Pixel_MaxX,Determination_Pixel_MaxY,nconvert.exe,i,OpenNameFile,Result,NameFile,Color_Pixel,Width,Height"

Return

:Transparent
    If "[zmMouseCode]" "=" "zmLBU"
        ksGetPixelColor "[zmMouseX]" "[zmMouseY]" "[ColorRGB]"
        ksPrevSystemCursor
        CustomWindow "" "-1" "-1" "Container6" "NoBorder"
          SizeObject "Determination_Pixel" "[Width]" "[Height]"
          hpwImageCreate "Determination_Pixel" "" "" "" "" "" "" ""
          hpwImageLoadFromFile "Determination_Pixel" "[TempDir]TempTransparent.png" "0" "0" "0" ""
          hpwImageColorSwap "Determination_Pixel" "0" "0" "[Width]" "[Height]" "[ColorRGB]" "clWhite"
          hpwImageSaveToFile "Determination_Pixel" "[TempDir]TempTransparent.png" "0" "0" "[Width]" "[Height]"
          hpwImageDelete "Determination_Pixel"
          SetObjectFileName "[Collage.Tabl.Name_Object]" ""
          SetObjectFileName "[Collage.Tabl.Name_Object]" "[TempDir]TempTransparent.png"
          dbpRefresh "Collage" "Tabl"
          EnableObject "ICO"
          RefreshObject "ICO"
          npLiberarPanelZoom "Rectangle2"
        CloseCustomWindow "Container6"
        zmDelMouseMonitor
    EndIf
Return

:Update_Object
    HideObject "[Collage.Tabl.Name_Object]" "None" "0"
    SetObjectFileName "[Collage.Tabl.Name_Object]" ""
    SetObjectFileName "[Collage.Tabl.Name_Object]" "[Collage.Tabl.Output_File]"
    ShowObject "[Collage.Tabl.Name_Object]" "None" "0"
Return

:Save_Project
    If "[Result]" "=" "1"
        ExtractFileExt "[SaveFile]" "[Resultat]"
        If "[Resultat]" "<>" ".col"
                ChangeFileExt "[SaveFile]" ".col" "[SaveFile]"
        EndIf
        FileCopy "[TempDir]Image drag-and-drop editor\Без имени.mdb" "[SaveFile]"
    EndIf

    dbpFieldToVar "Collage" "Tabl" "Name_Object" "[Resultat]" "Delimiter=[#13];SkipBlanks=Yes;NoDuplicates=Yes;DelimiterInContext=Leave"
    StrParse "[Resultat]" "[#13]" "[Resultat]" "[Result_Count]"

    Loop "1" "[Result_Count]" "[i]"
        HideObject "[Resultat[i]]" "None" "0"
        MoveObject "[Resultat[i]]" "-10000" "-10000"
        SetObjectFileName "[Resultat[i]]" ""
    EndLoop
 
    DeleteArray "[Resultat]" "All"

    dbpCloseDatabase "Collage"

    FileList "[TempDir]Image drag-and-drop editor\*.*" "Files" "[Resultat]"
    StrParse "[Resultat]" "[#13]" "[Resultat]" "[Result_Count]"
       
    If "[Result_Count]" ">" "0"
       
        Loop "1" "[Result_Count]" "[i]"
            FileErase "[TempDir]Image drag-and-drop editor\[Resultat[i]]"
        EndLoop
           
        DeleteArray "[Resultat]" "All"
    EndIf
Return

Paste this code anywhere.

MANDATORY: You must save the project.

Otherwise, the error does not appear.

Inserted in the button code in the new project.
After saving the project, the error appeared.

Re: Autosave

PostPosted: Wed Jan 15, 2014 2:32 pm
by mishem
But without saving.
True to this project was saved and opened.

I want to draw attention. Installing the program is clean without any plug-ins.

Re: Autosave

PostPosted: Thu Jan 16, 2014 11:40 am
by Neosoft Support
Mishem:

I tried using your code and following the steps in your videos, but I still could not reproduce the problem. The action editor is a library called SynEdit. NeoBook uses an older version of SynEdit, so I checked their bug list and found one related to the word wrap feature. Apparently, an access violation will occur if word wrap is on and the editor's font size is small enough to cause the editor's window to be wider than 255 characters. So I went into NeoBook's Preferences and selected a very small font size (7pt). After that I was able to reproduce your error.

We can incorporate a newer edition of SynEdit into a future NeoBook upgrade. In the mean time, you should be able to avoid this problem, by turning off word wrap or by increasing the action editor's font size.