Hi ScriptingGuys/All,
I am using the command below to call a custom HTA from within VBScript, and am having real difficulties getting it to launch in centre screen, rather than tucked up in one corner as it currently is!
sCommand = "mshta.exe ""javascript:{new ActiveXObject(""InternetExplorer.Application"")" _& ".putProperty('" & iRandom & "',window); window.resizeTo(" & WidthX & "," & HeightY & ");" _& "window.moveTo(" & ("screen.Width" & - WidthX) & "/2" & "," & ("screen.Height" & - HeightY) & "/2" & ")}"""As you can see, I have the code which I THINK should be there and should work in the 'window.moveTo' statement, but this seems to be ignored completely!
('WidthX' and 'HeightY' are the two parameters passed in when calling the function, that determine the desired size of the window)
If anyone has any suggestions or can point me in the right direction, I'd be very grateful!
Many thanks,
James