Jump to content
Macro Express Forums

terrypin

Members
  • Posts

    2,230
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by terrypin

  1. This has had me puzzled for a while so I wonder if someone can explain it please. As part of another exercise, I'm experimenting with the following very trivial macro, which simply activates Notepad, maximises it, and pops up a message. // Activate NotePad (already running) Activate Window: "Notepad" Wait For Window Title: "Notepad" Window Maximize: "Notepad" Text Box Display: Macro Return The actual code is: <REM2:Activate NotePad (already running)><ACTIVATE2:Notepad><WAITWIN2:000010:000000:Notepad><WMAX:Notepad><TBOX4:T:4:CenterCenter000278000200:005:Notepad has been opened and maximised><MRETURN> Note how I've entered just the partial name 'Notepad', not the full name 'Untitled - Notepad'. Now, if I run that from the script editor it fails to work properly. The message pops up OK, but Notepad has not been maximised. Yet if I change that command to Window Maximize: "Untitled - Notepad" it does work correctly. And if I activate from a hotkey instead of from the Scripting editor, either version works fine. Is there some obscure/undocumented issue at work here please? -- Terry, East Grinstead, UK
  2. Why use Get Pixel? In fact, I don't see how you could do it by that method. As I understand it, you want to copy a rectangular section of the screen and make that a new image in Paint, yes? So why not do it as you would do it manually, namely 1. Capture to clipboard with a screen capture program (or the Prt Scr key) 2. Open Paint 3. Paste. Use the known co-ordinates of the target rectangle with Mouse Move and dragging commands to specify it before your capture, if using aprogram like Snagit. Or do that afterwards in Paint if you've captured the whole screen with Prt Scr, and paste that extract to a new file. -- Terry, East Grinstead, UK
  3. I've successfully used the Mouse Left Button Down/Up commands before in various ways, but I'm stumped as to why this present little macro doesn't work. I'm simply trying to drag an entry in a list from one place to another, with familiar code like this: Mouse Move Screen %N3%, %N4% Delay 200 Milliseconds Mouse Left Button Down Delay 200 Milliseconds Mouse Move Screen %N1%, %N2% Delay 100 Milliseconds Mouse Left Button Up Delay 300 Milliseconds But it acts as if the mouse button has just been clicked, not kept down, so no dragging occurs. Maybe it's a quirk of the application itself, so if anyone has Google Earth and likes a puzzle... (Just try to drag an item in My Places.) -- Terry, East Grinstead, UK
  4. OK, thanks Stan, got it. I'd suspected that was the order, but it didn't seem to match what I saw. But prompted by your post I've checked an example more methodically and it does indeed square with date of creation. What had thrown me was that I have a fair number of macros scoped to several programs and windows. Viewed in scope order and searching for a specific application, I didn't see some of these until I widened the window and scope column. It's a neat tool, but pity it can't be hacked to alphabetic. -- Terry, East Grinstead, UK
  5. Thanks but I think perhaps you misunderstood? I'm talking about the system macro, "...the built-in Menu of Macros for Topmost Window", which is invoked by Ctl+Shift+Alt+z. Its menu is apparently built automatically, so it's not accessible in Macro Explorer as your solution seems to imply. As far as I can see its sequence seems fixed and follows no logic I can detect! -- Terry, East Grinstead, UK
  6. There are several sites that will display your 'internet IP' (as opposed to your 'computer IP', which is what the MX command Get IP delivers). For example: http://www.lawrencegoetz.com/programs/ipinfo/ http://www.computerhope.com/cgi-bin/systeminfo.cgi http://www.ipchicken.com/ http://www.liveipmap.com/ Using that last one you can get your IP into T99 with this short macro, and it doesn't appear to create a CR/LF in T99: // Get internet IP Web Site: [url="http://www.liveipmap.com/"]http://www.liveipmap.com/[/url] [Default Browser] Delay 2 Seconds Text Type: <TAB><TAB><TAB> Delay 100 Milliseconds Text Type: <CONTROL>c Variable Set String %T99% from Clipboard Delay 100 Milliseconds Text Box Display: Result Macro Return If you want to use your existing code, try adding the command Variable Modify String > Strip CR/LF for T99 -- Terry, East Grinstead, UK
  7. From Help: "This command will find the IP (Internet Protocol) address of the computer running the macro and save this address to a Text String variable" That sounds like exactly what it did, yes? What are you trying to do? -- Terry, East Grinstead, UK
  8. Why do you keep opening new threads? -- Terry, East Grinstead, UK
  9. That's odd, it was working fine here. Your example would just need the 6 tags editing. Maybe there was some corruption during my cutting/pasting, or I screwed up the post somehow. Hope you manage to get it working. I'm packing in for the night here, but may have some time to look at it again tomorrow. -- Terry, East Grinstead, UK
  10. The following is probably not the most elegant solution but it does the job: // Add tags to 3 lines (for pepperpod) Text Box Display: Opening message Variable Set String %T1% from Clipboard // Set a variable for a CR (EOL) Variable Set %T2% to ASCII Char of 13 // Set variables for the 6 tags needed Variable Set String %T21% "[LINE1TAG1]" Variable Set String %T22% "[\LINE1TAG]" Variable Set String %T23% "[LINE2TAG]" Variable Set String %T24% "[\LINE2TAG]" Variable Set String %T25% "[LINE3TAG]" Variable Set String %T26% "[\LINE3TAG]" // Create Line 1 in T4 Variable Set String %T3% "" Variable Set Integer %N1% to 1 Variable Set String %T4% "" Repeat Until %T3% = %T2% Variable Modify String: Copy Part of %T1% to %T3% Variable Modify String: Append %T3% to %T4% Variable Modify Integer: %N1% = %N1% + 1 Repeat End // Remove unwanted final CR from T4 Variable Modify String: Strip CR/LF from %T4% // Create Line 2 in T5 Variable Set String %T5% "" Variable Modify Integer: %N1% = %N1% + 1 Repeat Until %T3% = %T2% Variable Modify String: Copy Part of %T1% to %T3% Variable Modify String: Append %T3% to %T5% Variable Modify Integer: %N1% = %N1% + 1 Repeat End // Remove unwanted final CR from T5 Variable Modify String: Strip CR/LF from %T5% // Create Line 3 in T6 Variable Set String %T6% "" Variable Modify Integer: %N1% = %N1% + 1 Repeat Until %T3% = %T2% Variable Modify String: Copy Part of %T1% to %T3% Variable Modify String: Append %T3% to %T6% Variable Modify Integer: %N1% = %N1% + 1 Repeat End // Remove unwanted final CR from T6 Variable Modify String: Strip CR/LF from %T6% // Add tags Variable Modify String: Append %T4% to %T21% Variable Modify String: Append %T22% to %T21% Variable Set String %T4% "%T21%" Variable Modify String: Append %T5% to %T23% Variable Modify String: Append %T24% to %T23% Variable Set String %T5% "%T23%" Variable Modify String: Append %T6% to %T25% Variable Modify String: Append %T26% to %T25% Variable Set String %T6% "%T25%" Text Box Display: Tagged values Delay 100 Milliseconds Macro Return And here's the Direct Editor output if you're impatient to run it <REM2:Add tags to 3 lines (for pepperpod)><TBOX4:T:4:000671Center000428000200:000:Opening messageThis assumes you already have 3 lines of text copied from somewhere onto the clipboard. If not, do so now. Click OK to run the macro.><TVAR2:01:03:><REM2:Set a variable for a CR (EOL)><ASCIIC:2:1:13><REM2:Set variables for the 6 tags needed><TVAR2:21:01:[LINE1TAG1]><TVAR2:22:01:[\LINE1TAG]><TVAR2:23:01:[LINE2TAG]><TVAR2:24:01:[\LINE2TAG]><TVAR2:25:01:[LINE3TAG]><TVAR2:26:01:[\LINE3TAG]><REM2:Create Line 1 in T4><TVAR2:03:01:><IVAR2:01:01:1><TVAR2:04:01:><REP3:08:000001:000001:0003:1:01:T2><TMVAR2:10:03:01:N01:001:><TMVAR2:08:04:03:000:000:><NMVAR:01:01:1:0000001:2:0000001><ENDREP><REM2:Remove unwanted final CR from T4><TMVAR2:04:04:00:000:000:><REM2:Create Line 2 in T5><TVAR2:05:01:><NMVAR:01:01:1:0000001:2:0000001><REP3:08:000001:000001:0003:1:01:T2><TMVAR2:10:03:01:N01:001:><TMVAR2:08:05:03:000:000:><NMVAR:01:01:1:0000001:2:0000001><ENDREP><REM2:Remove unwanted final CR from T5><TMVAR2:04:05:00:000:000:><REM2:Create Line 3 in T6><TVAR2:06:01:><NMVAR:01:01:1:0000001:2:0000001><REP3:08:000001:000001:0003:1:01:T2><TMVAR2:10:03:01:N01:001:><TMVAR2:08:06:03:000:000:><NMVAR:01:01:1:0000001:2:0000001><ENDREP><REM2:Remove unwanted final CR from T6><TMVAR2:04:06:00:000:000:><REM2:Add tags><TMVAR2:08:21:04:000:000:><TMVAR2:08:21:22:000:000:><TVAR2:04:01:%T21%><REM2:><TMVAR2:08:23:05:000:000:><TMVAR2:08:23:24:000:000:><TVAR2:05:01:%T23%><REM2:><TMVAR2:08:25:06:000:000:><TMVAR2:08:25:26:000:000:><TVAR2:06:01:%T25%><TBOX4:T:4:001039000863000565000242:000:Tagged valuesT1 = Original clipboard = %T1% T4 = Tagged Line 1 = %T4% T5 = Tagged Line 2 = %T5% T6 = Tagged Line 3 = %T6%><MSD:100><MRETURN> Finally, here's an example of the output (in a message box): T1 = Original clipboard = Text line 1 A second line And a third final line of text T4 = Tagged Line 1 = [LINE1TAG1]Text line 1[\LINE1TAG] T5 = Tagged Line 2 = [LINE2TAG]A second line[\LINE2TAG] T6 = Tagged Line 3 = [LINE3TAG]And a third final line of text[\LINE3TAG] -- Terry, East Grinstead, UK
  11. Another one sorted! I found that the total number scoped to the application (for which I was automatically building a menu) just happened to be 36. After increasing it, I did indeed get them all in the menu. So that just leaves the question about the sequence. -- Terry, East Grinstead, UK
  12. I've just started trying the built-in Menu of Macros for Topmost Window but can't get any macro it builds to work. All fail on the very first command, with a message like this: "Macro Express encountered an error while attempting to read the next macro command..." Can others successfully use this important feature please? Is there a known problem with it? --------- Pleased to report that upgrading from 3.7b to Version 3.7d build 1, 3.7.4.1 seems to have fixed this. Is there any way to get more than 36 macros listed? Joe Weinpert in Macro Express Explained says on page 51 that this is possible, but I don't appear able to do it. Also, what sequence are they in and can it be changed? -- Terry, East Grinstead, UK
  13. Kevin, BTW, does that still work only for IE, or can I use it confidently in Firefox please? -- Terry, East Grinstead, UK
  14. OK Frank, here you go: I first put an arbitrary 18 names into a file called NameList1.txt, and your 5 domain name into DomainList.txt Here's the macro: // Randomising email addresses (for frank1968) // Ask how many entries are needed Variable Set Integer %N9% from Prompt Repeat with Variable using %N9% // Get a random number between 1 and 18 to decide the Name T1 Variable Set Integer %N1% with a Random Number // Get a random number between 1 and 99999 to decide the Number N2 Variable Set Integer %N2% with a Random Number // Convert the integer to a string (so that it can be padded) Variable Modify Integer: Convert %N2% to text string %T2% // Pad it with leading blanks Variable Modify String: Pad Left %T2% Replace " " with "0" in %T2% // Get a random number between 1 and 5 to decide the Domain T3 Variable Set Integer %N3% with a Random Number Text File Begin Process: "NameList1.txt" Text File End Process Text File Begin Process: "DomainList.txt" Text File End Process // Activate the form (in this case a Notepad document) Activate Window: "RandomEmailForFrank.txt - Notepad" // Enter the first two line (Name & Number) Text Type: %T1%<ENTER> Text Type: %T2%<ENTER> // Create the email adress and enter it as the third line Variable Set String %T4% "" Variable Modify String: Append "%T1%@%T3%" to %T4% Text Type: %T4%<ENTER><ENTER> // Repeat the loop again, until all the required entries have been made Repeat End Macro Return Here's the direct code: <REM2:Randomising email addresses (for frank1968)><REM2:Ask how many entries are needed><IVAR2:09:02:FHow many random entries do you want?FFCenter:Center><REP3:05:000001:000001:0009:0:01:><REM2:Get a random number between 1 and 18 to decide the Name T1><IVAR2:01:06:18><REM2:Get a random number between 1 and 99999 to decide the Number N2><IVAR2:02:06:99999><REM2:Convert the integer to a string (so that it can be padded)><NMVAR:05:02:0:0000002:0:0000000><REM2:Pad it with leading blanks><TMVAR2:14:02:00:005:000:><TMVAR2:21:02:01:000:000: 0><REM2:Get a random number between 1 and 5 to decide the Domain T3><IVAR2:03:06:5><BTFBEG:001:N00001:000001:C:\Docs\SUNDRY\Macro Express\NameList1.txt><BTFEND><BTFBEG:003:N00003:000001:C:\Docs\SUNDRY\Macro Express\DomainList.txt><BTFEND><REM2:Activate the form (in this case a Notepad document)><ACTIVATE2:RandomEmailForFrank.txt - Notepad><REM2:Enter the first two line (Name & Number)><TEXTTYPE:%T1%<ENTER>><TEXTTYPE:%T2%<ENTER>><REM2:Create the email adress and enter it as the third line><TVAR2:04:01:><TMVAR2:07:04:00:000:000:%T1%@%T3%><TEXTTYPE:%T4%<ENTER><ENTER>><REM2:Repeat the loop again, until all the required entries have been made><ENDREP><MRETURN> And this is what the result looks like when I specified 10: Peggy 92014 Peggy@three.com Mary 46249 Mary@three.com Elvis 82790 Elvis@two.com David 60355 David@four.com Buddy 02297 Buddy@three.com Buddy 64823 Buddy@one.com Jim 31594 Jim@one.com Luke 85162 Luke@one.com Peggy 55350 Peggy@three.com David 38314 David@four.com (Had to edit my first attempt as I'd padded with blanks instead of zeros. Looks OK now...) I've been generous with Remarks, so you should be able to see what's happening and tailor it as you wish. Come back if you need any further help. -- Terry, East Grinstead, UK
  15. First, please reassure us! I do hope you're not a potential mass email spammer? -- Terry, East Grinstead, UK
  16. I thnk this should do what you want, Meg. After logging in, click My Controls (top right) and then click Options > Email and make the settings I've shown: -- Terry, East Grinstead, UK
  17. What timing! I just came to the forum to ask almost exactly the same question (in my case replacing with a comma plus a space) and found this as the second post from top. Thanks Stan -- Terry, East Grinstead, UK
  18. Nick, As Stan mentioned, Alt+d seems to do it. Works for me in both Firefox and IE6. -- Terry, East Grinstead, UK
  19. Thanks Kevin. I'll explore that. I was wondering if there might be a more direct way of somehow repeatedly reading through the registry values downwards from that first one. -- Terry, East Grinstead, UK
  20. Hi Cory, Just been experimenting with this out of curiosity. The following commands Read Registry String: "DisplayName" Delay 100 Milliseconds Text Box Display: Macro Return gets me the first entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{00040409-78E1-11D2-B60F-006097C998E7}\DisplayName But how would you iterate from there through the entire long list? -- Terry, East Grinstead, UK
  21. Great, that sounds just the job. I haven't used that Text > Date/Time command before - I'll try it tomorrow. -- Terry, East Grinstead, UK
  22. I want to bring up a reminder every half hour about taking a break. I've done that easily enough by simply activating an image viewer with a specific JPG to come up full screen every 30 mins in the Schedule dialog. But now I realise I need something more refined than that. When the reminder comes up I get up from my PC and come back a variable amount of time later. Might be 2 minutes, might be 20. So I really want to leave the macro running while I'm away, close it on my return, and then not see it displayed again until 30 mins after that. Any suggestions would be appreciated please. -- Terry, East Grinstead, UK
  23. Thanks for that tip, which I'll try when my next macro refuses to work! -- Terry, East Grinstead, UK
×
×
  • Create New...