Loading ...
Sorry, an error occurred while loading the content.

^!Keyboard malfunction

Expand Messages
  • Roy Herring
    I don t know if I have a Windows problem or Notetab problem, but the only solution is to reboot. I have tried exiting Notetab and bring it back up, but that
    Message 1 of 5 , Jan 3, 2005
    • 0 Attachment
      I don't know if I have a Windows problem or Notetab problem, but the only solution is to reboot. I have tried exiting Notetab and bring it back up, but that doesn't help.
      I was wandering if someone else has had a similar problem and has found a better way of correcting it rather than rebooting. It happens about once every 5 days.

      The problem seems to be any ^!Keyboard command that pastes info into a menu.

      One of my examples is:
      ^!Keyboard SHIFT+CTRL+M #0# TAB #10# ENTER
      Manually doing SHIFT+CTRL+M #0# TAB #10# ENTER still works.

      Input:
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

      Output:
      Normally it works fine and reformats the lines at 10 cols.
      When the problem occurs, it doesn't reformat but pastes the 0 and 10, like this:
      0 10
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

      Thanks,
      Roy



      [Non-text portions of this message have been removed]
    • Jody
      Hi Roy, ... The problem is because the dialog is not open before the numbers are inserted into it. You could add delay (&nnn) inside the ^!Keyboard command to
      Message 2 of 5 , Jan 3, 2005
      • 0 Attachment
        Hi Roy,

        >The problem seems to be any ^!Keyboard command that pastes info into a menu.

        The problem is because the dialog is not open before the numbers
        are inserted into it. You could add delay (&nnn) inside the
        ^!Keyboard command to attempt to fix it.

        ^!Keyboard SHIFT+CTRL+M &150 #0# TAB &10 #10# ENTER

        The reason, most likely, that it is intermittently failing is
        because you are getting lower on resources or higher cpu activity
        when you run it. It is slowing down the opening of the dialog so
        the Clip is inserting the 0 and 10 directly into the document,
        because it is what has focus at the time before the Reformat
        dialog opens and gets the focus. When possible, you should stay
        away from the ^!Keyboard command. For the certain task you are
        doing, I would use the method I added below yours.

        >One of my examples is:
        >^!Keyboard SHIFT+CTRL+M #0# TAB #10# ENTER

        StrFormat ^$StrFormat("Str";LeftMargin;TextWidth;Justify)$

        ^!InsertText ^$StrFormat("^$GetSelection$";0;10;0)$

        or

        ^!IfTrue ^$IsEmpty("^$GetSelection$")$ Next else Skip_3
        ^!Select All
        ^!InsertText ^$StrFormat("^$GetSelection$";0;10;0)$
        ^!Goto End
        ^!InsertText ^$StrFormat("^$GetSelection$";0;10;0)$

        ....

        You can maybe get better results than yours using ^!Menu and
        ^!Keyboard, but the above will work the best. In case you cannot
        use something like the above on a task you can try something like:

        ^!Menu Modify/Lines/Reformat Lines
        ^!Delay 5
        ^!Keyboard #0# Tab &10 #10#

        You'll still have the delay problem most likely, but the ^!Menu command
        is better than all Keyboard.

        >Input:
        >aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
        >
        >Output:
        >Normally it works fine and reformats the lines at 10 cols. When
        >the problem occurs, it doesn't reformat but pastes the 0 and 10,
        >like this:
        >0 10
        >aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa


        Happy Clip'n!
        Jody

        www.clean-funnies.com, http://www.fookes.us/maillist.htm

        Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
        UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
        Options: http://groups.yahoo.com/group/ntb-clips
      • abairheart
        ... Hi Jody, This brings up the question of what NoteTab loads into memory, when you load a clip library, or a clip. When NT loads a new library, does it load
        Message 3 of 5 , Jan 4, 2005
        • 0 Attachment
          --- In ntb-clips@yahoogroups.com, Jody <kjv-av1611@e...> wrote:
          ...
          >
          > ... intermittently failing is because you are getting
          > lower on resources or higher cpu activity when you run it.


          Hi Jody,

          This brings up the question of what NoteTab loads into memory, when
          you load a clip library, or a clip.

          When NT loads a new library, does it load all clips in it? Or does it
          wait to load individual clips, as they are run?

          I have mysterious slow-downs in NoteTab, that I'd like to pin on
          something <g>. Some of my libraries seem to slow things down more
          than others.

          If I have many goto labels in a clip, do they eat memory resources?
          Do arrays eat more resources, than individual variables?
          I mean, does an array of 5 elements eat more, than 5 separate
          variables?

          DO INI variables eat memory? or are they reloaded on each use?
          Is it more efficient to use GetValue(INIVarname) than to assign this
          value to a variable?



          One more question: What happens, if a INI variable value contains
          more than the maximum 1024 characters?


          Thanks,


          Abair
        • Jody
          Hi Abair, You must think I m a geek. :-) ... NoteTab loads the whole Library into memory, I think, by what I have written below from the past. It may be a
          Message 4 of 5 , Jan 4, 2005
          • 0 Attachment
            Hi Abair,

            You must think I'm a geek. :-)

            >> The reason, most likely, that it is intermittently failing
            >> intermittently failing is because you are getting lower on
            >> resources or higher cpu activity when you run it.
            >
            >This brings up the question of what NoteTab loads into memory,
            >when you load a clip library, or a clip.
            >
            >When NT loads a new library, does it load all clips in it? Or
            >does it wait to load individual clips, as they are run?

            NoteTab loads the whole Library into memory, I think, by what I
            have written below from the past. It may be a combination of
            both. I say that because I believe the Clips are loaded, but
            obviously not executing until clicked on or called by another
            Clip. I'll ask Eric when he comes up for a breather - he's deep
            in programming now I believe; he's been extremely quite. ;)

            There's also a parsing sequence, from: Help | Help on Clip
            Programming | Parsing and evaluation sequence...

            A. Whole Clip

            1. Comments removed
            2. Date fields evaluated ^[...^] (old format)
            3. Text selection inserted if ^& found
            4. ^!CONTINUE command executed if on first line
            5. Clip wizard based on ^?[...] fields displayed
            6. Mathematical fields evaluated ^$[...] (old format)

            B. Line by line

            1. Variables resolved (from right to left)
            2. Document name using ^*, ^**, ^#, ^## codes resolved
            3. Functions resolved (from right to left)
            4. Clip wizard based on ^?{...} fields in line displayed
            5. Clip Command executed

            >I have mysterious slow-downs in NoteTab, that I'd like to pin on
            >something <g>. Some of my libraries seem to slow things down more
            >than others.

            Some of the things that can slow up NoteTab are RegExp, continuos
            looping, working with files that are large and have a lot of
            highlighting needing screen updating going on, and the following.
            It doesn't play as much of a part as it did on Win98/ME machines
            when RAM wasn't as much on machines as it is today. Win98 is
            super bad about memory leaks.

            Windows has basically three types of memories: RAM, Virtual Memory
            (your hard disk), and a small section of RAM used for storing
            Windows object handles. When Windows runs out of system resources,
            it may have plenty of RAM left, but it runs out of space for storing
            handles. This is often when funny things start happening like the
            tab bar displaying blank tabs, or the Toolbar showing no icons. As
            more and more memory is needed closing the gap of memory available
            errors will start happening, the most common access violations.

            This link (if still good) is to a PC Magazine article about system
            resource problems. It mentions five types of memories:

            http://www.pcmag.com/article2/0,4149,1200792,00.asp

            The following may be helpful as well:

            Display problems is usually the first visible sign of being low
            on the resources it takes to paint the different objects in a
            window. Sometimes, a better video card with more memory can help
            or the latest drivers. More RAM will always help out system
            performance! Windows XP/2000 are very good about releasing
            resources and being able to run more programs simultaneously.

            These are things to check in general. The more the registry gets
            congested, the more fonts that are installed, utilities running in
            the background, the slower programs open in general. Viruses can
            slow programs down loading. Having a lot of programs in your
            startup group or Run keys in the registry. Sometimes doing a
            scandisk and defragment help.

            Only libraries open in the Clipbook window will occupy RAM. The
            more items, and the larger the Clips, the more RAM it uses up.
            Running Clips that create variables will take another chunk from
            RAM. Closing the Clipbook window will free several handles which
            occupy the third type of memory.

            Large amounts of Favorites and long lists slow down the loading
            of NoteTab and use up a fair amount of RAM.

            A large Undo limit size. "Large Undo Limit" is dependant on how
            many documents you open, not necessarily the limit you have
            NoteTab configured for in View | Options | Advanced. It should
            rarely be a problem though if you open less than 50 documents at
            a time.

            A large number of Libraries on the button bar would also take up
            extra resources. Each button requires a Windows handle. Tools
            on the Toolbar and the Clipbar also use the mentioned handles as
            do the document tabs.

            >If I have many goto labels in a clip, do they eat memory resources?
            >Do arrays eat more resources, than individual variables?
            >I mean, does an array of 5 elements eat more, than 5 separate
            >variables?

            Those are all questions for Eric; I don't know myself. It would
            be best to make some test Clips to see for yourself. My
            experience off the top of my head seems to be that arrays do not
            eat up a lot of memory. They all seem to run fast to me and I
            have some huge ones when working with directories. And, when
            speaking of small amounts it is so fast anyway that what memory
            is used is released faster than we can think about it. <g>

            I have found a significant difference in speed when working
            directly in memory with NoteTab when possible over working say
            within a document. Something like ^!SetClipboard ^$StrReplace(...)$
            to me is faster than ^!Replace.

            >DO INI variables eat memory? or are they reloaded on each use? Is
            >it more efficient to use GetValue(INIVarname) than to assign this
            >value to a variable?

            Beats me. ;)

            >One more question: What happens, if a INI variable value contains
            >more than the maximum 1024 characters?

            I don't know. Why don't you test it and let us know. 8D

            After you make some tests, refine your questions and I'll see if
            Eric has the time to answer what you cannot test. I think a lot
            of it can be tested for speed anyway using start and stop times
            since you can get it down to the second. Just make large enough
            operations that they will take a little while to complete.

            Happy Clip'n!
            Jody

            www.clean-funnies.com, http://www.fookes.us/maillist.htm

            Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
            UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
            Options: http://groups.yahoo.com/group/ntb-clips
          • abairheart
            ... You do a good immitation, if you re not. ;) ... OK, I read all your notes, got some good tips, but I still need answers about data limits. The only
            Message 5 of 5 , Jan 5, 2005
            • 0 Attachment
              --- In ntb-clips@yahoogroups.com, Jody <kjv-av1611@e...> wrote:
              > Hi Abair,
              >
              > You must think I'm a geek. :-)

              You do a good immitation, if you're not. ;)


              > >When NT loads a new library, does it load all clips in it? Or
              > >does it wait to load individual clips, as they are run?
              >
              > NoteTab loads the whole Library into memory, I think, by what I
              > have written below from the past.

              OK, I read all your notes, got some good tips, but I still need
              answers about data limits. The only pertinent info I could find in
              the help files was the bit about inidividual INI variable size. I had
              discoverd a variable with over 3000 characters -- and there did not
              seem to be any difference in operation before or after I deleted the
              variable.

              I realize that I will not get answers to all my questions, but if you
              could ask Eric for a list of limitations in those things that a user
              would influence, such as the number of handles, the size of the INI
              file, the number of INI variables, the toal size of user defined INI
              data, the size of a library, the number of variables, and the size of
              variable data.

              If the answers are related to available memory, then by what ratio?

              Finally, which is better -- 1 INI file for all data, or multiple INI
              files, one for each library?


              Thanks,


              Abair.
            Your message has been successfully submitted and would be delivered to recipients shortly.