Jump to content
Macro Express Forums

kunkel321

Members
  • Content Count

    206
  • Joined

  • Last visited

  • Days Won

    2

kunkel321 last won the day on March 1

kunkel321 had the most liked content!

Community Reputation

5 Neutral

About kunkel321

  • Rank
    Advanced

Contact Methods

  • Website URL
    http://www.nonags.org/members/kunkel321/index.html

Profile Information

  • Gender
    Male
  • Location
    Western Wa
  • Interests
    Wife and Daughter. Psychology stuff. Computer things.

Recent Profile Visitors

331 profile views
  1. I have never make a 'pixel searching' macro, but I believe others have. Like you said, if the "i" icon is always that same distance from the left, then that helps. I wonder though, what happens if you navigate this window with different keyboard keys? Does Tab Tab Tab have an effect? Or what about Spacebar or Alt+S?
  2. For me it is also appearing as acantor describes. Cannot "unhighlight" a single line of code, so you can never see the color.
  3. Thanks for the info, Terry. Hopefully everything is okay.
  4. Just thought I'd make a post to encourage him to write an updated version of the excellent book Macro Express Explained. That is all. 😁
  5. I'm not seeing this... But I am seeing another (possibly related?) error... MEpro 6.1.1.1 Win 10 I don't use the menu builder, but I did have a couple up sample popup menus built. I built a couple more. Top of screenshot is one of the new ones and the editor title bar does show "Menu Builder[Name]." Oddly, the older menu (that was disabled) cannot be opened or enabled... If I try to do either, I get the error report shown on the bottom of the image. I've emailed it to ... Bloody hell! I tried to re-create the error so I could see who I emailed it too, and this time the debugger tool crashed too! See below image. Anyway... The errant menu *does* work if I use the blue 'Run' button from the toolbar. I can run it -- just can't edit it, or enable it via right-click context menu.
  6. Re "wait for..." command. It occurred to me after posting, that "wait for webpage" might be better than "wait for window." I'm not sure. Also Re Terrypin's use of "restore text variable." Pretty cool! I did not know that this command was a thing. :- }
  7. One kludgy workaround might be to not have it activated by window title. Instead just have a link on the desktop. Then the macro is like: 1 open webpage 2 wait for window to be active 3 check boxes and stuff Then use that link as a shortcut to the website. It runs only once, only when you click on it. EDIT: -You can then (optionally) right click the link link and change its icon to look like your web browser. -Also note: As has been pointed out before on this forum, it is usually best to do web checkboxes via TextType <Tab><Tab><Space> rather than MoveMouse, Click, when possible.
  8. Not sure, but it might be your "if less than 7:00" part. The "< 7" part is fine, but the "< 00" part will always be true, because ME is not looking at it as a time, but as an integer (zero). EDIT: Actually I guess "< 0" would always be FALSE, because the time will never be a negative number...
  9. Do note that the "EndIf" command does not mean "end the macro if xyz is true." Rather is marks the end of a logic statement, similar to how "End Repeat" marks the end of a loop. I suspect that your macro would need something like: -Set variable to current date/time. -Convert variable to decimal -IF variable is greater than 6 - -IF variable is less than 7 - -End Macro - -End IF -End IF I haven't actually tried this however, so I'm not sure. EDIT: Scratch that. It's wrong. Maybe this? <MESSAGEBOX Caption="Starting" Message="Macro Stated." Icon="0"/> <DATE/TIME Format="h" Flags="\xB0" Date="7/29/2019 7:41:26 AM" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%timeTexTVar%" IsDateVar="FALSE"/> <VARIABLE MODIFY STRING Option="\x04" Destination="%timeTexTVar%" Variable="%timeIntegerVar%"/> <MESSAGEBOX Caption="Progress" Message="Variable is %timeIntegerVar%" Icon="0"/> <IF VARIABLE Variable="%timeIntegerVar%" Condition="\x04" Value="6" IgnoreCase="FALSE"/> <AND/> <IF VARIABLE Variable="%timeIntegerVar%" Condition="\x02" Value="8" IgnoreCase="FALSE"/> <MESSAGEBOX Caption="Logic TRUE Result" Message="The hour is 6 or greater, but less than 8." Icon="0"/> <ELSE/> <MESSAGEBOX Caption="Logic FALSE Result" Message="The hour IS NOT 6 or greater, but less than 8." Icon="0"/> <END IF/> This one checks for a 2 hour time window (6 to 8). Important: I'm not sure, but I think it won't know the different between AM and PM.
  10. Hi All. I'm trying to learn to use arrays--which I've never done. My experimental setup is as follows: I have a file on my Desktop called 4MacExp.txt. It contains four lines. foo bar bip wam I have a Text Variable called ProcessedFile that is an array variable with 10 parts. My (not working) code is as follows: <TEXT FILE BEGIN PROCESS Filename="C:\\Users\\SWKunkel\\Desktop\\4MacExp.txt" Start_Record="1" Process_All="TRUE" Records="1" Variable="%ProcessedFile%"/> <TEXT FILE END PROCESS/> <TEXT BOX DISPLAY Title="Variable results" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}{\\f1\\fnil\\fcharset0 Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 ProcessedFile[1]\r\n\\par ProcessedFile[\\f1 2\\f0 ]\r\n\\par ProcessedFile[\\f1 3\\f0 ]\r\n\\par ProcessedFile[\\f1 4\\f0 ]\r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> My textbox at the end has ProcessedFile[1] ProcessedFile[2] ProcessedFile[3] ProcessedFile[4] It seems like the processed parts of the text file should get saved into the first four components of the array, then get displayed in the textbox like foo bar bip wam It doesn't work though. I get an error: Undefined variable or the variable is the wrong type "%ProcessedFile%" Macro Name: ReadWriteIni Line Number: 1 I also tried ProcessedFile[] but that didn't work either. Ideas?
  11. What do you mean by "image recognition?" Do you really need it to look at a picture and say, that's a house. That's a tree. That's a face. Or is it actually Optical Character Recognition (OCR) that you want? Or do you actually want to compare multiple images against each other? Of course ME can't directly do any of that directly, but maybe you could get it to talk to other apps that can. If you want OCR, there's a pretty cool freebie http://capture2text.sourceforge.net/ I used to have an AutoHotkey script that called Cap2Text. I'm not sure if you could programatically get information back from it though.. There are free image-comparison tools too. I don't know if any are automatable though.
  12. If you want to visually see LTimer's value decrease, then I think you'll need a loop within a loop, where the inner loop shows your countdown once for ever time the outer loop loops. For example if VarNum gets set to 14, then that LTimer will appear 14 times. Each time it appears, it will count down from some value between approx. 54 and 57 seconds. Question: Do want LTimer to be reset with a different number 14 times? Or do you want it to keep using the same start value for each of the 14 loops of VarNum? Edit: Actually... I'm not positive if MacExpPro can even do a loop within a loop (sub-loop). Experimenting now.... Yes you can. It hurt my brain a little... Notice in screenshot, that yellow highlight shows the outer loop. Everything inside that loop is tabbed over to the right a few pixels. Then blue highlight shows the inner loop. At the bottom of the blue section is the inner "End Repeat" and at the bottom of the yellow is the outer "End Repeat". <VARIABLE SET INTEGER Option="\x05" Destination="%VarNum%" Minimum="4" Maximum="12"/> <TEXT BOX DISPLAY Title="Current Value" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}{\\f1\\fnil\\fcharset0 Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs28 The variable, \"VarNum\" currently has the value %VarNum%. \\f1 (BEFORE LOOP)\\f0\\fs16 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x02" Delay="0"/> <REPEAT UNTIL Variable="%VarNum%" Condition="\x02" Value="1"/> <DELAY Flags="\x01" Time="1"/> <TEXT BOX UPDATE Header="Current Value" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}{\\f1\\fnil\\fcharset0 Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs28 The variable, \"VarNum\" currently has the value %VarNum%. \\f1 (DURING LOOP)\\f0\\fs20 \r\n\\par }\r\n"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%VarNum%" Value1="%VarNum%" Value2="1"/> <VARIABLE SET INTEGER Option="\x05" Destination="%VarSub%" Minimum="50" Maximum="100"/> <TEXT BOX DISPLAY Title="Current Value Sub" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}{\\f1\\fnil\\fcharset0 Tahoma;}}\r\n{\\colortbl ;\\red0\\green120\\blue215;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs28 The variable, \\f1 VarSub\\f0 currently has the value %Var\\f1 Sub\\f0 %. \\f1 (BEFORE SUB LOOP)\\cf0\\f0\\fs16 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x02" Delay="0"/> <REPEAT UNTIL Variable="%VarSub%" Condition="\x02" Value="1"/> <DELAY Flags="\x02" Time="10"/> <TEXT BOX UPDATE Header="Current Value Sub" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}{\\f1\\fnil\\fcharset0 Tahoma;}}\r\n{\\colortbl ;\\red0\\green120\\blue215;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs28 The variable, \"Var\\f1 Sub\\f0 \" currently has the value %Var\\f1 Sub\\f0 %. \\f1 (DURING SUB LOOP)\\cf0\\f0\\fs20 \r\n\\par }\r\n"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%VarSub%" Value1="%VarSub%" Value2="1"/> <END REPEAT/> <TEXT BOX CLOSE Header="Current Value Sub"/> <END REPEAT/> <TEXT BOX CLOSE Header="Current Value"/> <MESSAGEBOX Caption="Done" Message="Macro finished. " Icon="0"/> This example is resetting VarSub (LTimer, for your purposes) each time the outer loop runs. If you wanted it to use the same value each time, I suspect you'd need to "hand-off" the value to yet another variable. Like Set VarNum Set LTimer -Begin Outer Loop -Set LTimerTemp (make it equal to LTimer) -Begin Inner Loop, Loop while LTimerTemp < 1. --blah blah --Decrement LTimerTemp = LTimerTemp -1 -End Repeat End Repeat Note that I think it's best practice to use a single Variable Array, rather than a bunch of individual variables... I'm not really sure how to do that though. 😕
  13. Did you inadvertently turn off the "auto-reset mouse and keyboard hooks" preference option?
×
×
  • Create New...