Link to home
Start Free TrialLog in
Avatar of meuedyn
meuedyn

asked on

automation with VBS

Hello,

I know how to write a script that open an internet explorer window with VBS and set its size, etc... I was wondering how I could do it with other applications in windows.  Mostly, what I need is a way to open up Windows Explorer windows to certain folders and arrange them in a certain way so I organize files (an upload I do every day).

It seems there is a class automation list somewhere that apps have to be added to.  Can someone get me started with a script that will open a windows explorer window to C:\WINDOWS\ and size it to 200x200 and place it at location (0,0) on my screen?  Once I have it, I think I'll be able to change the destination folders, sizes, and locations, etc, to what I really need.  Also, where can I find what options I have available for each application I could startup using VBS?  

Thanks experts!

Avatar of PaulHews
PaulHews
Flag of Canada image

Explorer does not expose any automation objects.  You can make do with some basic command line switches, but you will not be able to move windows around within a VB Script.  This is probably closest to what you are trying to achieve.

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "%windir%\explorer /e,c:\winnt\", 9

>Also, where can I find what options I have available for each application I could startup using VBS?  
Generally that information is available in the online help for that application.  All MS Office applications are capable of being automated for example, and you have the option when installing of installing their VBA help as well so that you can look up the object model.  It is worth noting that most programs do not expose any automation at all.  
SOLUTION
Avatar of PaulHews
PaulHews
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of aelatik
aelatik
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of meuedyn
meuedyn

ASKER

Is there anyway that I can write a script, batch file, whatever, you name it.. that can open up, lets say, notepad, to a specific size and location?  It would be great to double-click a single icon and have 3 apps open into preset window sizes/locations..

-meue
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial