Jump to content
Macro Express Forums

All Activity

This stream auto-updates     

  1. Yesterday
  2. Last week
  3. Thanks @Cory, @acantor. I think Variable Set Integer is the perfect option I am looking for. I will try that.
  4. // Ask the user for starting coordinates... Variable Set Integer %x%: Prompt Variable Set Integer %y%: Prompt // Move the mouse pointer to these coordinates... Mouse Move: %x%, %y% Relative to Screen
  5. Variable Set Integer has a user input option.
  6. Hello all, Is it possible to change the X,Y position of "Mouse Move" based on the User Input? User Input - like we get for Repeat Prompt Start! I need it for one of my application where where menu structure changes based on the configuration. Item in the menu goes Up or Down based on the configuration.
  7. Could you type a space first then the numbers? Then a ShortKey macro I think would work. Have the macro delete the space after. My suggestion seems a little sloppy thought.
  8. Samrae, My thinking on the 15 seconds may be wrong. I originally added the delay, because my macro kept going through the commands over and over again. Adding a 15s delay made that tolerable. Since I made the change you suggested, the macro keeps running, but does not continue playing the commands. So, I don't think the 15s delay is needed anymore. After your last suggestion, I went with the 100 ms you show above and deleted the 15s delay. Everything froze again, and I had to log out. I changed the 100ms to 5000ms, and it seems to work OK for now. // Get computer name! Macro Run: !NA GLB Mini Tool, Get Computer Name // Home Computer If Variable %T[90]% Equals "ABRAHAM" Mouse Move: 135, 245 Relative to Screen Delay: 250 milliseconds Mouse Left Click Text Type (Simulate Keystrokes): <HOME> Text Type (Simulate Keystrokes): <ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ENTER> Delay: 250 milliseconds Text Type (Simulate Keystrokes): <TAB> Mouse Move: 920, 276 Relative to Screen End If // Work Computer If Variable %T[90]% Equals "LUT4477" Mouse Move: 2700, 243 Relative to Screen Delay: 250 milliseconds Mouse Left Click Text Type (Simulate Keystrokes): <HOME> Text Type (Simulate Keystrokes): <ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ENTER> Delay: 250 milliseconds Text Type (Simulate Keystrokes): <TAB> Mouse Move: 3480, 276 Relative to Screen End If // Run the macro until the window is closed. Variable Set String %T[77]% to "Not" Repeat Until %T[77]% Equals "Done" If Not Window "Bookmarks - Google Chrome" is running Variable Set String %T[77]% to "Done" Macro Stop End If Delay: 5000 milliseconds End Repeat <COMMENT Value="Get computer name!"/> <MACRO RUN Use_ID="FALSE" Name="!NA GLB Mini Tool, Get Computer Name" ID="-1" Wait="TRUE"/> <COMMENT Value="Home Computer"/> <IF VARIABLE Variable="%T[90]%" Condition="\x00" Value="ABRAHAM" IgnoreCase="FALSE"/> <MOUSE MOVE Option="\x01" X="135" Y="245" _PROMPT="0x000A"/> <DELAY Flags="\x02" Time="250"/> <MOUSE LEFT CLICK/> <TEXT TYPE Action="0" Text="<HOME>"/> <TEXT TYPE Action="0" Text="<ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ENTER>"/> <DELAY Flags="\x02" Time="250"/> <TEXT TYPE Action="0" Text="<TAB>"/> <MOUSE MOVE Option="\x01" X="920" Y="276" _PROMPT="0x000A"/> <END IF/> <COMMENT Value="Work Computer"/> <IF VARIABLE Variable="%T[90]%" Condition="\x00" Value="LUT4477" IgnoreCase="FALSE"/> <MOUSE MOVE Option="\x01" X="2700" Y="243" _PROMPT="0x000A"/> <DELAY Flags="\x02" Time="250"/> <MOUSE LEFT CLICK/> <TEXT TYPE Action="0" Text="<HOME>"/> <TEXT TYPE Action="0" Text="<ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ENTER>"/> <DELAY Flags="\x02" Time="250"/> <TEXT TYPE Action="0" Text="<TAB>"/> <MOUSE MOVE Option="\x01" X="3480" Y="276" _PROMPT="0x000A"/> <END IF/> <COMMENT Value="Run the macro until the window is closed."/> <VARIABLE SET STRING Option="\x00" Destination="%T[77]%" Value="Not" NoEmbeddedVars="FALSE"/> <REPEAT UNTIL Variable="%T[77]%" Condition="\x00" Value="Done"/> <IF NOT WINDOW Option="\x01" Title="Bookmarks - Google Chrome" Partial="TRUE" Wildcards="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%T[77]%" Value="Done" NoEmbeddedVars="FALSE"/> <MACRO STOP/> <END IF/> <DELAY Flags="\x02" Time="5000"/> <END REPEAT/>
  9. If you intended to have your macro wait 15 seconds after the Bookmarks window closes you should not use Macro Stop. No macro commands, including the Delay command at the end, will run after the Macro Stop command. Instead use Break. That skips to the macro command after the End Repeat. However, in this case, neither Break nor Macro Stop is needed because setting T77 to Done will stop the repeat loop. Try something like this: // Run the macro until the window is closed. Variable Set String %T[77]% to "Not" Repeat Until %T[77]% Equals "Done" If Not Window "Bookmarks - Google Chrome" is running Variable Set String %T[77]% to "Done" End If Delay: 100 milliseconds End Repeat Delay: 15 Seconds You still need some delay inside the repeat loop for the reason stated above.
  10. The delay after End Repeat will never be used. It should look like this: Macro Stop End If Delay: 15 Seconds End Repeat Without the delay inside the repeat loop Macro Express will run these macro commands as quickly as possible without slowing or stopping. It will use 100% of one of your CPU cores. This puts your macro into what your computer considers an infinite loop. I wouldn't be surprised if more than Chrome freezes. And Terry is right, your delay command contains 15 milliseconds instead of 15 seconds.
  11. terrypin, seconds Just had a problem though! My Chrome froze up and I had to log out. I'm thinking it has to do with the macro.
  12. @Samrae: Neat! @snekmeseht: Seconds or milliseconds at the end? Terry, East Grinstead, UK
  13. Samrae, I am trying out your suggestion, and it seems to work the way I want it to. See the last part of the code. I added the 15 seconds delay at the end to slow down the cycling of the code while the Bookmarks webpage is active. // Get computer name! Macro Run: !NA GLB Mini Tool, Get Computer Name // Home Computer If Variable %T[90]% Equals "ABRAHAM" Mouse Move: 135, 245 Relative to Screen Delay: 250 milliseconds Mouse Left Click Text Type (Simulate Keystrokes): <HOME> Text Type (Simulate Keystrokes): <ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ENTER> Delay: 250 milliseconds Text Type (Simulate Keystrokes): <TAB> Mouse Move: 920, 276 Relative to Screen End If // Work Computer If Variable %T[90]% Equals "LUT4477" Mouse Move: 2700, 243 Relative to Screen Delay: 250 milliseconds Mouse Left Click Text Type (Simulate Keystrokes): <HOME> Text Type (Simulate Keystrokes): <ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ENTER> Delay: 250 milliseconds Text Type (Simulate Keystrokes): <TAB> Mouse Move: 3480, 276 Relative to Screen End If // Run the macro until the window is closed. Variable Set String %T[77]% to "Not" Repeat Until %T[77]% Equals "Done" If Not Window "Bookmarks - Google Chrome" is running Variable Set String %T[77]% to "Done" Macro Stop End If End Repeat Delay: 15 milliseconds <COMMENT Value="Get computer name!"/> <MACRO RUN Use_ID="FALSE" Name="!NA GLB Mini Tool, Get Computer Name" ID="-1" Wait="TRUE"/> <COMMENT Value="Home Computer"/> <IF VARIABLE Variable="%T[90]%" Condition="\x00" Value="ABRAHAM" IgnoreCase="FALSE"/> <MOUSE MOVE Option="\x01" X="135" Y="245" _PROMPT="0x000A"/> <DELAY Flags="\x02" Time="250"/> <MOUSE LEFT CLICK/> <TEXT TYPE Action="0" Text="<HOME>"/> <TEXT TYPE Action="0" Text="<ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ENTER>"/> <DELAY Flags="\x02" Time="250"/> <TEXT TYPE Action="0" Text="<TAB>"/> <MOUSE MOVE Option="\x01" X="920" Y="276" _PROMPT="0x000A"/> <END IF/> <COMMENT Value="Work Computer"/> <IF VARIABLE Variable="%T[90]%" Condition="\x00" Value="LUT4477" IgnoreCase="FALSE"/> <MOUSE MOVE Option="\x01" X="2700" Y="243" _PROMPT="0x000A"/> <DELAY Flags="\x02" Time="250"/> <MOUSE LEFT CLICK/> <TEXT TYPE Action="0" Text="<HOME>"/> <TEXT TYPE Action="0" Text="<ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ENTER>"/> <DELAY Flags="\x02" Time="250"/> <TEXT TYPE Action="0" Text="<TAB>"/> <MOUSE MOVE Option="\x01" X="3480" Y="276" _PROMPT="0x000A"/> <END IF/> <COMMENT Value="Run the macro until the window is closed."/> <VARIABLE SET STRING Option="\x00" Destination="%T[77]%" Value="Not" NoEmbeddedVars="FALSE"/> <REPEAT UNTIL Variable="%T[77]%" Condition="\x00" Value="Done"/> <IF NOT WINDOW Option="\x01" Title="Bookmarks - Google Chrome" Partial="TRUE" Wildcards="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%T[77]%" Value="Done" NoEmbeddedVars="FALSE"/> <MACRO STOP/> <END IF/> <END REPEAT/> <DELAY Flags="\x02" Time="15"/>
  14. Earlier
  15. You can do this using MEP's file and folder commands. Iteratively search down though all folders. Why don't you just search from the command prompt using the Directory command? It's super simple. from the root of the drive E.G."C:\" type "dir myfile.doc /s". The "s" switch searches subdirectories. Run it as an administrator in order to see files in sensitive areas. You can direct the output to a file if you like also. You could also use the External Script facility in MEP.
  16. Why don't you use a popup menu in MEP? And instead of clicking that link in your bookmarks bar, have that button take you to that URI and fill out the page? There are also automation extensions for all the popular browsers. You might be able to have one of them sense the URI and launch your macro. Though if you're going that route, you may as well have that automation tool fill out the form for you.
  17. Cory and Samrae, Thanks for the suggestions. I will try them both out in the near future. I'll let you know what works for me.
  18. The problem is that one can't see the color because the line has the cursor. The selected line has the normal highlight which makes the background invisible. Closing and opening like Acantor suggests has the effect of having no line selected. But once you select that line, one can't unselect it. I.E. after clicking anywhere in the main window, there always need to be at least one selected.
  19. I suggest Controls commands. He's not interested in doing it the easy way.
  20. Another way to accomplish this is to not let the macro halt until the window has been closed. If a specific macro is running it cannot be activated again. This demonstrates using Notepad. Text Box Display: Note_pad is running Repeat Until %Done% Equals "Done" If Not Window "Notepad" is running Variable Set String %Done% to "Done" Macro Stop End If Delay: 1000 milliseconds End Repeat <TEXT BOX DISPLAY Title="Note_pad is running" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;}\r\n\\viewkind4\\uc1\\pard\\qc\\cf1\\f0\\fs28 Notepad is running\\cf0\\fs20 \r\n\\par \\pard \r\n\\par }\r\n" Left="Center" Top="Top" Width="455" Height="76" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x02" Delay="0"/> <COMMENT/> <REPEAT UNTIL Variable="%Done%" Condition="\x00" Value="Done"/> <IF NOT WINDOW Option="\x01" Title="Notepad" Partial="TRUE" Wildcards="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%Done%" Value="Done" NoEmbeddedVars="FALSE"/> <MACRO STOP/> <END IF/> <DELAY Flags="\x02" Time="1000"/> <END REPEAT/> In this example the text box display has a window title of "note_pad" because if that window title is "notepad" the macro never ends.
  1. Load more activity
×
×
  • Create New...