Announcement

Collapse
No announcement yet.

Folder.Find Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Folder.Find Problem

    In Photo are the not functional Code. The Problem is in StartFolder that i replaced with Value from Registry. I have on this the Problem. Its for me no possible way to work. If %TargetFolder% as StartFolder directory not found. In screen i test various variants but no luck. If StartFolder Plaaintext "C:\Programm" the Code works good. If StartFolder replaced with Value not work.

  • #2
    Value readed from Registry i need for order Location of Programm are Installed on Various Diskdrives

    Comment


    • #3
      In Manual StartFolder are BuildIn _SourceFolder. Its a way to create new Variable thats uses Value from Registry as StartFolder for FolderFind?

      Comment


      • #4
        now i test many other variants and all works with build in session variables. but with own created session variable not work. after study manual i correct create custom variable under global functions. For test i call created variable in other screen and display in message. Only self created session variables not work. i total confused about this. with own variable error " argument1 must be type of string" displayed but with original build in variable no problem. Please give me little example for creating own variable thats accepted .

        short piece of working code:

        Folder1 = Folder.DoesExist(_SourceFolder);
        if Folder1 then
        Dialog.Message("......", ".......", MB_OK, MB_ICONINFORMATION);
        else
        Dialog.Message("......", ".......", MB_OK, MB_ICONINFORMATION);
        end

        short piece of non working code:

        Folder1 = Folder.DoesExist(_CustomFolder);
        if Folder1 then
        Dialog.Message("......", ".......", MB_OK, MB_ICONINFORMATION);
        else
        Dialog.Message("......", ".......", MB_OK, MB_ICONINFORMATION);
        end


        CustomFolder are Readout by Registry:

        local ProgrammFolder = Registry.GetValue(HKEY_LOCAL_MACHINE, "Path", "Value", true);

        and Set to SessionVariable

        SessionVar.Set("%CustomFolder%", ProgrammFolder);

        please help me

        Comment


        • #5
          Problem Solved. Variable must expand with (SessionVar.Expand) for correct working of code.

          Comment

          Working...
          X