Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475

    Problems with variable

    Hello everybody

    I'm having some troubles with the following code:
    -------------------------------------------------------------------------
    select_folder = Dialog.FolderBrowse("Please select a folder:", "AutoPlay\\Docs");

    if select_folder == "CANCEL" then
    result = Dialog.Message("Notice", "Canceled by user", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    else
    Flash.SetVisible("Flash1", true);
    File.Copy("AutoPlay\\Docs\\*.*", select_folder, true, true, false, true, Progress)
    Flash.SetVisible("Flash1", false);
    end

    result_file = File.DoesExist("select_folder\\file.txt");

    if result_file == true then
    result = Dialog.Message("Notice", "yes, does exist", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    else
    result = Dialog.Message("Notice", "no, it doesn't", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    end
    --------------------------------------------------------------------
    The idea is after i select the location for the files to be copied, after i want to see if the files really are copied to the path i browsed in the very beginning. So how do i place the variable where the path is stored (select_folder) here
    --------------------------------------------------------------------
    result_file = File.DoesExist("select_folder\\file.txt");
    --------------------------------------------------------------------
    Thank you

  2. #2
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    select_folder is a variable and needs to be concatenated to any strings, like the name of a file for instance.

    your line of code
    Code:
    result_file = File.DoesExist("select_folder\\file.txt");
    should be like this

    Code:
    result_file = File.DoesExist(select_folder .. "\\file.txt");
    Since select_folder is a variable you want to use two periods to combine that variable with the file name, which is a string.

    HTH
    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  3. #3
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475
    Thank you for your time

Similar Threads

  1. INFO: Tips for Debugging Action Lists in AutoPlay Media Studio 4.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-03-2002, 08:38 AM
  2. Check if a variable exists ?
    By jmoisan in forum AutoPlay Media Studio 4.0
    Replies: 4
    Last Post: 09-16-2002, 09:07 AM
  3. PATH environment variable
    By RDodson in forum Setup Factory 6.0
    Replies: 4
    Last Post: 02-27-2002, 12:17 PM
  4. Replies: 1
    Last Post: 11-21-2001, 01:10 PM
  5. Registry Variable Failure
    By ggallo in forum Setup Factory 5.0
    Replies: 3
    Last Post: 08-30-2001, 01:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts