
Again many thanks for the solution
image_split = String.SplitPath(Image_input); -- this breaks everypart of the filepath image_split_drive_letter = image_split.Drive; image_split_folder = image_split.Folder; image_split_image_name = image_split.Filename; -- this is the image file name image_split_file_extension = image_split.Extension; -- this the image file extension Image_fullName = image_split_image_name..image_split_file_extension WorkingFolder = image_split_drive_letter..image_split_folder
exeFileBrowse = Dialog.FileBrowse(true, "Locate File", _DesktopFolder, "Executable Files (*.exe)|*.exe|", "", "dat", false, false); --File.Run(exeFileBrowse[1], "", "", SW_SHOWNORMAL, false); image_split = String.SplitPath(exeFileBrowse[1]); -- this breaks everypart of the filepath image_split_drive_letter = image_split.Drive; image_split_folder = image_split.Folder; image_split_image_name = image_split.Filename; -- this is the image file name image_split_file_extension = image_split.Extension; -- this the image file extension Image_fullName = image_split_image_name..image_split_file_extension WorkingFolder = image_split_drive_letter..image_split_folder result = Dialog.Message("Notice", Image_fullName, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
tFiles = Dialog.FileBrowse(true, "Browse", "", "All Files (*.*)|*.*|", "", "", true, false); -- Ensure tFiles contains something, and the user didn't press cancel if tFiles and tFiles[1] ~= "CANCEL" then -- Traverse the table containing the selected file paths for nIndex, sFilePath in pairs(tFiles) do -- Set sText to the filename (without extension) using String.SplitPath sText = String.SplitPath(sFilePath).Filename; sExtn = String.SplitPath(sFilePath).Extension; sFile = sText..sExtn end end
result = File.Run("AutoPlay\\Docs\\go.exe", "write ".. WordDocument[1], "AutoPlay\\Docs", SW_SHOWNORMAL, false);
exeFileBrowse = Dialog.FileBrowse(true, "Locate File", _DesktopFolder, "Executable Files (*.exe)|*.exe|", "", "dat", false, false); File.Run(exeFileBrowse[1], "", "", SW_SHOWNORMAL, false);
WordDocument = Dialog.FileBrowse(true, "Load File", _DesktopFolder, "Microsoft Word Document (*.doc,*.docx)|*.doc;*.docx|All Files (*.*)|*.*|", "", "", false, true); File.Open(WordDocument[1], "", SW_SHOWNORMAL);
Leave a comment: