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

[Clip] Re: More Fun With rundll and rundll32.exe

Expand Messages
  • Eb Guenther
    Hi Jody, I must not have phrased my question right. I understood the clip Eric presented. I did NOT understand why my clip, using the same technique to
    Message 1 of 14 , Apr 1 5:53 AM
    View Source
    • 0 Attachment
      Hi Jody,

      I must not have phrased my question right.
      I understood the clip Eric presented. I did
      NOT understand why my clip, using the same
      technique to populate a prompt string, did not.

      Eric's clip inserted the "|" as list delimiter,
      allowing ^%List% to be used as prompt in a
      Wizard (item1|item2|...).

      My clip, using nearly identical code, except
      for the function that fetched an array, did not.

      Why is that?



      >Hi Eb
      >
      > > Heck of a nifty clip, but how's come "^%List%" in your code:
      >
      >The first %List% is used to remove the path and then the second
      >removes the extension from ^%List% and Capitalizes the names. It
      >is not necessary, but makes for a nicer display in the listbox
      >with only the name. It is easier to choose from like that.
      >
      > >^!Set %Value%=^?{(H=15)Choose CPL program to execute==^%List%}
      > >
      > > gets the new default delimiter, but in _my_ code:
      >
      >It is not suppose to remember; I think you may be confusing it
      >with a Clip from SampleCode: Remember default value:
      >
      >^$SetDefaultValue(^%ValueList%;^%DefaultValue%)$
      >
      >If you wanted to use that it would be better done by hard coding
      >the cpl's into an H= box, but it would only be remembered as long
      >as you had the Library open unless you used the %p_ thingie. <g>
      >You could do it in an ini file saving the last used value, but it
      >sure seems like a lot of code for something you might not use
      >that often.
      >
      > > ^!SetListDelimiter=|
      >
      > > In other words, why does ^!SetListDelimiter work with
      > > ^$GetFiles function, but not with ^$GetValue function?
      >
      >The vertical bar is needed for the format of the listbox. So,
      >when getting the file path\names Eric set the delimiter so that
      >it could be used in the listbox and not the default delimiter.
      >Perhaps this will explain it better:
      >
      >^!Info ^$GetFiles("^$GetSysPath$";"*.cpl")$
      >^!SetListDelimiter=|
      >^!Info ^$GetFiles("^$GetSysPath$";"*.cpl")$
      >
      >H=Execute CPL
      >^!SetListDelimiter=|
      >^!Set
      >%List%=^$StrReplace("^$GetSysPath$";;"^$GetFiles("^$GetSysPath$";"*.cpl")$"
      >;False;False)$
      >^!Set %List%=^$StrCapitalize("^$StrReplace(".cpl";;"^%List%";False;False)$")$
      >^!Set %Value%=^?{(H=15)Choose CPL program to execute==^%List%}
      >^!"rundll32.exe shell32.dll,Control_RunDLL ^%Value%.cpl,,"
      >
      >Happy Clip'n!
      >Jody
      >
      >http://www.sureword.com/notetab
      >
      >Subscribe, UnSubscribe, Options
      >mailto:Ntb-Clips-Subscribe@...
      >mailto:Ntb-Clips-UnSubscribe@...
      >http://www.egroups.com/list/ntb-clips
      >
      >
      >------------------------------------------------------------------------
      >Special Offer-Earn 300 Points from MyPoints.com for trying @Backup
      >Get automatic protection and access to your important computer files.
      >Install today:
      >http://click.egroups.com/1/2344/4/_/2798/_/954550714/
      >
      >eGroups.com Home: http://www.egroups.com/group/ntb-clips/
      >http://www.egroups.com - Simplifying group communications
      >
      < -- end quote --
    • RS
      Hi Eb, ... %List%=^$StrReplace( ^$GetSysPath$ ;; ^$GetFiles( ^$GetSysPath$ ; *.cpl )$ ; False;False)$ ... Just a guess, no time to research myself: Your clip
      Message 2 of 14 , Apr 1 7:50 AM
      View Source
      • 0 Attachment
        Hi Eb,

        At 04/01/00 07:53 AM -0600, you wrote:
        >I must not have phrased my question right.
        >I understood the clip Eric presented. I did
        >NOT understand why my clip, using the same
        >technique to populate a prompt string, did not.


        >^!SetListDelimiter=|
        >;
        >^!Set
        %List%=^$StrReplace("^$GetSysPath$";;"^$GetFiles("^$GetSysPath$";"*.cpl")$";
        False;False)$
        >;
        >^!Set %Value%=^?{(H=15)Choose CPL program to execute==^%List%}
        >
        >gets the new default delimiter, but in _my_ code:
        >
        >^!SetListDelimiter=|
        >^!Set %List%=^$GetValue("Settings:whatever")$
        >^!Set %Value%=^?{(H=15)Choose from the list==^%List%}
        >
        >it does NOT get the new default??


        Just a guess, no time to research myself:

        Your clip is setting %List% with a single value. Eric's assigns a list of
        values with the GetFiles function.




        Regards,

        RS


        ======================================================

        ClipWriter 2.0 - Millenium Edition

        Coming soon


        http://home.att.net/~ptools/ClipWriter/cw.htm

        http://home.att.net/~ptools/main/index.htm




        ======================================================







        ======================================================
      • Eb Guenther
        Hi RS, I understood the clip Eric presented. I did ... Thanks RS, but the ^$GetValue function retrieves a semicolon delimited list from the INI file. It does
        Message 3 of 14 , Apr 1 10:25 AM
        View Source
        • 0 Attachment
          Hi RS,

          I understood the clip Eric presented. I did
          >>NOT understand why my clip, using the same
          >>technique to populate a prompt string, did not.
          >
          >
          > >^!SetListDelimiter=|
          > >;
          > >^!Set
          > %List%=^$StrReplace("^$GetSysPath$";;"^$GetFiles("^$GetSysPath$";"*.cpl")$
          > "; False;False)$
          > >;
          > >^!Set %Value%=^?{(H=15)Choose CPL program to execute==^%List%}
          > >
          > >gets the new default delimiter, but in _my_ code:
          > >
          > >^!SetListDelimiter=|
          > >^!Set %List%=^$GetValue("Settings:whatever")$
          > >^!Set %Value%=^?{(H=15)Choose from the list==^%List%}
          > >
          > >it does NOT get the new default??
          >
          >
          >Just a guess, no time to research myself:
          >
          >Your clip is setting %List% with a single value. Eric's assigns a list of
          >values with the GetFiles function.
          >

          Thanks RS, but the ^$GetValue function retrieves a semicolon
          delimited list from the INI file. It does not matter whether
          I use Get or getArray, the result is NOT "|" delimited, even
          though I specifically SET "|" as delimiter.

          Eric's ^$GetFiles function retrieves a ^%NL% delimited list
          of filenames, which winds up as "|" delimited in %List%.

          This is a neat bit of magic, eliminating the need for a
          separate replacement of ";" with "|", to convert an array
          to a prompt string for a Wizard. But it doesn't work with
          other functions, so far.

          Regards,

          Eb
        • RS
          Hi Eb, ... mmmmmm :( Eric...? Regards, RS ====================================================== ClipWriter 2.0 - Millenium Edition Coming soon
          Message 4 of 14 , Apr 1 11:00 AM
          View Source
          • 0 Attachment
            Hi Eb,

            At 04/01/00 12:25 PM -0600, you wrote:
            >Thanks RS, but the ^$GetValue function retrieves a semicolon
            >delimited list from the INI file. It does not matter whether
            >I use Get or getArray, the result is NOT "|" delimited, even
            >though I specifically SET "|" as delimiter.
            >
            >Eric's ^$GetFiles function retrieves a ^%NL% delimited list
            >of filenames, which winds up as "|" delimited in %List%.
            >
            >This is a neat bit of magic, eliminating the need for a
            >separate replacement of ";" with "|", to convert an array
            >to a prompt string for a Wizard. But it doesn't work with
            >other functions, so far.


            mmmmmm :(

            Eric...? <g>




            Regards,

            RS


            ======================================================

            ClipWriter 2.0 - Millenium Edition

            Coming soon


            http://home.att.net/~ptools/ClipWriter/cw.htm

            http://home.att.net/~ptools/main/index.htm




            ======================================================







            ======================================================
          • Jody
            Hi Eb, Sorry for the misunderstanding and I can only offer a work around now. ... ^!SetListDelimiter=| ^!Set %List%=^$GetValue( Settings:whatever )$ ^!Set
            Message 5 of 14 , Apr 1 4:49 PM
            View Source
            • 0 Attachment
              Hi Eb,

              Sorry for the misunderstanding and I can only offer a work
              around now.

              > I did NOT understand why my clip, using the same
              > technique to populate a prompt string, did not.

              > Why is that?

              ^!SetListDelimiter=|
              ^!Set %List%=^$GetValue("Settings:whatever")$
              ^!Set %Value%=^?{(H=15)Choose from the list==^%List%}

              We cannot set the delimiter in all cases it seems. It is
              ignored below.

              ^!SetListDelimiter=|
              ^!Set %List%=a,b,c,d,e,f,g
              ^!Set %Value%=^?{(H=15)Choose from the list==^%List%}

              Here is a work around:

              ^!SetIniFile DeleteMe
              ^!SaveValue DeleteMe:MeToo=a,b,c,d,e,f,g
              ^!Set %List%=^$StrReplace(",";|;"^$GetValue(DeleteMe:MeToo)$";0;0)$
              ^!Set %Value%=^?{(H=15)Choose from the list==^%List%}
              ^!DeleteFile ^$GetLibraryPath$DeleteMe.ini

              This one works for me because the delimiter is already a vertical
              bar in my saved value list.

              ^!SetIniFile NtbUsers
              ^!Set %List%=^$GetValue(NoteSort:ShortList)$
              ^!Set %Value%=^?{(H=15)Choose from the list==^%List%}

              Happy Clip'n!
              Jody

              http://www.sureword.com/notetab

              Subscribe, UnSubscribe, Options
              mailto:Ntb-Clips-Subscribe@...
              mailto:Ntb-Clips-UnSubscribe@...
              http://www.egroups.com/list/ntb-clips
            • Eb Guenther
              Hi Jody, ... I ve been using something similar to your first workaround, storing arrays in INI files using the default delimiter. Using the V-bar as array
              Message 6 of 14 , Apr 3 6:21 AM
              View Source
              • 0 Attachment
                Hi Jody,


                >Here is a work around:
                >
                >^!SetIniFile DeleteMe
                >^!SaveValue DeleteMe:MeToo=a,b,c,d,e,f,g
                >^!Set %List%=^$StrReplace(",";|;"^$GetValue(DeleteMe:MeToo)$";0;0)$
                >^!Set %Value%=^?{(H=15)Choose from the list==^%List%}
                >^!DeleteFile ^$GetLibraryPath$DeleteMe.ini
                >
                >This one works for me because the delimiter is already a vertical
                >bar in my saved value list.
                >
                >^!SetIniFile NtbUsers
                >^!Set %List%=^$GetValue(NoteSort:ShortList)$
                >^!Set %Value%=^?{(H=15)Choose from the list==^%List%}

                I've been using something similar to your first
                workaround, storing arrays in INI files using the
                default delimiter.

                Using the V-bar as array delimiter still seems a bit
                foreign to me. So your second workaround never occurred
                to me. If you recal, I have a bot of a mental block
                when it comes to array delimiters <G>.

                Thanks for the tip,

                Eb

                --
                Another word for "grin and bare it": "moon".
              • Jody
                Hi Eb, ... hehehe. If you don t think of the delimiters as the standard type you are use to seeing like quotes, tabs, semi-colons, space, and comma, but
                Message 7 of 14 , Apr 3 6:34 AM
                View Source
                • 0 Attachment
                  Hi Eb,

                  >> ^!SaveValue DeleteMe:MeToo=a,b,c,d,e,f,g
                  >> ^!Set %List%=^$StrReplace(",";|;"^$GetValue(DeleteMe:MeToo)$";0;0)$

                  >> This one works for me because the delimiter is already a
                  >> vertical bar in my saved value list.
                  >
                  > I've been using something similar to your first workaround,
                  > storing arrays in INI files using the default delimiter.
                  >
                  > Using the V-bar as array delimiter still seems a bit foreign to
                  > me. So your second workaround never occurred to me. If you
                  > recal, I have a bot of a mental block when it comes to array
                  > delimiters <G>.

                  hehehe. If you don't think of the delimiters as the standard
                  type you are use to seeing like quotes, tabs, semi-colons, space,
                  and comma, but instead think of them as a wild card to separate
                  any kind of list with, then it may come a bit easier. Eric has a
                  Clip in SampleCode I think, might be Utilities, that you can
                  enter a number for the paragraph you want. He uses a double ^p:

                  ^!SetListDelimiter ^p^p

                  ... so each paragraph (separated by a blank line) is one item in
                  the list. ;) Having that kind of flexibility makes it really
                  nice at times, because if we were limited to a few there would be
                  times we would have to modify our delimiter in the document
                  because of conflict with whatever we were allowed to use.

                  Happy Clip'n!
                  Jody

                  http://www.sureword.com/notetab

                  Subscribe, UnSubscribe, Options
                  mailto:Ntb-Clips-Subscribe@...
                  mailto:Ntb-Clips-UnSubscribe@...
                  http://www.egroups.com/list/ntb-clips
                Your message has been successfully submitted and would be delivered to recipients shortly.