[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Windows Macro Program

Posted on 2004-11-19
8
Medium Priority
?
228 Views
Last Modified: 2010-05-18
Are there any good Macro recording programs for Windows XP out there?

Here is what I want to do:  

I would highlight (or click on) a filename is Windows Explorer . .
Then I would start the Macro . .
The Macro would Copy the filename, then switch to Excel,
then Paste the filename to the currently selected cell.

Is this possible?  I hope so because I need to do this for 10,000 filenames!!

Thanks

0
Comment
Question by:MikeMCSD
  • 4
  • 3
8 Comments
 
LVL 9

Expert Comment

by:tosh9iii
ID: 12631519
Technically, yes, but you'd have to run that macro 10,000 times.  Each time you run the macro, you'll have to specify which filename you want copied and which cell you want it in.

Autohotkey
http://downloads-zdnet.com.com/AutoHotkey/3000-2094-10279447.html?tag=lst-0-13

This is the one I use:  Macro Express
http://downloads-zdnet.com.com/Macro-Express/3000-2094_2-10307165.html?tag=lst-4-11


Do you just want to copy all of the filenames in a directory to excel?
0
 
LVL 4

Expert Comment

by:dovcamp
ID: 12631561
Would copying all the file names at once in a folder and pasting them into a column in excel do what you want?  If so, you could use something like this:

http://www.onlinecoursetools.com/delphi.asp 

0
 
LVL 16

Author Comment

by:MikeMCSD
ID: 12631924
thanks for the replies . . .

what I have to do is match a product ID to its thumb image and its larger image -
those are the 2 filenames I need to copy over, so I have to know which image
is for what product.
Just having a macro that could copy and paste the filename into the cell would help . .
and yes you were right . . "but you'd have to run that macro 10,000 times".

If I were to first select the cell in Excel, then click on the image filename in Explorer
and run the macro, would it find the selected cell in Excel?
Could I get the focus to go into that top text box in Excel . . the one where you can edit
the currently selected cell?  

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 9

Accepted Solution

by:
tosh9iii earned 2000 total points
ID: 12632300
Here's what the macro could do for you.
Let's pretend you have excel open as well as the folder with the files and the macro is already created.

1. You click on the cell in Excel where you want the filename.
2. You switch back to the folder.
3. You select the file and then activate the macro.

Here's what the macro does:

A. It hits F2 (hotkey for Rename)
B. It hits CTRL-C (hotkey for Copy)
C. It hits Alt-Tab to switch to Excel (hotkey to switch between open programs)
D. It hits CTRL-V (hotkey for Paste).  Since the cell is already selected it will paste in the correct cell.

10,000 times, that's one hell of a task.

How do you know which cell to put it in?  There might be a way to make your task easier.  If you're willing to send me a small portion of that excel file in an attachment thru email I might be able to help you more.  My email address is in my profile.


0
 
LVL 16

Author Comment

by:MikeMCSD
ID: 12635108
thanks tosh . .  Those steps for the macro were exactly what I had in mind.

The reason I need to do this is that I have this web site: http://www.discountcatholicproducts.com/
that I am rebuilding using ASP.NET and SQL Server. The store has 5000 products.
I have to add all the products to the database's Products table.
The person that is going to be doing this is going to be using Excel.  I will then
take that Excel file and convert it into an SQL Server table.

Can the Macro Express program handle this?
I'll send you the file to take a look at.
Thanks
0
 
LVL 9

Expert Comment

by:tosh9iii
ID: 12635173
Okay I got the file,
What goes in tbPath, the filename?
What goes in ImagePath, the location of the file?
0
 
LVL 16

Author Comment

by:MikeMCSD
ID: 12635710

Thank you tosh9iii!!!
0
 
LVL 9

Expert Comment

by:tosh9iii
ID: 12635757
I'm going to post the solution here just in case anyone else runs into the same problem.
Good luck and let me know if I can help you more.



I believe that'll work for "most" of them, but not all, here's one
possibility that "might" work:

Let's pretend you have excel open as well as the folder with the files
(the folder will have to be in Search mode(Ctrl-F)) and the macro is
already created.

1.  You're in Excel, and you click on the product number.
2.  You activate the macro.

Here's what the macro does:

A.  It hits CTRL-C (hotkey for Copy)
B.  It hits Alt-Tab to switch to the folder (hotkey to switch between
open programs)
C. It hits Tab 3 times to get to the Search box.
D. It hits CTRL-V (hotkey for Paste).  Since the text is highlighted,
pasting the text will overwrite whatever was there before.
E. It hits Enter and then the computer searches for the file.
F. For the macro, there will need to be a time delay, perhaps 5-10
seconds to give the computer time to search thru 10,000 files
G. Hopefully, each time it does this, there will only be one result.
So after it finishes searching, the macro will hit Shift-Tab to select
the file.
H. It hits F2 (hotkey for Rename)
I. It hits CTRL-C (hotkey for Copy)
J. It hits Alt-Tab to switch to Excel (hotkey to switch between open programs)
K. It hits the left arrow 4 times to reach tbPath.
L. It hits CTRL-V (hotkey for Paste).
M. It hits left arrow once.
N. It hits CTRL-V (hotkey for Paste).
O. It hits down arrow once
P. It hits left arrow 5 times, to reach the next product number
Q. Then it repeats all of the steps and does it over and over again,
until something goes wrong or there are no files that come up in the
search.

Like it said, I think that it'll work for "most" of them, but not all.
There are other with prod no. like: 1052E-V-S    and filenames like:
1052EV-S-th.jpg

Since the prod no has the dash between E-V, it wouldn't be able to
find the filename.

That's why some of these are going to have to be done manually and why
someone is going to have to watch over it, making sure nothing goes
wrong.  When it comes to these macros, something is bound to go wrong.
But I like them anyways.

I hope this was helpful.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello I read in a discussion about a person who configured a very simple mirror RAID with two hard drives; the system and data were on the same partition. He asked how to repair the system as it was not booting up anymore. In his case running …
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question