Jump to content
Macro Express Forums

Amerifax-Bob

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by Amerifax-Bob

  1. Cory,

     

    This is an example of the text I am putting into Variables.

     

    America In-Home T[2]

    3485 N. 124th Street T[3]

    Brookfield T[4]

    WI T[5]

    53005 T[6]

    262-790-4050 T[7]

    262-781-2849 T[8]

    www.americainhome.com T[9]

     

    There is not always a website. So when it gets to the point that it is going to select and copy the website to a Variable, I would like it to check first if the text contains www. If it does then continue on and copy the website to T[9] and if not, just continue on with the Macro.

     

    Sorry I should have clarified that more. Is that possible to check with an IF statement since it is not yet in a Variable, or should I use 2 variables in this instance. One to copy the line to a variable for checking and another to hold the proper variable if the condition is met?

     

    I did figure out the IF Variable within my Macro for other instances but this one was a little different.

     

    Heather

  2. I am not very good with the IF statements and was wondering if someone could help with a small one for me?

     

    // Website to T9
    Text Type (Simulate Keystrokes): <ARROW DOWN>
    Text Type (Simulate Keystrokes): <SHIFT><END>
    Clipboard Copy
    Delay: 250 milliseconds
    Variable Set String %T[9]% from the clipboard contents

     

    I would like to do the above only if the text=www. The text is in a regular text editor (Ultra Edit). The data I am copying to Variables does not always have a website. So if the Macro finds www I want it to process the part of the Macro above, if not just continue on with the rest of the Macro.

     

    I did try searching around first, but did not have much luck.

     

    Thanks for any help,

     

    Heather

  3. Cory,

     

    Bob and I discussed that very thing. Not only searching a little more through the forum, but actually searching through our own messages we have posted. When we get through a problem we usually archive the message in our own "Help System" so to speak. We will check out that post and like always, thank you so much for your help and patience!

     

    I do however, have one more question. In the code I did do, can you see why I am ending with the "little guy" in the taskbar still? When I put in the number of times I want to repeat, I would think it would end after that, but the little guy remains. Maybe I am still missing something or not ending the Macro the proper way. It seems that I am getting a time error on Line 2. It pops up well after I am done running the Macro.

     

    Thanks,

     

    Heather

  4. Cory,

     

    To answer your first question, we can't use a CTRL+A because we only want the text that is within the box on the page.

     

    I also added the second manual copy command like you suggested as well as some delays in a few spots. The time delays never really seem to be consistent though. I went through and added them and then took each one down until I had problems running the macro through. But it still is not consistent. It might run through 3 times and then start missing one or two. I also added a Repeat Prompt because there are always a different number of contacts or companies.

     

    This is the new code:

    Repeat Prompt Start
     Window Activate: Metropolitan Builders Association
     Wait for Window Title: Metropolitan Builders Association
     Wait for Left Mouse Click
     Delay: 1.5 seconds
     Window Activate: Construction Services
     Wait for Window Title: Construction Services
     Mouse Left Click
     Mouse Left Click
     Mouse Move: 2272, 660 Relative to Screen
     Delay: 300 milliseconds
     Mouse Left Button Down
    Mouse Move: 2758, 830 Relative to Screen
    Delay: 300 milliseconds
     Mouse Left Button Up
     Clipboard Empty
     Clipboard Copy
     Delay: 200 milliseconds
     Text Type (Simulate Keystrokes): <CONTROL>C
     Delay: 1 seconds
     Window Activate: UltraEdit
     Wait for Window Title: UltraEdit
     Text Type (Simulate Keystrokes): <CONTROL><END>
     Text Type (Simulate Keystrokes): <ENTER>
     Clipboard Paste
    End Repeat

     

    One other thing I did notice is that after the Macro is done running the "little man" is still in the Taskbar...am I missing something in the code? I tried with and without the repeat and either way he is still there.

     

    Thanks once again for all your help Cory.

     

    Heather (for Bob)

     

    PS We would really be interested is learning about the VBScript. We have dabbled in it a very little bit through other programs. Let me know how you want to do it...

  5. Please see If it was ease we would not need Macro Exoress

     

    I am using 2 Internet Explorer Windows within my Macro. The first one contains different headings (which I need to select the one I want), once I click on a heading it loads a 2nd Internet Explorer window which contains the data I need to copy. When I copy the data, I am pasting it into Ultra Edit. Below is the Macro I put together.

    Window Activate: Construction Services
    Wait for Window Title: Construction Services
    Mouse Left Click
    Mouse Left Click
    Mouse Move: 2257, 677 Relative to Screen
    Mouse Left Button Down
     Mouse Move: 2750, 850 Relative to Screen
    Mouse Left Button Up
    Clipboard Empty
    Clipboard Copy
    Window Activate: UltraEdit
    Wait for Window Title: UltraEdit
    Text Type (Simulate Keystrokes): <CONTROL><END>
    Text Type (Simulate Keystrokes): <ENTER>
    Clipboard Paste

    Nothing seems to work consistent. I have tried adding time delays. The macro will run through a few times with no problems, then it misses the copy command. Can anyone suggest a better way to do this. If you want to see for yourself what I am doing, the first IE window is at www.mbaonline.org, click "Find a Member" in the upper right corner, click on I accept. Then click the Construction Services Tab and select a heading. At the bottom, different companies appear. If you click on "More Detail," the 2nd IE Window will open with the Text we are trying to copy.

     

    Thanks for any help or suggestions.

     

    Bob

  6. We are running the following Macro and getting various results. Sometimes the Macro misses variables, sometimes they are doubled up but the results are never the same. What is missed or double one time, is fine the next time. The results are so random.

    This is the code:

    Clipboard Empty
    Window Activate: Microsoft Excel - 
    Get Mouse Position into (%N[1]%, %N[2]%) Relative to Current Window
    // Name T1
    Text Type (Simulate Keystrokes): <TAB>
    Clipboard Copy
    Variable Set String %T[1]% from the clipboard contents
    // Company T2
    Text Type (Simulate Keystrokes): <ESC><TAB><TAB>
    Delay: 350 milliseconds
    Clipboard Copy
    Variable Set String %T[2]% from the clipboard contents
    // Address T3
    Text Type (Simulate Keystrokes): <ESC><TAB>
    Delay: 400 milliseconds
    Clipboard Copy
    Variable Set String %T[3]% from the clipboard contents
    // City T4
    Text Type (Simulate Keystrokes): <ESC><TAB>
    Delay: 350 milliseconds
    Clipboard Copy
    Variable Set String %T[4]% from the clipboard contents
    // State T5
    Text Type (Simulate Keystrokes): <ESC><TAB>
    Delay: 350 milliseconds
    Clipboard Copy
    Variable Set String %T[5]% from the clipboard contents
    // ZIP T6
    Text Type (Simulate Keystrokes): <ESC><TAB>
    Delay: 350 milliseconds
    Clipboard Copy
    Variable Set String %T[6]% from the clipboard contents
    // Phone T7
    Text Type (Simulate Keystrokes): <ESC><TAB>
    Delay: 350 milliseconds
    Clipboard Copy
    Variable Set String %T[7]% from the clipboard contents
    // Toll Free T8
    Text Type (Simulate Keystrokes): <ESC><TAB>
    Delay: 350 milliseconds
    Clipboard Copy
    Variable Set String %T[8]% from the clipboard contents
    // Cell T9
    Text Type (Simulate Keystrokes): <ESC><TAB>
    Delay: 400 milliseconds
    Clipboard Copy
    Variable Set String %T[9]% from the clipboard contents
    // WebSite T10
    Text Type (Simulate Keystrokes): <ESC><TAB>
    Delay: 400 milliseconds
    Clipboard Copy
    Variable Set String %T[10]% from the clipboard contents
    // E-Mail T11
    Text Type (Simulate Keystrokes): <ESC><TAB>
    Delay: 400 milliseconds
    Clipboard Copy
    Variable Set String %T[11]% from the clipboard contents
    // ALT E-Mail T12
    Text Type (Simulate Keystrokes): <ESC><TAB>
    Delay: 400 milliseconds
    Clipboard Copy
    Variable Set String %T[12]% from the clipboard contents
    // Hour T13
    Text Type (Simulate Keystrokes): <ESC><TAB>
    Delay: 650 milliseconds
    Clipboard Copy
    Variable Set String %T[13]% from the clipboard contents
    Window Activate: WordPad
    Wait for Window Title: WordPad
    Text Type (Simulate Keystrokes): %T[1]%
    Text Type (Simulate Keystrokes): %T[2]%
    Text Type (Simulate Keystrokes): %T[3]%
    Text Type (Simulate Keystrokes): %T[4]%
    Text Type (Simulate Keystrokes): %T[5]%
    Text Type (Simulate Keystrokes): %T[6]%
    Text Type (Simulate Keystrokes): %T[7]%
    Text Type (Simulate Keystrokes): %T[8]%
    Text Type (Simulate Keystrokes): %T[9]%
    Text Type (Simulate Keystrokes): %T[10]%
    Text Type (Simulate Keystrokes): %T[11]%
    Text Type (Simulate Keystrokes): %T[12]%
    Text Type (Simulate Keystrokes): %T[13]%

     

    These are the results:

     

    Roger

    1030B Orlando Dr

    De Pere Doubled

    De Pere

    WI

    54115-9094

    920-336-2603

    920-336-7775

    Cell Phone

    shannon.gretz@mascocs.com

     

    Like I said the results are so random it never has the same problem twice. Any help would be greatly appreciated.

     

    Bob

  7. In the Text Type Box there are 3 options for "Playback". The first two I understand, but the 3rd I was having a little trouble with. I was hoping someone could explain it to me a little better? The Help states:

     

    Send Text Directly to Control

     

    If a Control Variable is previously defined, the text entered in this command is typed into the selected Window Control. The control chosen must be able to accept text input. Otherwise this command will appear to do nothing.

     

    What exactly does this mean?

     

    Thanks,

     

    Bob

  8. I am copy name, company, address, city, state, zip, phone, etc into Text variables 2-15. I then want to paste the information into ACT! We are using ACT! Premium 2010. When I am pasting the Variables into each field, it seems that the tabs between the fields are not consistent. When I do a Text Type to drop the Variable into the proper fields, it seems that the when I drop the variable it is also dropping an enter at the end of the data. But when I thought that I figured it out, it didn't seem to be the case every time. Sometimes there is one too many tabs and some times there is one two few tabs. Not sure if maybe there is a better way to do things.

     

    I also wanted to make sure how long those items stay in their respective variable. If I have one macro that copies everything into the variable can I use another Macro to paste the variables into ACT? Do the variables stay as is until I overwrite them?

     

    Bob

  9. By using the Macro I posted in the message above I was able to load 3 websites into one Window, each on their own tab.

     

    I had also written the following Macro to Load the same 3 websites. The macro below checks to see if the Website is already open and if not loads it (in it's own window).

     

     

    Variable Set String %Web Title 1% to "Netflix - "

    If Not Window "%Web Title 1%" is running

    Web Site, "http://www.netflix.com", using Internet Explorer

    End If

    Variable Set String %Web Title 2% to "DVD Empire"

    If Not Window "%Web Title 2%" is running

    Web Site, "http://www.dvdempire.com/", using Internet Explorer

    End If

    Variable Set String %Web Title 3% to "IMDb Pro"

    If Not Window "%Web Title 3%" is running

    Web Site, "http://pro.imdb.com/", using Internet Explorer

    End If

     

    I tried to piece the two Macros together but it isn't working. I want to use the Macro from the Post above because it loads all 3 sites into one IE window on seperate tabs. But I want the functionality of the 2nd macro to check if the Website is already open and if not then continue on. This is the way I pieced them together:

     

    Mouse Move: 1644, 1189 Relative to Screen

    Delay: 3 seconds

    Get Mouse Position into (%N[1]%, %N[2]%) Relative to Screen

    Variable Set String %Web Title 1% to "Netflix - "

    If Not Window "%Web Title 1%" is running

    Mouse Move: %N[1]%, %N[2]% Relative to Screen

    Mouse Left Click

    Text Type (Simulate Keystrokes): <DELETE>

    Delay: 1 seconds

    Text Type (Simulate Keystrokes): nf

    Delay: 1 seconds

    Text Type (Simulate Keystrokes): <ENTER>

    Delay: 3 seconds

    End If

     

    It seemed logical to me but I am getting a sytax error at line six.

     

    Sorry for such a long post but I was really hoping that someone could shed some light on this or guide me in the right direction. I basically want to use the Macro from the post above, but have the functionality of the Macro included with this message.

     

    Any help will be greatly appreciated!

     

    Bob

  10. So far I have got to this point.

     

    Mouse Move: 1644, 1189 Relative to Screen

    Delay: 3 seconds

    Get Mouse Position into (%N[1]%, %N[2]%) Relative to Screen

    Mouse Left Click

    Text Type (Simulate Keystrokes): <DELETE>

    Delay: 1 seconds

    Text Type (Simulate Keystrokes): nf

    Delay: 1 seconds

    Text Type (Simulate Keystrokes): <ENTER>

    Delay: 3 seconds

    Mouse Move: %N[1]%, %N[2]% Relative to Screen

    Mouse Left Click

    Text Type (Simulate Keystrokes): <DELETE>

    Delay: 1 seconds

    Text Type (Simulate Keystrokes): de

    Delay: 1 seconds

    Text Type (Simulate Keystrokes): <ENTER>

    Delay: 3 seconds

    Mouse Move: %N[1]%, %N[2]% Relative to Screen

    Mouse Left Click

    Text Type (Simulate Keystrokes): <DELETE>

    Delay: 1 seconds

    Text Type (Simulate Keystrokes): im

    Delay: 1 seconds

    Text Type (Simulate Keystrokes): <ENTER>

    Delay: 3 seconds

     

    Note: Next 4 lines are unrelated to the macro. It's just the way I create shortcuts.

    The use of nf - de - im is a short cut I create in Reg

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\nf.exe

    nf.exe is http://dvdempire.com

    I use many short cuts this way.

     

    The only thing I have left to do is do some knid of check to make sure the sites are not already in Internet Explore. Some kind of an "IF" statement. I could use help on the "IF"

     

    Bob

  11. I have noticed that if i open TreePad manualy, no macro the following takes place.

    Tree pad, after it opens, wants to place it's self it the closing position and it the size it was when last closed.

     

     

    I shorted it down to:

     

    Launch Program and Activate Window: Program "treepadxenterprise.exe", Parameters "", Window "TreePad X Enterprise"

    Delay: 4 seconds

    Window Reposition: TreePad X Enterprise Move to the bottom-left corner

     

    Here is what I get:

    TreePad open's it's self basted on the above condition but does not place it's self on the right monitor,"1".

     

    Fact: when opened manualy TreePad opens. Than it changes to another window to last open position and size than closes the original window. A 8 second delay don't even have an effect.

     

    Bob

  12. I made a change:

     

    Launch Program and Activate Window: Program "treepadxenterprise.exe", Parameters "", Window "TreePad X Enterprise"

    Wait for Window Title: TreePad X Enterprise

    Window Resize: TreePad X Enterprise Size: 880, 600

    Window Reposition: TreePad X Enterprise Move to the bottom-left corner

     

    a. The result was an open window of TreePad on the left monitor.

    b. A frome of the window, TreePad on the left monitor, where it should be.

    It is to the proper size and placement. But it's just a frame which has the TreePad name in upper left part of the frame as it should be.

     

    When I close the window of TreePad that's on the left monitor, original location, it also closes the replacement window on the right monitor. Remember the window of TreePad on the right monitor is noting more than a Frame, nothing in the middle except for the main window backgroung (Blue).

     

    Bob

  13. I'm trying to change the size and location of a window.

     

    Note: :unsure: No need to read the following three messages by amerifax, unless you want to tell be why (Current Window) is the fix for my problem. I sure would like to know. At least Current Window has me up and running.

     

    Launch Program and Activate Window: Program "treepadxenterprise.exe", Parameters "", Window "TreePad X Enterprise"

    Wait for Window Title: TreePad X Enterprise

    Window Resize: TreePad X Enterprise 384 Gb (single user) Size: 880, 600

    Window Reposition: TreePad X Enterprise Position: 2716, 418

     

    <LAUNCH PROGRAM AND ACTIVATE WINDOW Title="TreePad X Enterprise" Exact_Match="FALSE" Wildcards="FALSE" Path="C:\\PRG\\Office\\TreePadXSU\\treepadxenterprise.exe" Mode="\x00" Default_Path="TRUE" Wait="1" Wait_For_Program="7"/>

    <WAIT FOR WINDOW TITLE Title="TreePad X Enterprise" Partial="TRUE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/>

    <WINDOW RESIZE Option="\x01" Title="TreePad X Enterprise" Partial="TRUE" Wildcards="FALSE" Method="\x00" Width="880" Height="600" _IGNORE="0x0006"/>

    <WINDOW REPOSITION Option="\x01" Title="TreePad X Enterprise" Partial="TRUE" Wildcards="FALSE" Method="\x00" Left="2716" Top="418" Monitor="1" _IGNORE="0x0006"/>

     

    It loads the window but will not change size or location. No matter if I try to change location to monitor 1 or 2. I do want it on my right monitor #2.

     

    Bob

  14. I think part of what Cory is getting at is that this particular issue has been dealt with over and over ad nauseum on both the ME3 boards as well as ME Pro.

     

    Frankly, Excel is a bear to work with directly. It is generally easier to do like Cory suggests and copy the entire range of cells you're trying to manipulate and utilize functions like Text File Process and ASCII File Process commands (or, as he actually suggested, the Split String command).

     

    Copy the range is something I never thought of doing. So the general idea that we are talking about is removing the values from Excel as a range than do the manipulation. I would emagine removing the range would be the same as when I do a cell by puting the range into a variable.

     

    In the past going to a program and using the arrow key to go from cell to cell and doing a variable on each one seemed so easy. But things change.

     

    Bob

  15. I keep getting you guys to process the text instead of doing it this problematic way but some horse just won't drink :)

     

    My guess is that you second and third copies are happening too fast for the clipboard. Try adding delays of at least 200mS between each operation.

     

    Might I also suggest you copy all three cells at once and use the Split String command on a tab character to bust them into a 3 element array. If you are interested I can give you a quick example. Might help you start to see the beauty of processing the text in variables instead of inching thru Excel with all it's timing pitfalls.

     

    Why do I will I'm getting a slap on the wrist? This horse is still looking for the water.

     

    Yes I sure am open to a better way for the mouse trap. I keep on getting my finger cought in what used to work.

     

    Bob

  16. I am trying to copy a few cells (A,B,C) from Excel. I am trying to copy them into Variables (one each). To test this out, I opened up Notepad and Pasted the Variables into there. Each time I run the Macro, It is only pasting the Value from Variable 1 (%T[1]%).

     

    Basically in A,B,C I have First Name, Middle Initial, Last Name;

    I go into A, copy, "Variable Set String T[1] from the clipboard, then I tab and do the same for B-T[2] and C-T[3].

     

    When I try to paste I am only getting the value from T[1]:

    <TEXT TYPE Action="0" Text="%T[1]%<ARROW RIGHT>%T[2]%<ARROW RIGHT>%T[3]%"/>

     

    I have tried using only one Variable and pasting, but the only one that works (even alone) is T[1].

     

    Do you know what I might be doing wrong?

     

    Heather (for Bob)

×
×
  • Create New...