"Release Shift" is not Releasing Shift!!

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Dexter1
Pro Scripter
Posts: 64
Joined: Mon Jun 19, 2006 3:28 pm

"Release Shift" is not Releasing Shift!!

Post by Dexter1 » Wed Oct 22, 2008 10:30 pm

I'm using the code below to open an Excel file, select all of the data in Column A, and copying it. However, the Release Shift is not working because when the code goes to copy I get the Copy as a Picture (Shift+CTRL+C) dialogue box, rather than just copying the cells. How can I make Macro Scheduler take me seriously?

Code: Select all

ExecuteFile>\\Drive\Folder\File.xls
Wait>3
Press CTRL
Press Shift
Press End
Release Shift
Release CTRL
Wait>2
Press Alt
Send>E
Send>C
Release Alt
Thanks,
Josh

User avatar
JRL
Automation Wizard
Posts: 3518
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Oct 23, 2008 4:52 am

I think you just have a timing problem. My computer had to wait 10 seconds after excel was started before the file was ready so you can see my computer is a little slow. That might make it easier to identify timing issues, I have to put in healthy waits.

Here's a rewrite, it works on my slow computer.

Code: Select all

ExecuteFile>\\Drive\Folder\File.xls
WaitWindowOpen>Excel*
Wait>10
Press CTRL
Press Shift
Press End
Wait>1
Release Shift
Release CTRL
Wait>2
Press Alt
Send>E
Release Alt
Wait>1
Send>C

User avatar
Marcus Tettmar
Site Admin
Posts: 7391
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Oct 23, 2008 8:15 am

Wen you open an XLS file notice that the Excel container app first opens THEN the file opens within it. Therefore if you wait for "Excel*" that will return BEFORE the XLS has opened. Excel displays part of the filename in the title. So it would be better to do:

ExecuteFile>\\Drive\Folder\File.xls
WaitWindowOpen>File - Microsoft Excel

That is how it would appear in Excel 2007. It may be different in earlier versions but hopefully you get the idea.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

idiot
Macro Veteran
Posts: 152
Joined: Thu Mar 01, 2007 9:21 am

Post by idiot » Mon Dec 08, 2008 8:49 pm

try using vk_keys instead of press key release key just do a search for it on here it works way better then macro schedulers press and release functions also you do realise you never released end key right?
if idiots rule the world then im the king!!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!

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