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

Urs, Steven and W.Bruce

Expand Messages
  • colin2812
    This is my response to you teaching cursor positions. The script should be started in ScriptPad. As W.Bruce taught: scripting is mostly working it out. All
    Message 1 of 4 , Mar 1, 2002
    • 0 Attachment
      This is my response to you teaching cursor positions.
      The script should be started in ScriptPad.
      As W.Bruce taught: scripting is mostly working it out.
      All this from a mathematician! so what should we expect? :-)
      Your critique is most welcome.
      Thank you all ver ymuch for you teaching.
      Regards,
      Colin

      {lookforini :: /&runtimeInit[]
      /&varSet@ [$1, 0]
      /&varSet@ [$2, 0]
      /&script[@@lookforscript@@] }
      {lookforscript ::
      ©f^\{.+:: ©R©f /&script[@@savend2@@] }
      {cp :: ©c©o©p/0x0a ©M }
      {again :: ©g /&script[@@savend2@@] }
      {finish :: /&mess [@@ending@@,,100] }
      {savend2 ::
      /! /$S /&varSet@ [$2, $$]
      /&ifScript@ [$2 == $1, @@finish@@]
      /&varSet@ [$1, $2]
      /&script [@@cp@@] /&script [@@again@@] }
    • ebay_id_buytxn
      ... Colin: I was prompted by your excellent pScript to customize it to meet my personal preferences! ;-) Here is my longer, Bruce-ified version. I added
      Message 2 of 4 , Mar 3, 2002
      • 0 Attachment
        --- In peditors@y..., "colin2812" <cmartin10@b...> wrote:
        > This is my response to you teaching cursor positions.
        > The script should be started in ScriptPad.
        > As W.Bruce taught: scripting is mostly working it out.
        > All this from a mathematician! so what should we expect? :-)
        > Your critique is most welcome.
        > Thank you all ver ymuch for you teaching.
        > Regards,
        > Colin
        >
        > {lookforini :: /&runtimeInit[]
        > /&varSet@ [$1, 0]
        > /&varSet@ [$2, 0]
        > /&script[@@lookforscript@@] }
        > {lookforscript ::
        > ©f^\{.+:: ©R©f /&script[@@savend2@@] }
        > {cp :: ©c©o©p/0x0a ©M }
        > {again :: ©g /&script[@@savend2@@] }
        > {finish :: /&mess [@@ending@@,,100] }
        > {savend2 ::
        > /! /$S /&varSet@ [$2, $$]
        > /&ifScript@ [$2 == $1, @@finish@@]
        > /&varSet@ [$1, $2]
        > /&script [@@cp@@] /&script [@@again@@] }


        Colin:

        I was prompted by your excellent pScript to "customize" it to meet my
        personal preferences! ;-) Here is my longer, "Bruce-ified"
        version. I added some comments for clarification. Enjoy! BTW,
        those symbols on the corners of the comment-headers are diamonds, and
        the horizontal bars are made with the "long" dash, so that they look
        nicer. I really am anal, aren't I? ;-)

        <---snip---snip---BEGIN PSCRIPT:---snip---snip--->

        //———————————————————
        //| flush (R.T.Init): |
        //———————————————————
        //flush pScript:
        // Flushes all event Qs.
        {flush::
        /&runtimeInit[]
        }

        //——————————————————
        //| DS (Date-stamp): |
        //——————————————————
        //pmDS MACRO:
        //Prints:
        //YYYY-MM-DD HH:MM:SS (Day,Month-DD,HH:MM[am,pm])<newline>
        //This takes 41 bytes!
        #pmDS BEGIN[
        /dY-/dM-/dD/xs
        /dH:/dN:/dS/xs
        (/Ed,/Em-/dD,
        /di:/dN/da)/0x0A
        ]NIGEB

        //——————————
        //| listing: |
        //——————————
        {listing::
        /*Enable GMM:*/
        /GZ
        /*Runtimeinit:*/
        /&script@ [@@flush@@]
        /*Init. variables:*/
        /*$0 is function cntr.*/
        /*$1 is last cursor pos.*/
        /*$2 is new cursor pos.*/
        /&varSet@ [$0, 0]
        /&varSet@ [$1, 0]
        /&varSet@ [$2, 0]
        /*Listview from anywhere:*/
        ''o''o /*Letter "Oh"s!*/
        /*New memo:*/
        ''n
        /*Part of title:*/
        scriptPad/xslisting/xs
        /*Continuation:*/
        /&script [@@listing1@@]
        }
        //——————————
        {listing1::#PM
        /*My time-stamp:*/
        #pmDS /*41 bytes!*/
        /xn
        /*Back to scriptPad:*/
        ''M
        /*Continuation:*/
        /&script [@@listing2@@]
        }
        //——————————
        {listing2::
        /*Start search:*/
        ''jh''f^\{.+::''R''f
        /*Start looping:*/
        /&script [@@savend2@@]
        }
        //——————————
        {paste::
        /*Paste # and name:*/
        /&varPrint@ [$0]
        :/xs''p
        /*Delete "::":*/
        /0x08/0x08
        /*Jump to start of name:*/
        ''jbOw /*Letter "Oh"!*/
        /*Delete "{":*/
        /0x1D/0x08
        /*Put in newline:*/
        ''E/xn
        /*Back to scriptPad:*/
        ''M
        /*Go to next function:*/
        ''g
        /*Continue looping:*/
        /&script [@@savend2@@]
        }
        //——————————
        {paste0::
        /*See comments in "paste"*/
        /*Same, but leading zero:*/
        0 /&varPrint@ [$0]
        :/xs''p/0x08/0x08''jbOw /*Letter "Oh"!*/
        /0x1D/0x08''E/xn
        ''M
        ''g
        /&script [@@savend2@@]
        }
        //——————————
        {paste00::
        /*See comments in "paste"*/
        /*Same, but 2 leading zeros:*/
        00 /&varPrint@ [$0]
        :/xs''p/0x08/0x08''jbOw /*Letter "Oh"!*/
        /0x1D/0x08''E/xn
        ''M
        ''g
        /&script [@@savend2@@]
        }
        //——————————
        {finish::
        /*Finished!:*/
        ''o /*Letter "Oh"!*/
        /*Jump to 2nd line:*/
        ''j2l
        /*Continuation:*/
        /&script [@@finish2@@]
        }
        //——————————
        {finish2::
        /*Print # scripts:*/
        /&varPrint@ [$0]
        /xsfunctions/xsin/xs
        scriptPad:/xn
        /*End in Listview:*/
        ''o /*Letter "Oh"!*/
        /&mess [@@END!@@,,250]
        /*Disable GMM:*/
        /0x04
        }
        //——————————
        {savend2::
        /*Ending cursor position:*/
        /! /$S
        /*Put into $2:*/
        /&varSet@ [$2, $$]
        /*if $1==$2, done:*/
        /&ifScript@ [$2==$1, @@finish@@]
        /*Last pos. = new pos.:*/
        /&varSet@ [$1, $2]
        /*Inc. function cntr:*/
        /&varAdd@ [$0, 1]
        /*Copy name and leave:*/
        ''c''o /*Letter "Oh"!*/
        /*Paste function name and*/
        /*number with leading zeros:*/
        /&ifScript f [$0>99, @@paste@@]
        /&ifScript f [$0>9, @@paste0@@]
        /&script [@@paste00@@]
        }

        <---snip---snip---END OF PSCRIPT!---snip---snip--->

        I'm submitting from home through Yahoo, that's why my name looks
        different!

        Bruce.
        (a.k.a. W. Bruce Maguire II)
      • colin2812
        i am suitably humbled. Colin
        Message 3 of 4 , Mar 3, 2002
        • 0 Attachment
          i am suitably humbled.

          Colin
        • W. Bruce Maguire II
          Colin: Nonsense! The genius is in the idea. In this case, I m like the stereotypical Japanese---I take the new technology and refine it for production! ;-)
          Message 4 of 4 , Mar 4, 2002
          • 0 Attachment
            Colin:

            Nonsense! The genius is in the idea. In this case, I'm like the
            stereotypical Japanese---I take the new technology and refine it for
            production! ;-) It was a fun distraction for a while yesterday.

            Oh, and SHEESH! I forgot something VERY IMPORTANT!
            ---------------------------------------------------

            I use LapTopHack, and so I DOUBLE-ESCAPE all pedit commands (since I use
            the same <Esc> character for LTH and pedit). My <Esc> character is the
            single-quote mark, "'". I was going to do a search-and-replace before I
            posted, but forgot. Anyone who wants to try the script will need to modify
            it for their own choice of the escape character:

            Search for: ''

            Replace with: <Esc> <--your own escape character.

            Thanks,
            Bruce.



            At 03:51 AM 3/4/02 +0000, you wrote:
            >i am suitably humbled.
            >
            >Colin

            --
            +---------------------+
            | W. Bruce Maguire II |
            | maguire@... |
            +---------------------+
          Your message has been successfully submitted and would be delivered to recipients shortly.