Jump to content
Macro Express Forums

terrypin

Members
  • Posts

    2,232
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by terrypin

  1. I'm getting some more odd behaviour when running macros from the Script Editor (F9). Here's one example I've tried several times. When run with F9 the following takes about 60 seconds until the message appears. (That's excluding the short initial delay.) Yet run from ME Pro Explorer it takes a mere 2 seconds. A factor of 30:1. Variable Set String %T[1]% to "" Repeat Start (Repeat 10000 times) Variable Modify String %T[1]%: Append Text (Extra-) End Repeat Text Box Display: Result <VARIABLE SET STRING Option="\x00" Destination="%T[1]%"/> <REPEAT START Start="1" Step="1" Count="10000" Save="TRUE" Variable="%N[1]%"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%T[1]%" Value="Extra-"/> <END REPEAT/> <TEXT BOX DISPLAY Title="Result" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 There were %N[1]% repetitions.\r\n\\par \r\n\\par T1 = %T[1]%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> Could someone kindly try it and see if they get the same dramatic difference please. Is there some obvious likely reason I'm missing? -- Terry, East Grinstead, UK
  2. Mike, You'll stand a better chance of a practical solution if you give us a specific example, i.e. the URL and the drop-down you're targeting, as methods can vary a lot. But to get you started, here's one general approach. On the Advanced Google Search page at http://www.google.co.uk/advanced_search there's a drop-down box for Results per page. Part of your macro might look like this Keystroke Speed: 10 Milliseconds // Open web page Web Site: http://www.google.co.uk/advanced_search [internet Explorer - Wait to load] // You probably already have your text from the file in T1. In my simplified example, it's in the clipboard Variable Set String %T1% from Clipboard // Click the drop-down for Results per Page Mouse Move Window 729, 496 Mouse Left Button Click // This is a crude selection routine and would need streamlining for larger numbers of entries // If value = 10 then just key Enter If Variable %T1% = "10" Text Type: <ENTER> End If // If value = 20 then arrow down once If Variable %T1% = "20" Text Type: <ARROW DOWN> Text Type: <ENTER> End If // If value = 30 then arrow down twice If Variable %T1% = "30" Text Type: <ARROW DOWN><ARROW DOWN> Text Type: <ENTER> End If // If value = 50 then arrow down 3 times If Variable %T1% = "50" Text Type: <ARROW DOWN><ARROW DOWN><ARROW DOWN> Text Type: <ENTER> End If // If value = 100 then arrow down 4 times If Variable %T1% = "100" Text Type: <ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN> Text Type: <ENTER> End If Text Box Display: Conclusion Macro Return Here's the code if you want to try it )paste into Direct Editor): <SPKEY:0010><REM2:Open web page><HTTP2:2:T:http://www.google.co.uk/advanced_search><REM2:You probably already have your text from the file in T1. In my simplified example, it's in the clipboard><TVAR2:01:03:><REM2:Click the drop-down for Results per Page><MMW2:729,496><LCLK><REM2:This is a crude selection routine and would need streamlining for larger numbers of entries><REM2:If value = 10 then just key Enter><IFVAR2:1:01:1:10><TEXTTYPE:<ENTER>><ENDIF><REM2:If value = 20 then arrow down once><IFVAR2:1:01:1:20><TEXTTYPE:<ARROW DOWN>><TEXTTYPE:<ENTER>><ENDIF><REM2:If value = 30 then arrow down twice><IFVAR2:1:01:1:30><TEXTTYPE:<ARROW DOWN><ARROW DOWN>><TEXTTYPE:<ENTER>><ENDIF><REM2:If value = 50 then arrow down 3 times><IFVAR2:1:01:1:50><TEXTTYPE:<ARROW DOWN><ARROW DOWN><ARROW DOWN>><TEXTTYPE:<ENTER>><ENDIF><REM2:If value = 100 then arrow down 4 times><IFVAR2:1:01:1:100><TEXTTYPE:<ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN>><TEXTTYPE:<ENTER>><ENDIF><TBOX4:T:1:001387000525000278000200:000:ConclusionYou chose the value %T1%, That should now be in the drop-down box ready for continuing to another drop-dwn box or closing the web form.><MRETURN> -- Terry, East Grinstead, UK
  3. I'm guessing it's to give you a decent area to drag it around. BTW, what sort of things do you have in your menu, out of curiosity? -- Terry, East Grinstead, UK
  4. This is my second edit, around an hour after my first reply, as I've been doing further more methodical tests. With surprising results: Clipboard empty 100 repeats ME 3: 25.2 secs <REP3:01:000001:000001:00100:0:01:><CLIPE><ENDREP> ME Pro 24.8 secs <REPEAT START Start="1" Step="1" Count="100" Save="FALSE" Variable="%N[1]%"/> <CLIPBOARD EMPTY/> <END REPEAT/> Hardly any difference. Alternative emptying method 100 repeats ME 3: 1.4 secs <REP3:01:000001:000001:00100:0:01:><TVAR2:01:01:><TMVAR2:16:01:00:000:000:><ENDREP> ME Pro: 25.4 secs <REPEAT START Start="1" Step="1" Count="100" Save="FALSE" Variable="%N[1]%"/> <VARIABLE SET STRING Option="\x00" Destination="%X%"/> <VARIABLE MODIFY STRING Option="\x10" Destination="%X%"/> <END REPEAT/> <SOUND FILE File="C:\\Docs\\Sounds\\Wave\\BAROQ2M0.WAV" Wait="FALSE" _PROMPT="0x0007" _ENABLED="FALSE"/> Incredibly, about 20 times slower! 1 million repeats (99999 x 10) ME3: 2.1 secs <REM2:TEST 1: 1 million repeats, nothing inside loop><REP3:01:000001:000001:00010:0:01:><REP3:01:000001:000001:99999:0:01:><ENDREP><ENDREP> ME Pro: 2.2 secs <REPEAT START Start="1" Step="1" Count="10" Save="FALSE"/> <REPEAT START Start="1" Step="1" Count="99999" Save="FALSE"/> <END REPEAT/> <END REPEAT/> Hardly any difference. 1) What are those 0:00 times from Paul above? 2) This a Quad Core Q9450 2.66 GHz, 4 GB PC. 3) The alternative clipboard emptying method seems marginally slower in ME Pro here, not much faster as others have found. But how to explain why it's nearly 20 times slower than ME 3? -- Terry, East Grinstead, UK
  5. Although I now see why ME Pro prefers to specify it at opening time, and agree with your other main points, I can't at the moment think of any other of my major apps that ask me to specify a path first when I use File > New. Word, Excel, PowerPoint, PaintShop Pro, TextPad, IrfanView, Movie Editor Pro, GPS Utility, FastStone Image Viewer, CircuitMaker, GoldWave, MemoriesOnTV, etc, etc. They all open an empty file immediately without requesting a path. You specify that later with a File > Save As or similar. Typically that's after you've added some content and so have a good idea how you want to use the file. Similarly, all the minor programs/utilities I can think of off-hand are the same. Such as Notepad, WordPad, Paint, etc. As I said, it's no major problem now that I know that ME Pro has taken a different approach, but I'd still like to see: 1) A sensible default location 2) A File Save As menu item, like ME 3 and all my other apps. -- Terry, East Grinstead, UK
  6. I've no experience yet of concurrent operation with ME Pro so I'm hesitant to contribute at all. However, I've been bitten a few times when accidentally running macros from another application, Stiletto, and also when when both ME 3 and ME Pro were loaded. So I'll be very slow to dip my toe in this particular pond! However ... 1) I think Cory's right about that two-way issue on Player Lock. That seems a tool missing from the bag. But there's been no response from ISS yet so maybe I've misunderstood something fundamental (not for the first time!). 2) Therefore, while agreeing about the potential for all sorts of Good Things, I think Paul's analogy is flimsy. If say all the verbs in the dictionary had been omitted, either by accident or lack of thorough planning, then its users would have problems. And, if they weren't aware of the problem, their spoken and written work could prove embarrassing. 3) My only significant new point is this: IMO some worked examples illustrating how concurrent use works are badly needed in Help. -- Terry, East Grinstead, UK
  7. Sure does, thanks Cory! I'm pretty sure that the reason I was getting in a mess was that I was using N and T in commands like this Variable Set String %T[%N%]% from the clipboard contents. -- Terry, East Grinstead, UK
  8. Although I've studied the thread http://pgmacros.invisionzone.com/index.php...83&hl=array in which mfseeker suggested a way to achieve this, so far I've had no success. And I see nothing in Help about it. Can anyone post a simple example please? I've been trying to process a set of text values with a Repeat loop, to get all the values into T[1], T[2], T[3], etc, but I'm stumped. -- Terry, East Grinstead, UK
  9. Thanks Kevin. It seems ME Pro handles new files in a non-standard fashion. You must use Browse to specify the intended location when you open the empty file, instead of when you save it, unlike ME 3 and all other major applications I'm familiar with. No big deal once you realise, just unexpected! -- Terry, East Grinstead, UK
  10. OK, understood thanks Kevin. -- Terry, East Grinstead, UK
  11. I have two files A.MEX and B.MEX open in ME Pro Explorer. I want to move all of the macros from B to a category in A. I can drag all of them across successfully except any pop-up or floating menus. As a work-around I also tried r-clicking to use Copy macro, but that was greyed out. Both points by design (why?) or bugs? -- Terry, East Grinstead, UK
  12. It's closing the application, not the individual document (spreadsheet in this case). Seems to be unique to Excel (Word doesn't do it). But both of the following work OK here Text Type: <CONTROL><F4> Delay: 100 milliseconds Text Type: <ALT>fc Delay: 100 milliseconds -- Terry, East Grinstead, UK
  13. Up until now I had all my macros in one large file called FULL.mex and I've never given much thought to where it was kept. But in an attempt to speed up various rather sluggish operations I've now transferred some of those macros into a few other MEX files. I used File > New and populated the files with a selection of macros. But unlike ME 3, ME Pro has no File > Save As. Why is that please? So I used File > Close on each of my new MEX files. After restarting ME Pro, which automatically re-loaded FULL.mex, I used File > Open > Browse, expecting to see these new MEX files offered in the same folder as FULL.mex, C:\Documents and Settings\All Users\Application Data\Insight Software Solutions\Macro Express Pro. But no. A search showed that they had been saved in C:\Program Files\Macro Express Pro. I would never want to keep my user data in \Program Files (most of which is outside my 'backup area'). But I can't see a way of changing this path? Under Options > Preferences > File System, none of the 7 paths cover this. Does that mean I have to manage these externally, i.e. regularly move any MEX files to the required location? -- Terry, East Grinstead, UK
  14. Cory, Can I chip in here please, as I'm still as confused as Steve about all this. First, am I right in saying that when you talk about Local and Global variables, the definitions are as follows: Local = Not Global Global = Checkbox enabled against "Make this variable available to macros called by this macro" If so, then am I right that that phrase describing Global does not mean what it says? As Stan advised in that earlier thread I referenced and as you have just confirmed it does not make it available automatically, which was my original (and I think natural) interpretation. You have to redefine it in every macro you want to use it. As I said in post #9 of that thread: "Which somewhat undermines the value of flexible variable names IMO". If I've got that right, then in your view is that (the need for redefining in every macro, even after a Variable Restore) deliberate or is it a design flaw? -- Terry, East Grinstead, UK
  15. Isn't this the discussion we were having in this thread? http://pgmacros.invisionzone.com/index.php...pic=3505&hl In particular see my posts #4 and #9. I'm still not clear about it, as you can see from my comments there. -- Terry, East Grinstead, UK
  16. As a non-programmer I'm not into VBS stuff or scripting in general. But I'd like to try an amended version of that in ME Pro if I can get a bit of advice here on how to amend it please. I see from XP Task Mgr that with ME Pro I have these three processes running: MacExp.exe MacEdit.exe MacScript.exe I did try the script as it stands (while running a simple looping macro), but it didn't work. To be more accurate, the macro closed after about 4 seconds, which I think was a natural finish. -- Terry, East Grinstead, UK
  17. I was hoping ME Pro would add the facility for Firefox, but disappointingly it didn't. So I wrote this simple work-around a couple of weeks ago and it seems to be reliable. It just looks at the 'X' icon top left of the toolbar ('Stop loading this page'), which changes from red to grey when the page has finished loading. Obviously, the pixel position co-ordinates will differ for individual users. The macro is called Wait for FF web page ready. Delay: 500 milliseconds, without ability to halt Repeat Until %StopColour% Equals "10264995" Get Pixel Color at (112, 60) Relative to Current Window into StopColour Delay: 50 milliseconds, without ability to halt End Repeat Macro Return <DELAY Flags="\x03" Time="500"/> <REPEAT UNTIL Variable="%StopColour%" Condition="\x00" Value="10264995"/> <GET PIXEL COLOR Option="\x01" Rel_To_Screen="FALSE" X="112" Y="60" Destination="StopColour"/> <DELAY Flags="\x03" Time="50"/> <END REPEAT/> <MACRO RETURN/> I just add it as a Macro Run command after the Web Site command, like this: Web Site, "http://services.dial.pipex.com/eweb/", using Default Web Browser Macro Run: Wait for FF web page ready etc -- Terry, East Grinstead, UK
  18. Just place your macro inside a Repeat loop. Unfortunately, due to the bug I reported in this thread, you can't prompt in the obvious way at present, in a Repeat Start command. Pending the fix, you could do it with an extra command like this: Variable Set Integer %N[1]%: Prompt Repeat Start (Repeat %N[1]% times) // Place your Macro Run command here Text Box Display: This message every time the macro runs End Repeat <VARIABLE SET INTEGER Option="\x01" Destination="%N[1]%" Prompt="How many times do you want to repeat?" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/> <REPEAT START Start="1" Step="1" Count="%N[1]%" Save="FALSE"/> <COMMENT Value="Place your Macro Run command here"/> <TEXT BOX DISPLAY Title="This message every time the macro runs" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Your macro has just been run.\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <END REPEAT/> -- Terry, East Grinstead, UK
  19. Didn't the abort key specified in Options > Preferences > Playback > Abort Macro HotKey: stop it? In ME Pro I use Scroll Lock + Pause but I've reported cases where worryingly it didn't halt the macro, and I had to use Terminate. But as far as I can remember that emergency stop always worked reliably in ME 3. -- Terry, East Grinstead, UK
  20. I'd like to hear from ISS about this too, as I've never really understood why this and similar folders and files are created. The one you are asking about: C:\Docs\Insight Software in my case is not empty, containing Macro Express (subfolder) Address Book.txt (empty) macex.mex (1 KB) And that subfolder contains these: Macro Logs (empty sufolder) CodeSnippets.txt (Not empty, contains up-to-date info) Favorites.txt (Not empty, contains up-to-date info) I also have this empty folder: C:\Documents and Settings\All Users\Application Data\Insight Software And this one, which is not empty: C:\Documents and Settings\All Users\Application Data\Insight Software Solutions So, hopefully ISS will explain what's needed and what's redundant. [Hoffen wir also, dass ISS erklaert, was man unbedingt braucht und worauf man verzichten kann.] -- Terry, East Grinstead, UK
  21. Yes, I've often used Text Type <hotkey> commands instead of Macro Run <macroname> to activate a macro within a macro, usually when the hotkey was very familiar to me and therefore much faster than having to browse the list of macro names looking for the right one. (I also Text Type hotkeys associated with another program, Stiletto, which I' was using at least 10 years before ME. One of these days I really must remove all of those to make life less complicated!) They've been pretty simple (like pasting clipboard contents to a particular file) and so far I've not hit problems. But at present all my ME Pro macros still have Lock Player/Unlock Player constraining them. If I get into concurrency then I do expect issues -- Terry, East Grinstead, UK
  22. I'm glad you made that point as it's been a gripe of mine for ages. In this and several other forums. Other useful 3-letter words it prohibits are 'bug' and 'fix'. Not to mention people's names like Jim, Tom and Joe. Apart from plain and phrase types, it also badly restricts 'AND' searches ('+variable +bug +joe'). Is there anything the moderators can do about this please? To complement Kevin's suggestions, I'm wondering if there is anything in the later parts of this thread that might offer any help? http://pgmacros.invisionzone.com/index.php...pic=3398&hl -- Terry, East Grinstead, UK
  23. Paul, Any chance you could post or upload it please? I'd be very interested in studying your approach, although I'm committed to ME Pro now. Also, any thoughts from anyone on that remaining obstacle I described please? -- Terry, East Grinstead, UK
  24. Email: "Issue [iSS6474] submitted by you has been resolved. The change will be available with the next release of Macro Express Pro." Thanks ISS. -- Terry, East Grinstead, UK
  25. Email: "Issue [iSS6475] submitted by you has been resolved. The change will be available with the next release of Macro Express Pro." Thanks ISS. -- Terry, East Grinstead, UK
×
×
  • Create New...