malj
12 years agoContributor
Saving Picture to File with Spaces in File Name
I am having trouble saving a screenshot with spaces in the file name (in strIDAndType below, taken from a property of an on-screen object in Chrome).
strFileName = "C:\CoverityIssues\" & strIDAndType & ".png"
Sys.Desktop.Picture.SaveToFile(strFileName)
I have tried creating the file name like this but it does not help:
strFileName = """C:\CoverityIssues\" & strIDAndType & ".png"""
Any ideas?
strFileName = "C:\CoverityIssues\" & strIDAndType & ".png"
Sys.Desktop.Picture.SaveToFile(strFileName)
I have tried creating the file name like this but it does not help:
strFileName = """C:\CoverityIssues\" & strIDAndType & ".png"""
Any ideas?
- Try this out (i believe your problem happens because you're using only one slash)
Path = "C:\\folder\\subfolder\\auto tests\\";
Another useful function I found out is this:
// function that executes path that contains space chars
var objShell = new ActiveXObject("shell.application");
objShell.ShellExecute(ficheiro, "", "Path", "open", 1);