Jump to content
Macro Express Forums

Brain Virus

Members
  • Posts

    43
  • Joined

  • Last visited

Posts posted by Brain Virus

  1. I have the following logic inside a Repeat loop. There's a web site address in variable T5. If IE is not already running, the line after Else starts IE and goes to the web site and waits for the page to load. On subsequent Repeat passes IE is already running, so the macro highlights the address line with Alt-d and types in a new site id and we go to the site.

     

    Works fine every time with IE6. With IE7, Wait for Web Page never completes, it just hangs forever, regardless of whether IE is running or not when the macro starts.

     

    Ideas, anyone???

     

     

    // Start IE if not running, go to site.

    // If it is running then ALT-d to highlight

    // and paste in the site address and go to it.

    If Window Title "Internet Explorer" is running

    Activate Window: "Internet Explorer"

    Wait for Web Page: ""

    Text Type: <ALTD>d<ALTU>

    Wait Text Playback

    Wait for Web Page: ""

    Text Type: %T5%

    Wait Text Playback

    Wait for Web Page: ""

    Text Type: <ENTER>

    Wait for Web Page: ""

    Else

    Web Site: %T5% [internet Explorer - Wait to load]

    End If

    //

     

     

    what happens if you do a wait for window?

  2. That is one big mother of a macro. Whoever wrote it, somebody should tell him "work smarter, not harder".

     

    Agreed. I do some fairly complex actions at my job and i would be hard pressed to go over 200 lines. I know I cant because its a work macro but I would LOVE to look at that macro and see how much fat could be trimmed off of it. :D

     

    As for exercises... just find something you want to automate and go after it. Then if you hit a roadblock come post on here and we are happy to help. Another thing that helped me a TON was reverse engineering. Take a macro that was already written and then see how they do certain actions and handle certain situations.

  3. I think I'd try the GET IP ADDRESS first, only because it's almost instantaneous, unlike the ping which could take a second or more. If GET IP ADDRESS turns out to be less than 100 percent reliable, then do the ping in addition to getting the IP, as an extra confirmation.

     

    In my testing I noticed the ping command is near instantaneous, but you bring up a good point.

     

    /bows

  4. Can you do the GET IP ADDRESS command before your disconnect, save it in a variable, do it again after the reconnect, and compare to make sure it has changed?

     

    dang you are fast.

     

     

     

    OP,

     

    Another idea is to use the ping site command. If its connected it will grab a bunch of ping info. If its not connected it will return the variable "Unknown Host"

     

    But either idea should work fine.

  5. Someone created a Macro Express Program that was working fine for a long time, then craigslist changed their formatting and it no longer works. I think I just need the mouse to be repositioned, but I don't know. I need someone who knows this program to help. I'll pay a reasonable rate.

    mporter@apartmenthub.com

    617-501-6979 cell

     

     

    you know, you can get the help for free. Just post the macro on here and tell us the problem and we can trouble shoot it. :D

  6. We run a legacy program every occasionally where I work and I use macro express to emulate a print screen function that no longer works under windows XP. The script I wrote works great! The first time it's ran... The printing action requires the dos program to lose focus. Once it regains focus, macro express no longer catches any keyboard shortcuts and won't activate any macros. Any one have any suggestions?

    you might try resetting keyboard hooks

     

    <DOHOOK>

  7. After programing the menu how would one be able to add functions to it? I am a bit stuck while playing with this macro (very well done too) ty

     

     

    That shouldn't be to hard, you would have to determine those in the macro itself. Probably the easiest way would have a predetermined list of menu options that the user could type into their templates to activate the macros. Then have the dialog boxes set to save item text to %T80% or something. then do an if %T80% = user report email, run user report macro, end if and then just do that for all the different options.

     

    make sure to add this after the If statement for Delete Menu File and start over...

     

    hrmmm you know, i could write this so instead of the user typing in the options and risking a typo, you could have it present a list of different options for them to select from for each menu option. if you need that, go ahead and let me know and i will see what i can do.

  8. Hi Brandon,

     

    I tried this, but it seems to just not do anything. What I was hoping for was for the user to initiate the macro after they've selected the text (since this is the way the existing macro that I want to expand upon already works). As I suspected, this is probably not possible.

     

    Thanks.

     

     

    hrmm thats not good.

     

    Try this.

    Open up notepad and type some gibberish in it.

    Activate the macro.

    ALT Tab over to the notepad again. (dont click anywhere because the macro waits for a left mouse click to pull the first coordinate)

    Left click at the beginning of the text (i.e. if you typed "gibberish" click just to the left of the "g")

    pause for a second

    Then left click at the end of selection.

    the it should go and highlight the selection and then copy it and display a text box with the copied information.

     

     

    Now, we should be able to integrate this into your current macro, how does the text on the first program get selected in the first place?

  9. This should work with a MS Word document and some others:

     

    When your macro starts, data is already highlighted, so copy to clipboard and save in a text variable, T1.

     

    To reproduce the highlighting later, the macro will:

    Mouse click within the document screen to restore focus to the document.

    Ctrl-Home to go to beginning of document, or mouse click at upper left corner of the screen to stay on the same page.

    Ctrl-f or Alt-Edit-Find to open search box.

    Type T1 into the search box, type ENTER to do the search.

    At completion of the search, your text should again be highlighted.

     

     

    Thats if it has a cursor, i was thinking about that and just having them do that, but then I got thinking.. what if their program doesn't have a cursor? :P

  10. Apparently it's possible to select text in a macro if I know the mouse coordinates that I want.

     

    Is it possible to get the coordinates of an already existing selection, so that the macro could re-select the same thing again on that same page of the document? Suppose that when the macro starts, certain text is already selected (as if you were going to copy it). The macro copies it. Then the user has to select a different tool, which the macro can accomplish by keyboard shortcut -- but after the tool is selected, the previous text selection is no longer selected (that's just the normal way that the application we're working in works). Is there any way for a macro to save information about the previous selection such that it could re-select the same thing?

     

     

    Thanks.

     

     

    Meg

     

    See attached macro. It will allow you to define the area to select. It waits for the mouse click at the beginning and then grabs the coordinates and then it waits for you to click at the end of the selection. it will then go back and highlight the text in between and then copy it to the clipboard. Have your macro then open the second tool and do whatever it needs with the text and then have it reopen the first tool and repeat the first part of the macro so it will automatically highlight the selection again.

     

    Just a note, wait a half beat after clicking at the front and the end of the selection. If you click and move at the same time, it will grab a wrong coordinate.

     

     

    Text_Selection_Macro.mex

  11. Macros cannot delete password protected macros. I get an error saying the macro is locked when i try to do it. I attached my screen shot of the error.

     

    I think the only thing you can do is export all your used macros to a new .mex file then just overwrite the old .mex file too.

    Select the macros you wish to keep then:

    File -> Export -> Export Macros.

     

    Or create a new .mex file and import your macros both ways work :) enjoy.

     

    it looks like you are using vista. I was getting the same error when my .mex file was in: C:\Program Files\Macro Express3

     

    try moving your .mex file to C:\Users\USERNAME\Documents

     

    you will be able to use a macro to delete protected macros then

  12. Hi All,

     

    I have a strange request from one of my department members. They want me to create a macro which would be used by anyone irrespective of the department or anything. What I understand is they want a macro which will prompt the user to input the variable and it will create the multiple choices menu or boxes based on the input and create a macro based on the input received.

     

    I am trying to be clear. Let me give an example. When we start this macro it should prompt like: “How many boxes do you need in the first screen?”. If user gives 5 it should take the input and be able to create 5 boxes or multiple choice menu and then should prompt for the text for those 5 boxes and those should become the headings for those. It goes on creating like that until click cancel. Now the macro should save the macro with the inputs and that should become a new macro which can be used by others.

     

    The idea is if we create a sample macro like this it will not require us to create macros for every other department but just pass on this sample file and every department people based on their requirement will create from this file and start using the new created macro file.

     

    I know this a strange request (at least for me) and if anyone has any ideas please suggest and also if this is possible or not.

     

    it was a pain in the butt, but i wrote a demo menu for you. Going off this you can expand it as needed. Run the macro, and follow the prompts then run the macro again and voila... user defined macro menus!

     

    so far only main menu options 1 and 2 allow for editing a sub menu.

     

    from here using my example you can add variables that control the individual macros you need. sorry if i am rambling/cant type, its 4:22 am....

     

    ping me if you have any questions/need help (I promise I will be more coherent later :P)

     

    oh if you are running this on vista you need to run macroexpress program as an admin because it saves the macro menu info to C:\macro menu.txt. (obviosuly you can change that) right click on macroexpress icon and then click run as administrator.

     

    you owe me a cookie :P

     

    User_Defined_Multiple_Choice_Menu_Demo.mex

  13. I use my macro express to manipulate a program that generates random passwords and saves it to a variable. I would like to be able to edit that variable through macro express so it contains the requirements that our system uses.

     

    For example say it pulls the password of F9/vL30=

     

    I want to replace the /,L,0,and = with somthing else.

     

    I dont want characters like (@#%$, or Ll,Ii,Oo and 0 in the password. Also The password needs to have one upper case letter and one lower case letter and one number at minimun

     

    Or better yet, is it possible to write a password generator that will generate a password with those requirement with macro express?

×
×
  • Create New...