Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm trying to execute a macro from load script. But I need to pass a string to the macro function. But for some reason, the string is not passed. Here is an example:-
Macro:
function createFile(a)
set fso = CreateObject("Scripting.FileSystemObject")
set s = fso.CreateTextFile("D:\test.txt", True)
s.writeline(a) //it is not wring anything to the file
s.Close()
end function
In the load script:-
LET vTest = createFile("testing script");
Any idea on what is wrong in the script above?
Thanks.
There should be single, not double quotes, around your string.
LET vTest = createFile('testing script');
Also make sure your Module security is set to "Allow System Access".
-Rob
There should be single, not double quotes, around your string.
LET vTest = createFile('testing script');
Also make sure your Module security is set to "Allow System Access".
-Rob
Thanks! It works now. I remember that I tested it with single quote, but it didn't work. So I tried the double quote... weird!