Announcement
Collapse
No announcement yet.
Select specific folder in AppData
Collapse
X
-
PHP Code:folder = Shell.GetFolder(SHF_APPLICATIONDATA_LOCAL) .. "\\BendGame"
---test---
Shell.Execute(folder, "explore", "", "", SW_SHOWNORMAL, false);
Leave a comment:
-
Select specific folder in AppData
I'm creating a patch for a game but I need AMS to locate the BendGame folder in AppData But with my code I can only get to: C:\Users\User Name\AppData\Local\
My code:
function FileProgress(Source, Destination, Copied, Total, FileCopied, FileTotal)
-- Set the file name
SplitDest = String.SplitPath(Destination);
soloExt = SplitDest.Extension
soloFile = SplitDest.Filename;
soloFolder = SplitDest.Folder;
stConcat = String.Concat(soloFolder, soloFile);
-- Update progress1
CurrentPGR = Progress.GetCurrentPos("Progress1");
nTotalPercentage = Math.Floor((FileCopied / FileTotal) * 100);
Progress.SetCurrentPos("Progress1", nTotalPercentage);
splittedPath = String.SplitPath(Source);
solofile = splittedPath.Filename;
SetString = "Copiando arquivos "..solofile.." "..nTotalPercentage .." %";
Progress.SetText("Progress1", SetString);
Paragraph.SetText("Paragraph1", "Copiando arquivo "..String.Mid(Source, String.Length(_SourceFolder) + 1, -1));
if Copied == Total then
Progress.SetText("Progress1", "Ativado com sucesso!");
Paragraph.SetText("Paragraph1", "\r\n\r\nCopia Terminada!");
return false;
else
return true;
end
end
ruta = Dialog.FolderBrowse("Selecionar a pasta AppData\Roaming:", Shell.GetFolder (SHF_APPLICATIONDATA_LOCAL))
File.Copy("AutoPlay\\Docs\\SaveGame Days Gone PC\\*.*", ruta, true, true, false, false, FileProgress);
File.Copy("AutoPlay\\Docs\\SaveGame Days Gone PC\\*.*", ruta, true, true, false, false, FileProgress); ---repetiu duas vezes pois o ativador não estava funionando!
Progress.SetCurrentPos("Progress1", 0);Tags: None
Leave a comment: