Jump to content
Macro Express Forums

rick

Members
  • Posts

    12
  • Joined

  • Last visited

rick's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Update on 5 minutely Reset Hooks Macro .... This seems to be working lately.I haven't had to restart MEP. Perhaps, it's not compatible with the Auto Restore option being on at the same time?
  2. Shortkeys only work on MEP restart ....... I disabled AutoRestore, and setup my Reset Hooks Macro to run every 5 min. However, my shortkeys still failed. Like you, only restarting MEP seems to fix the problem. No problem with slow text entry tho'.
  3. Learning VB Script ....... I know what u mean ...However, I'm sure ur no dummy when it comes to these things, and it's just a matter of getting a toe into the door, proceeding a bit at a time. I don't know VBScript but the bits of it I've seen look an lot like Visual Basic about which I know a tiny bit. May I suggest: Recording macros with Visual Basic for Applications in the Microsoft Office applications - it's a good way to see how what you do translates into code. I'll bet u did it with ME. Last time I looked (admittedly a long time ago), there a lot of web sites with tutorials and help on VB (haven't looked for VBScript). I bought a book to learn some basics. Now, u can download pdf's (to try b4 u buy, of course - search google for pdf files: eg Visual Basic 10 for Dummies filetype:pdf. Finally, if u can learn to how to use Visual Basics "Object Browser" to work out the relationships between objects, methods, properties etc and to find the appropriate Help on a command, I think that will save a bit of time eg so that u don't use a method or a property that doesn't belong to an object. I should also mention that the Microsoft Community forums offer help for programming problems.
  4. 'Scuz my ignorance but wot's HTA? Also, my suggestion for using VB: .... I looked up answers.com: "HTML Application" was the only thing that seemed "sensible", but I'm none-the-wiser. I'm no expert at VB. However (also, in theory), I would have thought the way to do it would be create a dialog in VB with a "UserForm", that you would eventually run (using MEP) as an ".exe". Add radio buttons to the form for your multiple choices. Presumably, you would save the state of your radio buttons (True/False) to a file when you close the dialog, and process the text file using MEP commands.
  5. I've had to turn on the "Auto Restore" option because the Keyboard Hooks seemed to be dropping. Despite this, I still seem to have a problem with shortkeys. I did write a scheduled macro to run every 10 min to Restore Hooks but disabled it when I found the "Auto" option - may need to renable it if the shortkey problem continues. Reset Hooks
  6. May I also suggest that the first line of posts say something relevant to the content of the post. The reason for this is that, if one wishes to use Outline Display Mode (for example, try it on this thread ), often the replies are listed as "quote, poster's name, and date" with no idea as to content. Admittedly, if you go to any other forum, netgroup etc all you'll see in an outline may be "re: whatever the subject is about". However, doing as I humbly suggest makes it a little easier to digest the posts. What do you all think?
  7. Do you mean that you think you can nest multiple Catch Error commands inside the End Error commands thus: On Error Catch Error: Control doesn't exist Goto:Do something or other End Catch Error Catch Error: The file could not be opened Goto:Do sumthing else End Catch Error Catch Error: The path does not exist Goto:Give up & go home End Catch Error Catch Error: The condition was not met within the specified amount of time Macro Stop End Catch Error End Error For what it's worth, I don't get a syntax error when I save this. I can see that the End Error sequence here is useful, or if you had many lines of code between the Catch Error - End Catch Error sequence. Otherwise, the simple "Halt Macro" error handling available with each command should be enough most times.
  8. Curious to know what the error log shows if you log all commands - do all the commands actually run? Don't know about you all, but I find this error logging feature useful in pointing out where my code goes pear-shaped (pretty often really.... ) Also, just to confirm, that for me, in my original macro the only 2 ways to stop that pesky Script Error dialog was: Handle the error with an On-Error - End Error sequence. Use a Log Error command with the option to suppress error messages, but the macro continues unless the error is handled. I would have thought the idea of putting error handling such as "Halt Macro" in the actual commands was to avoid having to use On-Error sequences just to stop a macro with about another 5 lines of code (seems inefficient to me - but I'm only a user ). So, I tend to agree ... bug rather than feature! Thanks for your hard work on this guys.
  9. What is supposed to happen is this:The macro pauses waiting for the ENTER key. If that doesn't occur after 120 seconds, I want the macro to halt without the Script Error dialog coming up. So far, the only method I've found to do this is to handle the error as I've shown. It works. But I find it an odd way to write code with all these "On-Error End-Error" sequences through it .... You're absolutely correct!When I check the error log for which commands have been run this is what I see: Line 31: Wait for Key Press The condition was not met within the specified amount of time Line 32: On Error Line 33: Catch Error Line 34: Macro Stop The 2 commands "End Catch Error" and 'End Error' can't run, but does it matter? The Macro is supposed to Stop. I don't know ... I don't understand a lot of this. Rick.
  10. Hi Cory, Sorry to take so long to reply - been busy also. My goal is both really. I don't really see the point of having the error handling options built into all the commands if you then need to dot your code with these "On Error - End Error" sequences. That's why say "Maybe I'm not getting it". Is there something I'm not understanding about this, such as a more efficient way to write the code? Certainly, with the example I give there's no point in having a Script Error dialog come up if I've written code to handle it! The first option sounds like the solution, I'll try it! I thought of the second but it's too global, and still doesn't stop the Script Error dialog. Yes... I don't think the Help explains it very well here, compared to rest which I usually find very good. Believe me ... tested the c*!p out this. Usually find works better in the morning than 12 MN tho'. Will do. Thanks for your helpful comments
  11. Hi, I get the dialog when I run the macro which I activate by a Hotkey, and if I allow the time delay for the "key press" to run out (10 sec when testing, 120 sec when I finally get it right). Heres the sample: <TEXT TYPE Action="0" Text="<ALT>sct"/> <WAIT FOR TEXT PLAYBACK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <WAIT FOR KEY PRESS Key="ENTER" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="120" _HANDLE="0x0014"/> <ON ERROR/> <CATCH ERROR Code="20"/> <MACRO STOP/> <END CATCH ERROR/> <END ERROR/> TIA Rick
  12. As you may be aware, the commands in MEP comes with an On Error tab, and the Help says that Halt Macro is the most likely choice/option. With the following: Wait for Key Press: ENTER If I set the "The condition was not met within the specified amount of time" error to Halt Macro, I get a dialog saying there's a Script Error. I can't find anything in the preferences to turn the dialog off completely (there's an option to automatically cancel it). The alternative seems to be to follow the previous code with: On Error Catch Error: The condition was not met within the specified amount of time Macro Stop End Catch Error End Error Is there a better way than dotting code with these On Error - End Error sequences? For example, in Visual Basic (not that I'm any expert), you can put error handlers at the end of the code using Labels, and GoTo after On Error code. Also, can you nest a series of Catch Error commands before an End Catch? TIA Rick
×
×
  • Create New...