Minimise explorer set to open root drive e:

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Gary

Minimise explorer set to open root drive e:

Post by Gary » Fri Apr 18, 2003 8:27 am

Hi
Please help:

Here is my code:
Remark>Activity #1: Load Explorer
// Run program and wait for it to be active
Run Program>C:\Windows\Explorer.exe /e, /root, E:
//Minimise
WindowAction>2

Here is the error:
Specified window "2" Not present. Any subsequent key sends in script may cause exceptions. Abort/ignore.

I have tried instead of WindowAction>2, WindowAction>2,e:\ and WindowAction>2*
as that is the title of the window but I still get the error msg

Thanks/gary

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Fri Apr 18, 2003 6:48 pm

Hi,

WindowAction expects two parameters - the second is the window title. you haven't provided it with the window title. Enter the window title of the window you want to action:

WindowAction>Action,Window_Title
MJT Net Support
[email protected]

Gary

Minimise explorer to open root drive e:\

Post by Gary » Mon Apr 21, 2003 11:05 pm

Hi Support

Thanks for your reply

The last para of my post gave alternate window names I had used. If you start explorer with the command line I suggested you will see the window title is e:\ however minimise command does not work, at least for me

Your further advice would be appreciated

Warm regards/gary

Gary

Minimise explorer to open root drive e:\

Post by Gary » Mon Apr 21, 2003 11:05 pm

Hi Support

Thanks for your reply

The last para of my post gave alternate window names I had used. If you start explorer with the command line I suggested you will see the window title is e:\ however minimise command does not work, at least for me

Your further advice would be appreciated

Warm regards/gary

Guest

Post by Guest » Wed May 21, 2003 12:04 am

Hi Support

Thanks for your reply

The last para of my first post gave alternate window names I had used because when I start explorer on drive e: with the command line parameters, the window title is e:\ however minimise command does not work, at least for me

Your further advice would be appreciated

Warm regards/gary

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Wed May 21, 2003 9:36 am

Hi,

The problem is you are not waiting for the window to appear before attempting to minimise it. Clearly the minimise will fail because at the time it is run the window it is trying to minimise does not yet exist. You should use WaitWindowOpen.

Here's an example which opens Windows Explorer at the c: drive root and then minimises it:

Run>explorer c:\
WaitWindowOpen>c:*
WindowAction>2,c:*
MJT Net Support
[email protected]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts