Jump to content
Macro Express Forums

Samrae

Members
  • Posts

    452
  • Joined

  • Last visited

  • Days Won

    22

Posts posted by Samrae

  1. 17 minutes ago, UAMike said:

    I am not getting the desired outcome. Where do you put the %LF% and %CR% variable within the Modify String command? I tried putting it in 'text to replace' ("-A%LF%%CR%") but then it ends up trying to replace %LF%%CR% as a string value.

    Generally, in Windows, this appears as CRLF, not LFCR.  Try this:

      Variable Modify String: Replace "-A%CR%%LF%" in %Temp% with ""

    • Like 1
  2. acantor:

     

    3 hours ago, acantor said:

    When I have used updating text boxes, Macro Express created a new text box each time. So if the updates occur every second for five minutes, Macro Express opens 300 new windows. All windows close when the script completes, but I prefer not to see dozens (or hundreds or thousands) of extra windows. So I usually incorporate a "Text Box Close " into the loop.

     

    To avoid having 300 new windows put the first Text Box Display before the Repeat Start command:

    Variable Set Integer %Count% to 1
    Text Box Display: Progress    <--- BEFORE Repeat Start
    Repeat Start (Repeat 10 times)
      Delay: 1000 milliseconds
      Variable Modify Integer %Count%: Increment
      Text Box Update: Progress
      Text Box Close: Progress
    End Repeat

     

  3. Something like this might work:

    Variable Set Integer %MacroNumber% to a random value between 1 and 8
    Switch( %MacroNumber% )
    Case: 1
      Macro Run: Macro 1
    End Case
    Case: 2
      Macro Run: Macro 2
    End Case
    Case: 3
      Macro Run: Macro 3
    End Case
    Case: 4
      Macro Run: Macro 4
    End Case
    Case: 5
      Macro Run: Macro 5
    End Case
    Case: 6
      Macro Run: Macro 6
    End Case
    Case: 7
      Macro Run: Macro 7
    End Case
    Case: 8
      Macro Run: Macro 8
    End Case
    End Switch

     

  4. 1 hour ago, kunkel321 said:

    Another idea I had was (when the application is already open) right-click on the Minimize button, top right of window. 

    This is a great idea! I just created a macro that does just that. It is going to be very handy. 

    FYI: I could not get this technique to work with Visual Studio 2017 because it uses non-standard minimize, maximize and close buttons.

    Thank you for the idea. Here is what I have so far. This is activated by a Mouse Event, right-click, area on screen, minimize button.

    Variable Set String %WindowTitle% to topmost window title
     
    If Variable %WindowTitle% Contains "Macro Express"
      Web Site, "https://www.macros.com", using Default Web Browser
    End If
     
    If Variable %WindowTitle% Contains "Microsoft Outlook"
      Web Site, "https://answers.microsoft.com/en-us/outlook_com/forum?sort=LastReplyDate&dir=Desc&tab=All&status=all&mod=&modAge=&advFil=&postedAfter=&postedBefore=&threadType=All&isFilterExpanded=false&page=1", using Default Web Browser
    End If
     
    If Variable %WindowTitle% Contains "- Microsoft Visual Studio"
      Web Site, "https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=visualstudio", using Default Web Browser
    End If
     
    If Variable %WindowTitle% Equals "FileZilla"
      Web Site, "https://forum.filezilla-project.org/", using Default Web Browser
    End If
     
    If Variable %WindowTitle% Contains "- Eclipse"
      Web Site, "https://www.eclipse.org/forums/", using Default Web Browser
    End If
     
    If Variable %WindowTitle% Contains "- Google Chrome"
      Web Site, "https://accounts.google.com/signin/v2/sl/pwd?service=groups2&passive=1209600&continue=https%3A%2F%2Fproductforums.google.com%2Fforum%2F&followup=https%3A%2F%2Fproductforums.google.com%2Fforum%2F&authuser=0&flowName=GlifWebSignIn&flowEntry=ServiceLogin#!categories/chrome", using Default Web Browser
    End If
    <VARIABLE SET STRING Option="\x05" Destination="%WindowTitle%"/>
    <COMMENT/>
    <IF VARIABLE Variable="%WindowTitle%" Condition="\x06" Value="Macro Express" IgnoreCase="TRUE"/>
    <WEB SITE URL="https://www.macros.com" Wait="FALSE" Default_Browser="TRUE" NoEmbeddedVars="FALSE" _IGNORE="0x000C"/>
    <END IF/>
    <COMMENT/>
    <IF VARIABLE Variable="%WindowTitle%" Condition="\x06" Value="Microsoft Outlook" IgnoreCase="TRUE"/>
    <WEB SITE URL="https://answers.microsoft.com/en-us/outlook_com/forum?sort=LastReplyDate&dir=Desc&tab=All&status=all&mod=&modAge=&advFil=&postedAfter=&postedBefore=&threadType=All&isFilterExpanded=false&page=1" Wait="FALSE" Default_Browser="TRUE" NoEmbeddedVars="FALSE" _IGNORE="0x000C"/>
    <END IF/>
    <COMMENT/>
    <IF VARIABLE Variable="%WindowTitle%" Condition="\x06" Value="- Microsoft Visual Studio" IgnoreCase="TRUE"/>
    <WEB SITE URL="https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=visualstudio" Wait="FALSE" Default_Browser="TRUE" NoEmbeddedVars="FALSE" _IGNORE="0x000C"/>
    <END IF/>
    <COMMENT/>
    <IF VARIABLE Variable="%WindowTitle%" Condition="\x00" Value="FileZilla" IgnoreCase="TRUE"/>
    <WEB SITE URL="https://forum.filezilla-project.org/" Wait="FALSE" Default_Browser="TRUE" NoEmbeddedVars="FALSE" _IGNORE="0x000C"/>
    <END IF/>
    <COMMENT/>
    <IF VARIABLE Variable="%WindowTitle%" Condition="\x06" Value="- Eclipse" IgnoreCase="TRUE"/>
    <WEB SITE URL="https://www.eclipse.org/forums/" Wait="FALSE" Default_Browser="TRUE" NoEmbeddedVars="FALSE" _IGNORE="0x000C"/>
    <END IF/>
    <COMMENT/>
    <IF VARIABLE Variable="%WindowTitle%" Condition="\x06" Value="- Google Chrome" IgnoreCase="TRUE"/>
    <WEB SITE URL="https://accounts.google.com/signin/v2/sl/pwd?service=groups2&passive=1209600&continue=https%3A%2F%2Fproductforums.google.com%2Fforum%2F&followup=https%3A%2F%2Fproductforums.google.com%2Fforum%2F&authuser=0&flowName=GlifWebSignIn&flowEntry=ServiceLogin#!categories/chrome" Wait="FALSE" Default_Browser="TRUE" NoEmbeddedVars="FALSE" _IGNORE="0x000C"/>
    <END IF/>

     

  5. As acantor said, displaying each iteration will slow down the macro. When I have a long macro I update the iteration counter every 25, 50, 100 or 1000 times. Yes, experiment to decide what you like best.

    Text Box Display: Test
    Variable Set Integer %DispCount% to 0
    Variable Set Integer %DispInterval% to 25
    Repeat Start (Repeat 100000 times)
      Variable Modify Integer %DispCount%: Increment
      If Variable %DispCount% Is Greater Than or Equal To "%DispInterval%"
        Text Box Update: Test
        Variable Set Integer %DispCount% to 0
      End If
    End Repeat
    <TEXT BOX DISPLAY Title="Test" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\b\\f0\\fs28 %Count%\\b0\\fs20 \r\n\\par }\r\n" Left="701" Top="409" Width="116" Height="103" Monitor="0" OnTop="TRUE" Keep_Focus="FALSE" Mode="\x01" Delay="0"/>
    <VARIABLE SET INTEGER Option="\x00" Destination="%DispCount%" Value="0"/>
    <VARIABLE SET INTEGER Option="\x00" Destination="%DispInterval%" Value="25"/>
    <REPEAT START Start="1" Step="1" Count="100000" Save="TRUE" Variable="%Count%"/>
    <VARIABLE MODIFY INTEGER Option="\x07" Destination="%DispCount%"/>
    <IF VARIABLE Variable="%DispCount%" Condition="\x04" Value="%DispInterval%" IgnoreCase="FALSE"/>
    <TEXT BOX UPDATE Header="Test" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\b\\f0\\fs28 %Count%\\b0\\fs20 \r\n\\par }\r\n"/>
    <VARIABLE SET INTEGER Option="\x00" Destination="%DispCount%" Value="0"/>
    <END IF/>
    <END REPEAT/>

    Also, instead of managing the repeat counter %Count% I suggest you tick the box in the Repeat Start command and enter %Count% there.

  6. It looks like there is a difference between a Floating menu and a Popup menu.

    When I click to choose the Menu Style for a popup menu I see:

    Quote

    Icons - Horizontal
    Icons - Vertical
    First Part of Macro
    Nickname and Scope
    Windows Default

    When I click to choose the Menu Style for a floating menu I see:

    Quote

    Icons - Horizontal
    Icons - Vertical
    First Part of Macro
    Nickname and Scope

    It looks like the "Nickname and Scope" choice is only available for a Popup menu.

    • Like 1
  7. How would you activate each macro? It may be possible to do a <CTRLD> in one macro and <CTRLU> in another but if your macros used keys for activation then it would not work. You may not be able to activate the second macro if the control key was down.

    I do not know if it will work but here is something to try:

    Ctrl / Right arrow keys down

    Text Type (Simulate Keystrokes): <CTRLD>
    Text Type (Simulate Keystrokes): <KEYD:VK_RIGHT>

    Ctrl / Right arrow keys up

    Text Type (Simulate Keystrokes): <CTRLU>
    Text Type (Simulate Keystrokes): <KEYU:VK_RIGHT>

     

  8. OT:

    Cory, From what I read the problems with 1809 were not caught by the Windows Insider Program and were distributed with the general release. And no, the problems did not affect millions of computers but they did affect 10s or 100s of thousands. Article about 1809 bugs.

    The articles I have read did not say that the Check for Updates has anything to do with the Insider Program. They say that Microsoft can tell if users click Check for Updates and give priority to them for installing new updates. Those authors are recommending that we do not manually click "Check for Updates". See  here here, and here.

    In general I agree with you about the importance of updating. However, sometimes it is not possible due to practical reasons.

    I am the administrator of 14 computers in 3 separate buildings. Of these 5 are still running Windows 7 because they would not update to Windows 10. They will have to be replaced, probably sometime after next January when Microsoft stops patching Windows 7. The remaining 9 are running Windows 10. Two of those have successfully updated to 1809. The other 7 remain on 1803. We have spent hours trying to get them to update to 1809 but Microsoft is not even offering that update for those computers.

    In my home office I have 5 computers. One still runs Windows 7 because it would not update to Windows 10. Only the two newest computers have successfully updated to 1809.

    One laptop is still running Windows 10 1703. Periodically it starts downloading an update slowing the computer so much it is unusable. Then it proceeds to install the update. It fails after a couple of hours and then reverts back to the previous version of Windows. And then it repeats the process. After spending hours on the phone with Microsoft they said to reformat the drive. It will take literally days to rebuild that computer. I'm not even sure where all the license keys are for all the software on it. It would be better to replace that computer. I am waiting until I can afford (both in price and time) to buy a new one. In the meantime I use Macro Express to watch for the update process and kill it.

    All of these computers that will not update are working great for their intended purposes. Neither I nor the organization I work for can afford to replace all those computers at this time. So, we practice safe computing with firewalls, security software, safe policies but cannot update Windows.

  9. 12 minutes ago, Cory said:

    You're way behind on your Windows version. You missed the fall update to 1809. That also means you might be missing many post 1809 updates. Many security and stability issues were fixed since your version. 

    Only a couple months before the spring update. 

    OT: The Windows 1809 was very buggy. It was released and pulled a couple of times. It was supposed to be released in September (09) but was not re-released until November. Microsoft has fixed some of the major issues but some bugs remain. I have several machines that are not even offered 1809.  I have read that the Windows update looks for certain hardware and may not offer specific updates if the updates are not compatible with the computer.

    Another interesting thing is that researchers discovered that if you click "Check for Updates" in Windows 10 you may be offered updates sooner than others.  The most recent advice is "Do not click Check for Updates" to allow others to beta test Microsoft's updates/patches.

×
×
  • Create New...