I was just trying to write a simple macro to automate the copying of product names from my Amazon account's Subscribe and Save to an Excel 2013 spreadsheet through a simple CTRL+C setfocus CRTL+V macro but I'm not getting anywhere fast! I'm confused!
Here's the macro showing what I was trying to do, please imagine that I've already got text selected in Firefox and then I run the following macro code. I should mention that I also tried using MS Mouse Commands on Excel with no luck. For some reason it's like my Excel isn't even there...Really odd.
It's like everything that has to do with Excel is ignored or not seen.Let>SK_DELAY=10
SetFocus>Amazon.com - Your Subscribe & Save Items - Mozilla Firefox
Wait>.5
Press CTRL
Send>c
Release CTRL
Wait>.5
SetFocus>Amazon S&S.xlsx - Excel
WaitWindowOpen>Amazon S&S.xlsx - Excel
// All seems OK until here and then nothing works again until...
Press CTRL
SendText>v
Release CTRL
Wait>.5
Press Enter
// ...HERE When focus goes back to Firefox
SetFocus>Amazon.com - Your Subscribe & Save Items - Mozilla Firefox
So, I decided to try the Macro Recorder, something that I've not used much so I just went with its' defaults and here's what I got when I tried to highlight Excel with my mouse. [The same thing happens when I use my keyboard to move through my open windows/z-order but I didn't want to pollute this already long post any further.] I alt-tabbed through some arbitrary programs that I had open INCLUDING Excel a couple of times but when I went to Excel it doesn't show up in the recorders code? I brought Excel to the front of the Z-Order at least twice during the recordings but it's like I never did?! Strange.
The recorder's code looks like I never even visited Excel, but I did!!! Has anyone run into anything like this? I noticed in another thread a user was having difficulty with CTRL-N for a new email in Outlook but nothing like this comes up in searching the forum here.// C:\Users\dan\AppData\Local\Temp\msr6A34.tmp.scp
// Recorded on Friday, January 31, 2014, at 06:14 AM
//Recorded Events
Let>WW_TIMEOUT=5
CapsOff
WaitWindowOpen>Macro -
MoveWindow>Macro - ,254,205
ResizeWindow>Macro - ,1172,641
MouseMove>588,1049
Wait>1.44
LClick
WaitWindowOpen>Send private message :: Macro Scheduler and Windows Automation :: Windows Macro, Windows Automation, Windows Software Automation Solutions - Mozilla Firefox
MoveWindow>Send private message :: Macro Scheduler and Windows Automation :: Windows Macro, Windows Automation, Windows Software Automation Solutions - Mozilla Firefox,-8,-8
ResizeWindow>Send private message :: Macro Scheduler and Windows Automation :: Windows Macro, Windows Automation, Windows Software Automation Solutions - Mozilla Firefox,1696,1036
Wait>0.8
MouseMove>631,1034
Wait>0.78
LClick
WaitWindowOpen>Newsbin.nbi - Newsbin Pro 6.50 - Build: 3126
MoveWindow>Newsbin.nbi - Newsbin Pro 6.50 - Build: 3126,-8,-8
ResizeWindow>Newsbin.nbi - Newsbin Pro 6.50 - Build: 3126,1696,1036
Wait>0.36
MouseMove>756,688
Wait>2.35
LClick
Wait>0.26
MouseMove>679,1033
Wait>1.32
LClick
WaitWindowOpen>[IP Log.txt] - Usenet - UltraEdit
MoveWindow>[IP Log.txt] - Usenet - UltraEdit,-8,-8
ResizeWindow>[IP Log.txt] - Usenet - UltraEdit,1696,1036
Wait>0.2
MouseMove>652,727
Wait>0.93
LClick
Wait>0.25
MouseMove>558,1036
Wait>2.41
LClick
Wait>4.64
LUp
WaitWindowOpen>Send private message :: Macro Scheduler and Windows Automation :: Windows Macro, Windows Automation, Windows Software Automation Solutions - Mozilla Firefox
MoveWindow>Send private message :: Macro Scheduler and Windows Automation :: Windows Macro, Windows Automation, Windows Software Automation Solutions - Mozilla Firefox,-8,-8
ResizeWindow>Send private message :: Macro Scheduler and Windows Automation :: Windows Macro, Windows Automation, Windows Software Automation Solutions - Mozilla Firefox,1696,1036
Wait>0.48
MouseMove>611,1042
Wait>0.56
Would it help if I did a screen recording of this? Can I upload such to this forum or should I store it elsewhere and provide a URL?
Thank you very much for looking at this. I do appreciate it!