Ctrl-A Problem

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Mark@HOB

Ctrl-A Problem

Post by Mark@HOB » Thu Jun 26, 2003 9:16 am

Hi all,

I am new to Macro Scheduler and am still evaluating it. I have this problem where I set focus to a Windows Explorer Window and then press CTRL+A to select all files in that window. For some reason, the script is generating a CTRL+SHIFT+A sequence. I noticed this because it brings up the ICQ window (which has a CTRL+SHIFT+A shortcut).

I don't use PRESS SHIFT anywhere in the script so I'm really dumbfounded.

The piece of the script involved is:


SETFOCUS>%Folder_Name%
PRESS CTRL
WAIT>1
SEND>A
RELEASE CTRL


I have experimented with different wait times in vain. Also, I stopped the script after the SetFocus command and pressed CTRL-A manualy and THAT worked but obviously I need an automated solution. :(

Mark@HOB

Solved!!!

Post by Mark@HOB » Thu Jun 26, 2003 9:43 am

Solved it.
Apparently since I'm sending a capital A, Macro Scheduler sends CTRL+SHIFT+a. Don't know if that's the right way to do it but I am sending a lowercase 'a' now and it works.

Lumumba

Post by Lumumba » Thu Jun 26, 2003 12:45 pm

:idea:

If you select all files for any processing like move/copy/delete you could use the "oldfashioned" commandline combined with a wildcard.

Code: Select all

Let>RP_WINDOWMODE=0
Run Program>cmd /c move C:\test\*.* D:\test\*.*
*.txt will move textfiles
*.bmp will move images
*.doc will move docs ... and so on.

cmd = W2K,NT,XP
command = W9x,ME

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Sat Jun 28, 2003 1:16 am

Hi Mark,

Normally it shouldn't occur. Moreover, the "WAIT>1" between "PRESS CTRL" and "SEND>a" isn't needed. I also notice an uppercase "A" is sent in your source code. Please try a lowercase "a" instead. Please let us know your progress. Thanks.

Happy scrpting.

Mark@HOB
Newbie
Posts: 6
Joined: Fri Jun 27, 2003 10:10 am
Location: Malta (Head Office in Germany)
Contact:

Post by Mark@HOB » Mon Jun 30, 2003 7:51 am

Thanks Rumumba but it is important that I simulate user input for file copying/moving/etc in this case. Believe or not, the operations windows carries out is different to those of DOS commands. We are testing a filesystem driver for a terminal services client and these differences matter.

Can I ask what the following line is for in your example please?:
Let>RP_WINDOWMODE=0


Regards,

Mark

Lumumba

Post by Lumumba » Mon Jun 30, 2003 9:19 am

Please have a look at the MSched online help (F1 in MSched's editor) keyword: Run Program>

In this case the DOSBox (window) will run hidden (=0).

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