Jump to content
Macro Express Forums

snekmeseht

Members
  • Posts

    13
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

snekmeseht's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. 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/>
  2. 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.
  3. 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"/>
  4. 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.
  5. I found that "wait for webpage" did not work well so I switched to "wait for window". It is doing the job. I also like @terrypin's idea. The problem is that the flag has to be cleared sometime later and before the next time the webpage is opened again. That can be done with another "scheduled" macro that runs later or by manually running a macro before opening the webpage again. Regards
  6. I ended up going with the kludgy workaround suggested by @kunkel321. At the same time, I replaced some of the mouse move and clicks with keyboard commands. I considered adding the flag suggested by @terrypin, but decided against it, because it seems to me another scheduled macro would be needed to reset the flag after some delay. Anyway, I now have a desktop icon that opens the webpage and launches the games. I really appreciate you guys helping me out. Thanks again.
  7. @kunkel321 and @terrypin. Thanks for the new info. I will try a few of your ideas in the coming days.
  8. Nothing surprising happens. It just runs each time the window regains focus. If I tab away and back, for example. I simplified the macro code and changed the activation to the Google search page, "Google - Google Chrome". Lock Player: Wait for running macros to stop Delay: 500 milliseconds Mouse Move: 960, 960 Relative to Screen Delay: 500 milliseconds Mouse Left Click Delay: 500 milliseconds Mouse Move: 70, 190 Relative to Screen Delay: 1000 milliseconds Mouse Left Click Mouse Move: 380, 209 Relative to Screen Delay: 750 milliseconds Mouse Left Click Mouse Move: 960, 960 Relative to Screen Delay: 1000 milliseconds Unlock Player <LOCK PLAYER Wait="TRUE"/> <COMMENT/> <DELAY Flags="\x02" Time="500"/> <MOUSE MOVE Option="\x01" X="960" Y="960" _PROMPT="0x000A"/> <DELAY Flags="\x02" Time="500"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x02" Time="500"/> <MOUSE MOVE Option="\x01" X="70" Y="190" _PROMPT="0x000A"/> <DELAY Flags="\x02" Time="1000"/> <MOUSE LEFT CLICK/> <MOUSE MOVE Option="\x01" X="380" Y="209" _PROMPT="0x000A"/> <DELAY Flags="\x02" Time="750"/> <MOUSE LEFT CLICK/> <MOUSE MOVE Option="\x01" X="960" Y="960" _PROMPT="0x000A"/> <COMMENT/> <DELAY Flags="\x02" Time="1000"/> <UNLOCK PLAYER/>
  9. The macro is very simple. Here it is. I've attached an image to show the activation. //This macro launches WNBA League Pass Lock Player: Wait for running macros to stop // Get computer name and open control panel. Macro Run: !NA GLB Mini Tool, Get Computer Name // Home Computer If Variable %T[90]% Equals "ABRAHAM" Delay: 500 milliseconds // Next 3 lines to push the "Launch" button Mouse Move: 960, 960 Relative to Screen Delay: 500 milliseconds Mouse Left Click Delay: 500 milliseconds // Next 3 lines to click on the "Adobe Flash Player" shield Mouse Move: 70, 190 Relative to Screen Delay: 1000 milliseconds Mouse Left Click // Next 3 lines to click on the "Allow" button Mouse Move: 380, 209 Relative to Screen Delay: 750 milliseconds Mouse Left Click // Next line positions the cursor Mouse Move: 960, 960 Relative to Screen End If // Next line keeps the macro from running over and over again. Delay: 30000 milliseconds Unlock Player <COMMENT Value="This macro launches WNBA League Pass"/> <COMMENT/> <LOCK PLAYER Wait="TRUE"/> <COMMENT/> <COMMENT Value="Get computer name and open control panel."/> <COMMENT/> <MACRO RUN Use_ID="FALSE" Name="!NA GLB Mini Tool, Get Computer Name" ID="-1" Wait="TRUE"/> <COMMENT/> <COMMENT Value="Home Computer"/> <COMMENT/> <IF VARIABLE Variable="%T[90]%" Condition="\x00" Value="ABRAHAM" IgnoreCase="FALSE"/> <DELAY Flags="\x02" Time="500"/> <MOUSE MOVE Option="\x01" X="960" Y="960" _PROMPT="0x000A"/> <DELAY Flags="\x02" Time="500"/> <COMMENT Value="Next 3 lines to push the \"Launch\" button"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x02" Time="500"/> <MOUSE MOVE Option="\x01" X="70" Y="190" _PROMPT="0x000A"/> <DELAY Flags="\x02" Time="1000"/> <COMMENT Value="Next 3 lines to click on the \"Adobe Flash Player\" shield"/> <MOUSE LEFT CLICK/> <MOUSE MOVE Option="\x01" X="380" Y="209" _PROMPT="0x000A"/> <DELAY Flags="\x02" Time="750"/> <COMMENT Value="Next 3 lines to click on the \"Allow\" button"/> <MOUSE LEFT CLICK/> <COMMENT Value="Next line positions the cursor"/> <MOUSE MOVE Option="\x01" X="960" Y="960" _PROMPT="0x000A"/> <END IF/> <COMMENT/> <COMMENT Value="Next line keeps the macro from running over and over again."/> <DELAY Flags="\x02" Time="30000"/> <COMMENT/> <UNLOCK PLAYER/>
  10. Update. When I changed activation to "Window is Opened". The macro does not activate at all. It only activates when set to "Window Gains Focus".
  11. For some reason, it never occurred to me to activate with "Window is Opened." I guess I didn't scroll through the options. I am trying it now, and it seems to do the trick. Thank you @acantor! @terrypin, thank you for the info! Time will tell if MEP continues to behave over time. And, I don't know how to share the macro.
  12. Sometimes, I try to write a window-title activated macro. For example, I might write a macro to check a few boxes on a particular website when I visit. The frustration is the macro keeps activating over and over. To manage this frustrating situation, I may add a delay at the end of the macro to slow down the repeat activations. Does anyone know how to set up a window-activated macro so that it works just once, that is to say only when the window opens and gets focus? Thanks for any tips!
×
×
  • Create New...