Jump to content
Macro Express Forums

Cory

Members
  • Posts

    4,207
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by Cory

  1. I'm guessing that the first bit of text is being copied from a cell. If you bring that into a text var it puts a CRLF at the end. That's a Carriage Return and a Line Feed Which is used to signify the end of a line. When combined as you have done it would cause Excel to think that there are two cells of data in two rows and thats how it pastes it. If this is the case after you copy your first cell and convert it to a string var try issuing the trim command on it. This will trim any nonprinting characters off the var. <TVAR2:01:03:><TMVAR2:01:01:00:000:000:> BTW this is actually a handy feature. When you copy ranges of cells in this way they become tab separated values. Like a CSV but with tabs. You can use this to process the blocks like with the ASCII File Process command. It's very handy! Oh, and this is a easy quick way yo get data back into Excel. Seperate your columns with tabs and rows with CRLF and you can paste it all in as one big block in one operation!
  2. Howdy Stan. I don't think I've crossed swords with you yet but I just want ot thank you for a suggestion that rocks! I saw nmanagers post and although I don't change the names of my subs that often it has happened and I didn't have a convenient cure. Until now that is! Thanks! Nmanager: Stan's suggestion worked pretty well for me. All you need to do is search for the string of the macro you're calling and it will take you right there. The gobbly gook you see is exactly what you will find in the direct editor and a macro run will look like <MACRUN2:My macro name>. So just look up to the name line above it and there's your macro.
  3. Yeah, what Kevin said. His way is better. For some reason I forgot that there was a If Clipboard Contains. IMHO it's better because it saves the use of a variable. But if the var will be used for something else then it might have merit.
  4. Copy the clipboard to a text var and then use the If Variable wiht the Contains option.
  5. Can't you just Text Type the password after waiting for the password popup?
  6. Once in a Save As dialog box I use controls to do my bidding. There is a good tutorial on controls in the sample file. But you can also use hotkeys. By that I mean the little underscore letters. For instance I might see "File name:" and since the N is underscored I can simply type N to get to this field. Here I would not just type the file name but the entire path \\Server\data\reports\2008\March\week1.txt. This is more intuitive than controls and there's not many drawbacks.
  7. Actually it follows boolean or set logic perfectly. If either of the two conditions linked by the OR is true then the overall condition is true. If I have a red car and a blue car and your logic is "car is not red" OR "car is not blue" then it is a true statement that the blue car is not red. Since the first is true and the second is false then the overall condition it true since you have met one of the conditions which is the definition of OR. But your confusion is common and is one of the reasons many systems, for instance file permission logic, preach keeping all the logic on the positive side especially when you compound this a dozen times. In this case if you had a multiple choice red, blue, green, and black then I would make the statement is black OR is green for your condition.
  8. Oops, sent to quick. In your multiple choice is result exclusive? IOW is it Radio Button or Checkbox? I'm trying to figure out what your intended logic is. Maybe if you could describe your desired logic in detail I could give you a better condition set.
  9. Well it's an OR condition so that's correct. When T93 is B then it satisfies the first condion that it does not contain B. Since it's an OR either condition satisfied makes it true.
  10. I just realized I'm being stupid, let me start again. If you choose to activate by window title that means the macro will fire when the window gains focus but it will only fire once. For instance I have a macro with "Calculator" window activation. If Calculator opens it runs once and only once. But if I click on a button it kind of refreshes the window and has the same effect as refocusing causing the macro to fire again. But if I install a 100mS delay after the button click the macro doesn't see this event. With the macro below I was able to fire only once and press the "7" key. Without the delay it fires over and over. <BEEP><GETCONTROL:01:CALCPLUS.EXE:002:SciCalcCalculator PlusButton7><CCLICK:T:01:0:T:><MSD:100>
  11. Kevin mentioned that he too had looked in their development environment for any such utility and came up empty. Strange isn't it? Anyway I made a feature request with ISS. Unlocker looks interesting but I'm afraid it won't work in this environment as the targets are on an file server and I don't see that it can convince the server OS to give up it's locks. Also I try to avoid another application when I can in a distributed environment. Thanks for all your help.
  12. The only thing I can think of is that the macro is reactivating over and over because whatever you are using for activation is still apparent. This is why the Macro Stop doesn't do anything because it just fires up again at the end of the macro. You might add a pause so you can see what happens after toy press the key and then figure out how to add a delay or whatever you need to avoid the reactivation.
  13. Silence can speak a thousand words.... Turns out there is no such functionality. After considering many options in the future I think I will test every file recursively and present the user with a list of locked files and if that results in no matches and the folder doesn't rename wit the normal rename command followed by an If Folder Exist then I know it's an explorer window that's open and I can report that to the users.
  14. You say this is being done in a notes database but it sounds like your describing regular file folders. I'll assume that they're regular file folders for this message, if I have that wrong please let me know. You would probably be better served by using the built in file and folder manipulation commands. Instead of coping and pasting in Windows Explorer I would use commands like Create Folder or Copy Files. In here you can insert logic that suits your need like having a repeat with a counter that you can use to create sequential file names. Also you can use other tricks like if that "08" represents the year you can generate that bit of the text from the Date/Time command so you don't have to modify your macro in 2009.
  15. Modify String Variables > Replace Substring and replace all instances of the quote mark with nothing is how I usually do it. <TMVAR2:21:01:01:000:000:">
  16. It should work. Check that you have the most recent version of ME and start an incident with ISS support.
  17. I am writing a macro that renames a network folder which is likely to be locked because a user has a file open. But I don't see an "If Folder Ready" like the "If File Ready". I tried the later with the folder path but it reports that it's not ready in all cases. I had considered recursively looking at each file in the folder to check it any of them were not ready but it's possible that all files are ready and it could still be locked. For instance if someone have an explorer window open to that folder it will cause a lock. Doe anyone know if there's an easy way to determine if the folder is ready? The best way I was able to think of so far was to create a batch file with the rename command and redirect the output to a file which I would read back in and if the file contains "Access is Denied" then I can run with that but this isn't a very elegant solution. The main benefit is that it doesn't error out and I can prompt the user to deal with it and repeat.
  18. Have you tried "View Source" and tried to divine them from the raw HTML? Generally I just use series of Tabs as I haven't found anything that's more reliable. But again the tab counts can change so you might have the same problem. Next time I get a project like this I'm going to experiment with WGET and see if I can in effect avoid using the browser.
  19. Just get it, you won't regret it. But to answer your question I find that about 25% of my research projects on a an ME function or whatever ends up with consulting the book. But one thing I like about his book is that although most of ME's help file is written plain English I often read something and think "Huh? What are they saying here?" and find that Joe has either said it a different way or more verbosely so that I can get what they were saying. Also it's easy to read so about a week after I got it I found myself reading it cover to cover. And although I didn't retain all of it the overview gave me a better understanding of all the capabilities so I could come back and further research items later when I had an application. I'll sell you a copy of the PDF for $18.95. Just kidding! Settle down Joe and have a glass of wine.
  20. Ha ha ha! Because mm should be 02 since mm is the month date code. Try "n" instead. And look closely, it's probably NN in your final example.
  21. Yes, under the text category there is a date/time command. You can use it to log the times to a file or what have you. There is also a datestamp in the debug command. And as long as the macro isn't running for more than a day the time calculations are fairly simple. However there are some pre-written routines for time calculations. Someone made a list of them here just about a week ago, you might check there if you need something more sophisticated. BTW, in the Date/time time command you can save just one component of the time like hour (h) so you don't have to parse it out later. So let's say you save the hour (24 clock), minute and seconds. in T1-3. Now convert to integer N1-3 and multiply N1*3600, N2*60, and then sum N1-3. Then just subtract the stop from start values and you have the running seconds.
  22. What I do as a workaround is to open another text box. Usually I have the main box prompting the user in the middle but I'll add another resizable dialog box over on the left side of the screen as a kind of tips or explanation box. Works well.
  23. There is a good tutorial using Calculator that helped me a lot. I think it's in the sample macro file and if not it's on their website.
  24. Sure. All you need to do is use a condition on the file type. You could use and "If" or a "Switch/Case". In aech one you would have a different routine for the different file types by extension.
×
×
  • Create New...