-
Posts
570 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Posts posted by stevecasper
-
-
No one here to help or did i found a bug?
I'd love to help, but I have no experience with left-hand mouse set-ups. Chances are the board-monitors who work for
Insight are reviewing your problem and will respond once they have been able to determine what is going on. Some
additional information about your macro might help. What is the exact code you're using in your macro (both in the ME 3
code and the ME Pro code)?
-
Can't seem to find it but need to have a triple-click left mouse button option. Anybody know if ME has it? If not, is there a work around?
There is a left-click and a double-click, but no triple-click.
However, a work-around that may work (depending on the speed setting of your mouse, computer, etc.):
Repeat Start (Repeat 3 times) Mouse Left Button Click Repeat End
<REP3:01:000001:000001:00003:0:01:><LCLK><ENDREP>
Or maybe this could work for you:
Mouse Left Button Double Click Mouse Left Button Click
<LDCLK><LCLK>
I tested them both on my system, and they both triple-clicked. I tested them on both a .wpd document as well as a .doc
document accessed through OpenOffice.org Writer. No problems encountered.
-
Is there a question embedded in this? If so, please clarify what you are trying to accomplish and we'll be happy to help.
-
Okay I have written a macro that goes online and populates a web page with information from one .csv file, but I it to open another .csv file. I am making it repeat using the ascii loop feature. Can I nest these. Can I have one ascii file begin process nested into another. I hope that make sense. Thanks
Kris
Nesting is easy if you know the trick. Assuming I understand your question, I know the trick. And I'm willing to share.
On the first ASCII Begin Process, you can designate the process to begin wherever you think it best (such as on the
first line). When the second (AKA the nested process) ASCII Begin Process starts, however, you'll need to specify
an integer variable (for example: %N1%). In order for this to work right, of course, you'll have to have already established
a value for %N1%... for this example, let's stick with a value of 1 (to start it on the first line of your second .csv file).
Before you end the nested process you need to first use the Variable Modify Integer command to increment %N1%.
After which, use a Break command (from the Repeat commands menu). This will cause the nested process to end,
taking you directly to the non-nested Text File End Process command. The process will now continue. The first
process will move to the second line, and the nested process will move to the incremented value of %N1% (aka also the
second line).
For my example below, I created two .csv files in a spreadsheet, each with 3 columns and three rows. I use a Text Box
Display command to test that the macro is working. Where the Display is located in my macro is where you would put the
bulk of your macro (inserting the information wherever it is that you need it to go).
One thing to keep in mind when dealing with nested Processes like this, however, is that when dealing with ASCII processes
from a .csv you'll have to make allowances for the Text Variable receiving the information. Example, if you use %T1% to
receive the information for the first .csv, then the information prior to the first comma will go into T1, the information prior
to the second comma will go into T2, etc. (if you are viewing your .csv in a spreadsheet, the first column will be in T1, the
second in T2, etc.). Because of this, you'll want to make sure the Text Variable receiving the information from the embedded
ASCII process is a high enough Text Variable that it will be able to handle the command without over-writing the information
in the first ASCII process (example: since my 001.csv is 3 columns, I have my nested process put information into %T4%,
since %T1%, %T2%, and %T3% will each be receiving information from the 001.csv).
Good luck!
Scripting Editor Code
Variable Set Integer %N1% to 1 ASCII File Begin Process: "textfileprocess001.csv" (Comma Delimited Text ) ASCII File Begin Process: "textfileprocess002.csv" (Comma Delimited Text ) Text Box Display: Example Variable Modify Integer: Inc (%N1%) Break ASCII File End Process ASCII File End Process
Direct Editor Code
<IVAR2:01:01:1><ADFBEG:F10:001:000001:000000:C:\Users\Steven\Documents\Macros\Macro Test Files\textfileprocess001.csv><ADFBEG:F10:004:N00001:000000:C:\Users\Steven\Documents\Macros\Macro Test Files\textfileprocess002.csv><TBOX4:T:1:CenterCenter000278000200:000:ExampleT1 = %T1% T4 = %T4% T2 = %T2% T5 = %T5% T3 = %T3% T6 = %T6%><NMVAR:08:01:0:0000001:0:0000000><BREAK><ADFEND><ADFEND>
-
Here is my problem. I have a button that I want to click on to upload files to a website. But every file I upload will cause the button to move futher down the page. I tried to use cntrl f to find the button on the page, but it cannot find the button. Any suggestions on how I can find this button and click it?
Thanks in advance.
Kris
In my experience, this is one of the trickiest, sometimes most difficult, actions to automate with Macro Express.
Ideally, you should just be able to use the Get Control command to assign the button to, let's say, %C1%, and then
use the Mouse Click Control command to click the button. Unfortunately, fewer and fewer web pages and other
applications are compatible with the Control commands, so there isn't any guarantee that this will work.
However, if you haven't already tried it, that is what I would suggest, because if it does work, then this is by far the best
way to do it.
-
After trying your code it is unclear whether this is a design change to the command or a bug. I suspect it's a bug.
The work-around is to enter a character (any character) and then a backspace. The OK button will remain enabled, which is what leads me to suspect a bug.
Ok, I see that works. If it's a bug, I can live with that. Early versions are rarely 100%. Hopefully it gets fixed in an
early version update.
Thanks!
-
Well, I'm stoked about ME Pro, so here I am re-creating my most-often used-at-home macros on the new system and I've
just come across what I hope is a simple matter of adjusting a preference.
I have a macro that opens a dialog box so I can choose what often-visited website I'd like. Example: Wikipdedia.
So my dialog box prompts me and I select Wikipedia, another prompt opens asking me what I want to search for. At this
point I would normally put in something like "Italian dressing" or "rhododendron" or whatever I happen to be curious about.
So far, so good.
I previously also had it set so that if the prompt remains "" (aka BLANK), then it just goes to the Wikipdedia home page.
Alas, in ME Pro, if nothing is entered into the prompt window, the "OK" button remains inactive. I can work with this at
home because, really, I could just set the default for that variable as "Wiki Home" or "----" and send it automatically to the
Wikipedia home page when the variable = "-----".
But that's for my personal use.
At work I have a similar set-up where I need to combine various serial numbers into a program we use. How many serial
numbers is dependent on the account. Maybe there is one, maybe there are ten. So my macro prompts me for a serial
number and I enter it. The macro then types the serial number into the correct box and prompts me for the next one, and
so on. When there are no more serial numbers, I leave the prompt blank, and the macro recognizes that to mean it is time
to move on.
I don't want to limit my co-workers with the necessity to remember just how many dashes it takes, in case they start typing
a number and then realize they don't need one after all.
Is there a preference to activate the "OK" button when the prompt is left blank? Or am I just going to have to suck it up and
deal with it or find a different work-around?
The bottom line, I guess, is simply this: Can't "" be legitimate contents for a text variable?
Here's my code, in case somebody wants to take a close look and tell me what I could do differently to make this work the
way I want (or in case somebody has a more efficient way to do the whole thing):
<VARIABLE SET STRING Option="\x00" Destination="%T1%" Value="A"/> <MULTIPLE CHOICE MENU Style="\x00" Result="\x00" Dest="%T1%" Title="Launch What Page?" Prompt="What web site are you launching?" Options="Google\r\nDictionary\r\nWikipedia\r\nPGMacros\r\nOther" Left="Center" Top="Center" Monitor="0" Width="443" Height="296" OnTop="FALSE"/> <IF VARIABLE Variable="%T1%" Condition="\x00" Value="A" IgnoreCase="FALSE"/> <VARIABLE SET STRING Option="\x01" Destination="%T2%" Prompt="What are we searching?" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/> <IF VARIABLE Variable="%T2%" Condition="\x00" Value="gmail" IgnoreCase="FALSE"/> <WEB SITE URL="http://mail.google.com" Wait="FALSE" Default_Browser="TRUE" _IGNORE="0x000C"/> <ELSE/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%T2%" ToReplace=" " ReplaceWith="+" All="TRUE" IgnoreCase="FALSE"/> <WEB SITE URL="http://www.google.com/search?hl=en&q=%T2%" Wait="FALSE" Default_Browser="TRUE" _IGNORE="0x000C"/> <END IF/> <END IF/> <IF VARIABLE Variable="%T1%" Condition="\x00" Value="B" IgnoreCase="FALSE"/> <VARIABLE SET STRING Option="\x01" Destination="%T2%" Prompt="What are we defining?" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/> <IF VARIABLE Variable="%T2%" Condition="\x00" IgnoreCase="FALSE"/> <WEB SITE URL="http://dictionary.reference.com/" Wait="FALSE" Default_Browser="TRUE" _IGNORE="0x000C"/> <ELSE/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%T2%" ToReplace=" " ReplaceWith="%20" All="TRUE" IgnoreCase="FALSE"/> <WEB SITE URL="http://dictionary.reference.com/browse/%T2%" Wait="FALSE" Default_Browser="TRUE" _IGNORE="0x000C"/> <END IF/> <END IF/> <IF VARIABLE Variable="%T1%" Condition="\x00" Value="C" IgnoreCase="FALSE"/> <VARIABLE SET STRING Option="\x01" Destination="%T2%" Prompt="What are we searching?" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/> <IF VARIABLE Variable="%T2%" Condition="\x00" IgnoreCase="FALSE"/> <WEB SITE URL="http://en.wikipedia.org/wiki/Main_Page" Wait="FALSE" Default_Browser="TRUE" _IGNORE="0x000C"/> <ELSE/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%T2%" ToReplace=" " ReplaceWith="_" All="TRUE" IgnoreCase="FALSE"/> <WEB SITE URL="http://en.wikipedia.org/wiki/%T2%" Wait="FALSE" Default_Browser="TRUE" _IGNORE="0x000C"/> <END IF/> <END IF/> <IF VARIABLE Variable="%T1%" Condition="\x00" Value="D" IgnoreCase="FALSE"/> <WEB SITE URL="http://pgmacros.invisionzone.com/" Wait="FALSE" Default_Browser="TRUE" _IGNORE="0x000C"/> <END IF/> <IF VARIABLE Variable="%T1%" Condition="\x00" Value="E" IgnoreCase="FALSE"/> <VARIABLE SET STRING Option="\x01" Destination="%T2%" Prompt="What website?" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/> <IF VARIABLE Variable="%T2%" Condition="\x07" Value=".com" IgnoreCase="FALSE"/> <IF VARIABLE Variable="%T2%" Condition="\x07" Value=".org" IgnoreCase="FALSE"/> <IF VARIABLE Variable="%T2%" Condition="\x07" Value=".net" IgnoreCase="FALSE"/> <IF VARIABLE Variable="%T2%" Condition="\x07" Value=".gov" IgnoreCase="FALSE"/> <IF VARIABLE Variable="%T2%" Condition="\x07" Value=".edu" IgnoreCase="FALSE"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%T2%" Value=".com"/> <END IF/> <END IF/> <END IF/> <END IF/> <END IF/> <WEB SITE URL="http://%T2%" Wait="FALSE" Default_Browser="TRUE" _IGNORE="0x000C"/> <END IF/>
-
My geek-o-meter just red-lined. I came to the forum just to check out the latest questions/answers and clicked
what I thought was the Macro Express 3.x forum and got a huge surprise...
I'm going to download the trial version right now, but I'm already planning on asking my wife to take back whatever
she got me for Christmas and exchange it for this!
Now to talk the Powers That Be at work to upgrade us. As if.
-
I have several macros which pause until a right click is detected. They have worked well for several months. Today they won't work. I wrote a macro that only pauses 400ms then waits for a right click then pops up a dialog box. I never make it to the dialog box. If I put a time limit on the wait, it times out every time. I tried this is several programs, including notepad, without making a difference. The ME version is 3.5.4.1. Running WinXP version 5.1 (Build 2600.xpsp_sp2_gdr.080814-1233 : Service Pack 2) . This is a computer in the Emergency Department. I am a physician, and I do not have access to update any program. I don't know if there is a new Windows patch that changes things or what.
What step should I take next in troubleshooting this?
Hi Kistonewa,
Is this what your code looks like?
Activate or Launch: "notepad" OR "notepad.exe" Delay 400 Milliseconds Wait Right Mouse Click Text Box Display: Hello
Just by looking at this, I don't see any reason for a delay of 400 milliseconds. The Wait Right Mouse Click should be
sufficient.
I'm not sure what you mean when you say "I never make it to the dialog box." Are you saying that the macro is freezing
or simply not getting past the Delay command? If so, I would say a simple fix is to get rid of the delay, since it isn't
really necessary (if it is anything like what I put up above).
It's possible that the problem is in the Wait Right Mouse Click command... in which case, I would have to agree
with steveK, that the problem could be in the mouse connection, or possibly mouse drivers.
As far as Windows updates affecting the macro, that's possible, too, though I wouldn't know for sure. My macro runs
fine, but that doesn't mean anything when we're running two very different systems. Your ME is a little out of date,
though. I'm running 3.7.4.1 (unless the 5 was a type-o in your post). Upgrading within build 3.x should be quick and free.
One other thought I have... I have had occasions where I've set a delay to 500 seconds, thinking I had selected mil-
liseconds, and I thought there was a problem with the macro... until I discovered it was all my fault. I hesitate to say
this is the problem you're having, since you said you have been using this macro for a while, but it's still a thought.
-
I honestly think we need more descriptive information about what exactly KGiff is trying to do. If he is really trying to
cycle through various tabs within a single browser, the Activate Window command is definitely not going to work.
From what I've read from his specific posts, he wants to go immediately from the window he is on to either the 5th window
away (6 of 6 assuming the window he's on is counted as 1 of 6) or the 5th tab away (again 6 of 6). From the information
given so far, he has never mentioned the 6th window/tab is a specific application, only that he wants to be able to run a
macro that will take him to the window/tab furthest from the one he is on. This is not necessarily going to have anything to
do with Activate Window commands.
We just need more detail of what he's trying to do.
-
here is the code.
Mouse Move Screen 1355, 190 Delay 2 Seconds Get Pixel: Screen Coords: 1355,190 into %N11% If Variable %N11% = 0 Text Type: <F1> End If Mouse Move Screen 962, 1031 Delay 4 Seconds Mouse Move Screen 1355, 190 Get Pixel: Screen Coords: 1355,190 into %N11% Delay 4 Seconds If Variable %N11% <> 0 Text Type: <F2><F3> Mouse Move Screen 918, 985 Mouse Left Button Click Mouse Move Screen 918, 985 End If
Can some confirm this? When the command get pixel add new infomation to N11 if the old is overwrote or combined?
MBone
As rberq said, each time you set N11, the old information will be over-written by the new information.
As a side note, your code has some Mouse Move commands that may not be necessary (particularly the one after the Left
Button Click), and two 4 second delays separated by a Get Pixel command. If you really need it to wait 8 seconds,
you could clean the code up by changing the first 4 second delay to 8 seconds and then remove the 2nd delay.
Those are just observations, of course, since I don't know what your macro is doing beyond the scope of this code, and
these actions may be necessary.
-
In Excel I am doing a repetitive open and save operation. I have 3 different folder with about 100 files in each. I am opening each in Excel and then doing a save as. I am looking for a way to have the mouse return to the last position I was at and go down one. So that I can work through the directory.
Thanks in advance for any help.
Bob
Oh, I responded to your other post before seeing this one. My response to the original post is still valid, but I don't think it is exactly
what you would be looking for. What you will want to do is keep track of exactly what you do manually, and try to build the macro
to do exactly what you do.
Using Keyboard shortcuts is actually a very efficient way to make a macro work quickly and accurately (example Alt+F to open the file
drop-down menu and then O to bring up the file open window). Navigating to the appropriate file could be a little trickier, depending on
your computer's speed, various settings, the last item saved/opened, etc.
Macro Express does have the ability to store the mouse position, and then return the mouse to that position. A single mouse click followed
by an Arrow Down command and Enter would then open the next file in sequence.
An Incrementing %N% variable could help by making sure that on successive repeats, the "Arrow Down" command would go down 2 times,
then 3 etc. until the macro has finished the task.
Being creative, studying the Help files and reverse-engineering the sample macros that came with Macro Express will really help open up
worlds of possibilities with Macro Express. If you have very specific needs, or just can't figure out how to do something that you think
would really help, then we are all happy to lend a hand. We just need a little more specific detail about what you have so far, and what
you need the macro to do for you.
Copy and paste your Direct Editor code between [ code ] and [ /code ] tags (without the spaces) to let us see how the macro looks, giving
us an idea of what you're trying to do. This way we can help without having to re-do what you have already done.
-
Is there a more deliberate way to do a File - Open? I know you can do an Alt F then O. I was just looking for another way.
Thanks,
Bob
This should work for you (I made a text file named "File to Open" for the purpose of testing this macro:
Scripting Editor Script looks like this:
Launch and Activate: "File to Open.txt"
And here is the Direct Editor script (for copy and pasting in to your own macro):
<LAUNCHNO3:0:0112File to Open.txt<LAUNCH:C:\Documents and Settings\File to Open.txt>
This command is found under Windows/Programs by default.
-
This is working great and it so much faster then the method I was using before. It is amazing me how much better this is going to work!
I have one instance I am going to need help with. I will be using if variables for T1.
Most the time when the info gets entered into Payroll it will be:
T1 enter T2 enter T3 enter T4 enter T5 enter.
But if T1 is 60 for example it will be entered into Payroll this way:
T1 enter T2 enter enter enter enter. At this point I need to get rid of T3-T5. If I don't they will screw up the sequence and get enered on the next line as T1-T3. Is there a way to skip or get rid of those so that the sequence stays right.
This is really just a matter of using an IF/Else command sequence. Because each time the process starts on a new
line it also starts over on T1, there is no need to get rid of %T3%-%T5%, you simply don't use them within the If/Else
clause where they need to be omitted.
Something like this:
ASCII File Begin Process: "cartwheels3.txt" (Tab Delimited Text ) If Variable %T1% <> "60" Text Box Display: If T1 <> 60 Then Do This Else Text Box Display: If T1 = 60 Do This End If ASCII File End Process
<ADFBEG:F11:001:000001:000000:C:\Users\Steven\Documents\Macros\Macro Test Files\cartwheels3.txt><IFVAR2:1:01:2:60><TBOX4:T:1:CenterCenter000439000133:000:If T1 <> 60 Then Do This%T1%<ENTER>%T2%<ENTER>%T3%<ENTER>%T4%<ENTER>%T5%<ENTER>><ELSE><TBOX4:T:1:CenterCenter000351000133:000:If T1 = 60 Do This%T1%<ENTER>%T2%<ENTER><ENTER><ENTER><ENTER>><ENDIF><ADFEND>
Of course, if you are very concerned about it, you can simply set T3, T4, and T5 to "" within the appropriate IF/Else portion
of the command sequence, a la:
If Variable %T1% <> "60" Text Box Display: If T1 <> 60 Then Do This Else Variable Set String %T3% "" Variable Set String %T4% "" Variable Set String %T5% "" Text Box Display: If T1 = 60 Do This End If
<IFVAR2:1:01:2:60><TBOX4:T:1:CenterCenter000439000133:000:If T1 <> 60 Then Do This%T1%<ENTER>%T2%<ENTER>%T3%<ENTER>%T4%<ENTER>%T5%<ENTER>><ELSE><TVAR2:03:01:><TVAR2:04:01:><TVAR2:05:01:><TBOX4:T:1:CenterCenter000351000133:000:If T1 = 60 Do This%T1%<ENTER>%T2%<ENTER><ENTER><ENTER><ENTER>><ENDIF>
But this is really just unnecessary clutter.
-
Well, I used the above script and I'm getting a weird reaction. I'm using FireFox 3.0.3 and I've got it set for FireFox to open new window in a Tab window. What I do is go to a website, and then click on one of it's hypertext which opens into a Tab window and I do this to get six Tab windows open. Using the keyboard ALT & TAB, I can move to the appropriate 6th Tab window, but using MacroExpress, it put me back to prior Tab window (the 5th window). Continuing using MacroExpress put me at 4th Tab window, 3rd, etc, and will eventually put me to the FireFox window prior to the I just opened. Any more ideas?
I'm just a little confused. If you are using Tabs in Firefox, then Alt+Tab shouldn't work at all. Ctrl+Tab should be how
you cycle through your tabs. In which case you'll want something more like this:
Text Type: <CTRLD> Repeat Start (Repeat 5 times) Text Type: <TAB> Repeat End Text Type: <CTRLU>
<TEXTTYPE:<CTRLD>><REP3:01:000001:000001:00005:0:01:><TEXTTYPE:<TAB>><ENDREP><TEXTTYPE:<CTRLU>>
Or if you want it to just go back one, rather than forward 5:
Text Type: <CTRLD><SHIFTD> Text Type: <TAB> Text Type: <SHIFTU><CTRLU>
<TEXTTYPE:<CTRLD><SHIFTD>><TEXTTYPE:<TAB>><TEXTTYPE:<SHIFTU><CTRLU>>
I just tested both of these out in Firefox. I opened 6 completely different websites from Gmail to Thottbot and a couple
of blogs. No problem getting either of these to work for me. If you're continuing to have problems, you may need to
introduce some delays into your macro to make sure your computer has time to process the commands.
What I think you might be doing is tabbing forward too few times (or too many). You have 6 tabs open, you only need
to tab forward 5 times... though that would only explain if you were accidentally going too far forward...
Can you copy the exact ME code you're using into a reply here so we can take a look at it?
Be sure to put it between [ codebox ] and [ /codebox ] tags (without the spaces).
EDIT - I just noticed I had a 6 in the Scripting Code where I should have had a 5... the 5 was present in the Direct Editor
code, though, so it shouldn't have made an extreme difference, since copying from the DE is the best way to transplant code
into your own macro, but I thought I should mention the error.
-
Edit: I just posted this, but it took me a long time and had not checked for recent posts, So I need review your post Steve. Thanks guys!
I wish I could paste columns of info into the accounting program, unfortunately it it does not allow any paste what so ever. From excel it must be typed from the clip board one at a time. So I take 5 cells worth at a time, just because that is the way it is organized. I assign a seperate variable to those 5 cells of info. Then it gets typed into the Pay Roll Program and repeat till it gets to the end. I have to have logic in there to controll when it gets to the end and other things as well.
Since this is a new thread I'll mention again what I'm trying to do. I currently have a macro doing the above pretty well. It just has to toggle back and forth quite a bit. So I was thinking that it might be more efficient to copy as much as I can in excel and toggle over to the payroll program and type it in. Each cell would have to its own variable. I believe the info from Excel also has to have the formatting trimmed out before you type it out.
The info has to land in the right spots so I was thinking I could start with T1 and increment up from there, then the same when it is being typed out in the Pay Roll Program.
Here is what the excel spreadsheet looks like. The yellow area plus the rate area which is one column to the right is the info I transfer to the other program.
Edit: I should also mention I have to enter in the P/R Program one line at a time, in other words "Code", "Hours", "Field", "Phaze", "Rate". I can't do columns.
If I've understood you correctly, this is actually a lot easier than it first appears.
First highlight the info you want to process (the whole thing from the top-most left "1" to the bottom-right "9.50"). When
it is all highlighted run a macro that looks like this:
Clipboard Copy Clipboard Save Text: "cartwheels3.txt" ASCII File Begin Process: "cartwheels3.txt" (Tab Delimited Text ) Text Box Display: Line Contents ASCII File End Process Delete File or Files: "cartwheels3.txt"
<CLIPC><CLIPST2:0:C:\Users\Steven\Documents\Macros\Macro Test Files\cartwheels3.txt><ADFBEG:F11:001:000001:000000:C:\Users\Steven\Documents\Macros\Macro Test Files\cartwheels3.txt><TBOX4:T:1:CenterCenter000278000200:000:Line ContentsCode: %T1% Hours: %T2% Field: %T3% Phaze: %T4% Rate: %T5%><ADFEND><DOFILE:08:NN:C:\Users\Steven\Documents\Macros\Macro Test Files\cartwheels3.txt>>
For this test I opened a blank spreadsheet and copied column for column from the image you provided from A8 through
A32 over to E9 to E32, so my test used your exact information as provided for greatest accuracy.
I then highlighted the block of text in my spreadsheet and ran the above macro. My results were consistent. Where I
have a Text Box Display in my macro is where you would have the macro activate your other program and using
whatever technique is best suited to that program (Window Controls, Tabs, or - heaven forbid - Mouse Clicks on the
appropriate fields, etc.) the macro can input the required information wherever it belongs.
The first two command lines create a text file that the macro will use to set the contents of the various cells to Text
Variables. The final Delete File command gets rid of the file created at the beginning of the macro to help keep
your hard drive clutter-free.
-
Steve: To close off this one, can you advise what your setting is please?
--
Terry, East Grinstead, UK
Oh, yeah, sorry:
Delay after clipboard commands: 250
Text Type delay: 300 microseconds
Use High Speed Timer: checked
-
Thank you so much for helping me out late on a saturday after long day!
I set this up exactly like you did, but it just seems to sit there and not do anything. When I originally tried to save it as a csv, Excel gives me a message that my worksheet may contain features that are not be compatable with csv.
Ultimately though I don't know if this will work because I was really planning using this for a workbook with multiple sheets with lots of info on each sheet. What I do is use ME to take payroll info out of Excel and to put it into our finky accounting software (it's good but difficult to work with sometimes). It is much easier to get it into excel to start with.
I have ME copy four cells then toggles to accounting program types them in then toggles back. This actually works pretty well, but I was thinking that it would be far more effeceint to copy everything out of excel first then go to the accounting program and type it all in . This can up to 80 to 100 cells worth of info.
Then there is the fact that info from Excel has to be trimed. This all may be more trouble than it is worth. I didn't think it would be so hard when I first started.
Thanks again for the help. ME is really a great program! I will be using it a lot.
I was hoping to start with a simple but understanable senario then adapt it to a more complicated macro with some controlling "logic" .
I do something similar at work. I receive (usually on a daily basis) an Excel spreadsheet list of account numbers
for clients, an associated ID Number, and various other information about the account. It's my job to take the
account# and the ID# and enter the client's information into another program that helps track specific account
behavior (I work in the Fraud Management group of a bank).
What I usually do is manually highlight the Acct# list and save it to a .txt file, then I highlight the associated ID# list
and save it to a second .txt (I actually do the saving with a macro, but I'm trying to keep things relatively simple here
and stick with the main theme).
What my main macro for this job then does is:
1) Activates and accesses the recipient program
2) Retrieves the first line of the Acct# file
3) Retrieves the first line of the ID# file
4) Enters all pertinent information into the appropriate fields in the recipient program
5) Rinses and repeats as necessary (retrieving the second lines, etc.)
The recipient program, in this case, is an annoying little Dos-looking piece of programming, and so I have had to do
a lot of work-around stuff with my macro to get it to work right - so I understand how difficult it can be when you are
working with a program that isn't nearly as convenient as Excel or other smooth-working business-practical software.
The basic idea for this macro goes something like this:
I created two .txt files, one a list of "Account Number 001" through "Account Number 050", the other a list of "ID
Number A1" through ID Number A50". I saved them as, respectively, testaccountnumber.txt and testidnumber.txt
in my Macro Test folder of my C: drive.
This is the macro as I have it built:
Variable Set Integer %N1% to 1 Text File Begin Process: "testaccountnumber.txt" Text File Begin Process: "testidnumber.txt" Activate Window: "Untitled - Notepad" Text Type: %T1%<TAB>%T2%<ENTER> Variable Modify Integer: Inc (%N1%) Break Text File End Process Text File End Process
<IVAR2:01:01:1><BTFBEG:001:000001:000000:C:\Users\Steven\Documents\Macros\Macro Test Files\testaccountnumber.txt><BTFBEG:002:N00001:000000:C:\Users\Steven\Documents\Macros\Macro Test Files\testidnumber.txt><ACTIVATE2:Untitled - Notepad><TEXTTYPE:%T1%<TAB>%T2%<ENTER>><NMVAR:08:01:0:0000001:0:0000000><BREAK><BTFEND><BTFEND>
Here is the script editor again (with Explanatory Remarks this time):
// First I set N1 to 1 for reasons to be explained later. Variable Set Integer %N1% to 1 // I begin the process with the account numbers being saved to T1, // set to start with the first line and continue till finished. Text File Begin Process: "testaccountnumber.txt" // Next I begin processing the ID Numbers (saved into T2), // however I set it to start at N1 (this is why N1 is set to 1) Text File Begin Process: "testidnumber.txt" // Now I run the bulk of my macro, entering info into various fields. // For the purpos of this example, the "bulk" consists of activating a notepad and // typing T1 and T2 into it. Activate Window: "Untitled - Notepad" Text Type: %T1%<TAB>%T2%<ENTER> // Now I increment N1 (now N1 will = 2 so when the process repeats, // T2 will pick up the second ID Number) Variable Modify Integer: Inc (%N1%) // Now I break the "inside" process. Without this break, // T1 would be stuck on the first account number while T2 continued to increment. Break // End both processes (even though the break makes the "inside" process end, // the code requires an end process). Text File End Process Text File End Process
-
Anyone know why the Edit button isn't available on my original post please? Never noticed that before...
--
Terry, East Grinstead, UK
Did you scroll all the way to the right? Personally I love these forums, but sometimes the interface is a pain in the butt.
I hate having to scroll off to the right and back again just to read a post. For my posts, I take the extra step of entering
carriage returns on each line so that my own text doesn't go off into the far-right distance...
But still, even then, the Edit/Reply/Quote buttons are clear over at the end.
-
I can edit or create a new macro and they run without a problem.
However after I turn off the computer and restart it, I loose all the changes or
additions.
I would appreciate any help.
Sometimes the most obvious solution is the one that gets overlooked.
I certainly don't mean to insult your intelligence, but are you certain you are clicking the Save icon at the top left of the
Editor window before closing it (or pressing Ctrl+s)? Macros can be run without saving them by using the Test Run button
on the Editor screen (looks like a little green Play button), but the macro needs to be saved before closing the editor or
it will be lost.
If you are saving it, then there may be something else wrong that the forums probably can't help you with, and you may
need to contact Insight tech support.
-
Hi, I'm having a lot of trouble with this as well. I have studied the examples and read the many posts for days now, to no avail. I understand part of it.....maybe, but I'm hoping for a little more help from you guys. Hope I'm not Hijacking thread, it is along the same lines.
I have an Excel Workbook named Book1
Starting in Column A Row #1
Just to keep it similar, I have:
Red
White
Blue
I would like to copy each of these and go over one column and paste each these. Using copying and pasting both using increasing variables, both starting a %T1%.
Could you guys help me with this? Here is what I have so far. It does not work correctly yet! I can't quite figure out how to set what is on the clipboard to %TN1%. Also, I don't have the paste in yet because the top part is wrong.
In this instance it may be that you are making it harder than it needs to be. While I love the Run Macro in Variable
command and think it's a brilliant solution to specific problems, those particular problems are (in my experience) relatively
rare.
What I would probably do, if I were in your shoes, is something more along these lines:
First, save your Excel file as a .csv (you can build commands into your macro that will do it for you, but since I don't have
Excel on my computer I don't want to confuse anything by trying to put it into this example macro).
I have saved mine as cartwheels.csv and put in into my Macro Test folder on my C: drive. The file is simply this:
Cell A1 contains: Red
Cell A2 contains: White
Cell A3 contains: Blue
I want to move these each into its corresponding B cell (i.e. B1 will have Red, etc.)
For my macro I want A1 to become blank when B1 receives A1's contents.
Here is the Scripting Editor script:
Variable Set String %T1% "" ASCII File Begin Process: "cartwheels.csv" (Comma Delimited Text ) Variable Set String %T2% ", " Variable Modify String: Append %T1% to %T2% Variable Modify String: Append %T2% to Text File ASCII File End Process
And here is the Direct Editor script
<TVAR2:01:01:><ADFBEG:F10:001:000001:000000:C:\Users\Steven\Documents\Macros\Macro Test Files\cartwheels.csv><TVAR2:02:01:, ><TMVAR2:08:02:01:000:000:><TMVAR2:20:02:00:000:000:C:\Users\Steven\Documents\Macros\Macro Test Files\cartwheels2.csvT><ADFEND>
What this macro does is first clears T1 (not really necessary in this macro, though), then it begins an ASCII Process to
retrieve the information, line by line, and puts it into T1.
Next I set %T2% to ", " since .csv files are comma delimited. This will ensure that when I append %T1% to %T2% I will
be setting T2 to ", Red" rather than just "Red".
Next line appends T1 to T2 (creating ", Red" as explained above) The ", " ensures that when T2 gets saved to a .csv file,
it will be placed in the second column.
The next command appends %T2% to the new .csv text file (on the first pass it actually creates the new .csv, but on the
following passes, it will simply add the new information to it). On this line it is imperative to have "Add Trailing CR/LF"
checked.
And finally I end the process so that the macro knows to go back and repeat for the next line. When it's done, I have the
original .csv with the A column containing my colors, and a new .csv with those same colors listed in the B column.
This macro saves the information into a new .csv file named cartwheels2.csv Macro Express will allow you to rename
this file to replace the original cartwheels.csv, but I didn't want to do that during the test, just because I wanted to make
sure I could run the test over and over without having to manually put everything back the way it was.
One last note. It's been a long day for me, and I'm pretty beat, so this may or may not be the best example macro for
doing the job you need done, but after running it a few times, it does do what I programmed it to do, which is what I
understood your needs to be. I'll probably look at it again tomorrow (after a good night's sleep), and see if I missed
my mark. Or you could just tell me I'm way off .
-
I often have several (5-6) programs running in separate window. I rotate thru these programs by holding down the
ALT key and then press TAB key for each program. What I want to do is have a hotkey that will quickly move me to
the 6th program. I've tried using series of <ALT><TAB> and also used <ALTD><TAB> but neither one seems to do the
program rotatation correctly. Does anyone know how to do this?
Do you always want the 6th window, regardless of what that window title is? If so you might want to do something
like this:
Text Type: <ALTD> Repeat Start (Repeat 5 times) Text Type: <TAB> Repeat End Text Type: <ALTU>
<TEXTTYPE:<ALTD>><REP3:01:000001:000001:00005:0:01:><TEXTTYPE:<TAB>><ENDREP><TEXTTYPE:<ALTU>>
If you have 6 windows, and you want to go to the last one, you need to set the repeat to 5 (because 6 will either
bring you back to the window you started on, or it will take you to the desktop if you are running Vista).
Or you could do this:
Text Type: <ALTD><SHIFTD> Repeat Start (Repeat 2 times) Text Type: <TAB> Repeat End Text Type: <SHIFTU><ALTU>
<TEXTTYPE:<ALTD><SHIFTD>><REP3:01:000001:000001:00002:0:01:><TEXTTYPE:<TAB>><ENDREP><TEXTTYPE:<SHIFTU><ALTU>>
This will perform a Shift+Alt+Tab which goes backwards, so it doesn't have to repeat as many times to get to the
last window.
If you are running Vista (as I am) you need to set it to repeat 2 times, otherwise 1 time should suffice.
-
Awesome, thanks Stan.
I knew it would be something ridiculously simple.
-
This is such a minor issue, it almost never effects me. In fact I rarely even notice it, and when I do, it is never more than a slight
inconvenience (if even that). However, I was just testing a macro that is supposed to save the title of the topmost window to %T1%
and then at the end of the macro, it should recall %T1%.
The problem is that when I click the Test Run button, ME loses focus, so whichever window is directly behind ME gets the focus and its
title ends up getting saved to %T1%. Not a life-altering problem, really, but it did cause me a moment of confusion when ME didn't
come back to the top when the macro ended.
Is there a setting somewhere within the preferences that I'm missing that will fix this? Or is it a "feature" of this build?
Thanks!
Running ME3 macros under MEPro
in Macro Express and Macro Express Pro
Posted
I would avoid using the "Import Macro" option from the File Menu... tried it 3 times and just ended up locking up my Macro
Express on each attempt... You'd think I would have learned after the 2nd try, if not the 1st.
Honestly, though, if you have time to do it, I've found that manually re-creating my ME 3 macros in ME Pro has helped me
learn some of the tricks and features of the new version. Of course if you have hundreds or even just dozens of macros
to move... well, that just wouldn't be practical. Luckily, I have indefinite weeks/months before my work will even consider
an upgrade, and in the mean time, my at-home macros remain relatively few, and there is no deadline for me to get them
switched over.