Jump to content
Macro Express Forums

Cory

Members
  • Posts

    4,207
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by Cory

  1. Just shooting from the hip: There is no text type command to hold an arrow key down like Shift Down so I reckon the best you can do is to have a repeat. In the repeat you would have a Text Type that would enter the Arrow Up and then have a 100mS delay or whatever. Before that you would ask the user for how many seconds and then multiply that time 10 (or inverse of the delay time if it’s variable) and have it repeat that many times. Then have that in a repeat loop that has a 3 minute delay so it runs every three minutes. Or better yet use the scheduler to fire it ever 3 minutes.
  2. Yes. Macro Stop. However you might want to use a Repeat Exit instead. Depends how your macro is structures.
  3. I don't know if I should help you, sounds like you're just trying to hack into someone's FTP site. Well I guess we should all have a little more faith in humainity. Just promise you're not doing anythign illegal with this, OK? I tried using a variable to do an FTP Connect and it worked fine. In the scripting editor I typed in %T1% in the password field and before that set T1 to my password. Of course all one can see are 4 dots. This worked flawlessly. Try cutting and pasting this into a test macro.
  4. I see what you are trying to do. I haven’t thought about this too much but I think this is how I would approach it. First I would run a repeat with parent folder. Let’s call the parent folder T1. In the repeat I would use an integer variable that would be incremented each iteration in order to count the number of folders. Let’s call that N1. Now let’s generate a random number less than N1. Do a Variable Set Integer and select the Set a Random Value. But here’s the trick. In the field for the maximum value set the value to %N1%. For the Choose Variable Name select N1. This simply overwrites N1 with the new random generated integer since we won’t need the number of folders any more. Then I would do another repeat with T1 each time setting T2 to the Replace With Name. I would then have it create N2 like we did N1 in the first repeat as a counter. But I would put an “IF” in there as well. If N1 = N2 then do a Repeat Exit which will cause it to exit the loop when the random value is reached. Now T2 is a randomly generated folder path! Quick and dirty. If you can’t get this to work or if I did a poor job of explaining please let me know and I’ll actually create one for you as an example.
  5. I’m not sure what your question is. Is your question “Can it be done?” If it is then the answer is yes, probably. Or are you asking for general advice? If this is the case I’m sure we could help you if we had a little more information. But maybe you are looking for someone to do it for you? If this is the case I could give you a hand. About a year ago I wrote a macro to harvest all the messages from a Yahoo group that was about to go supernova. There were 57,000 posts and Yahoo Groups had several foils designed to thwart exactly what I was doing. It took me 3 days and a half dozen machines all working in coordination to get the job done. BTW, the group admin and core group asked me to do it for them so it wasn’t like I was doing anything wrong. So I have some experience with this sort of thing and it sounds similar to what you are asking. You can email me at cory@bluepointdesign.com or call me at 760.612.4964.
  6. I'm sorry but I don't understand what it is you are trying to do. Could you explain in a bit more detail? You say you want to select a random file, does that mean that you want to randomly select a file from many or that you want to select a file that appears randomly? Which ever the case it sounds like you were looking to see a list of files instead of just one. If this is the case if you repeat with folder it will repeat once for each file name, each time writing that file name to the variable. So all you will see in the variable is the last file. So if you want to see all the files create a second variable as an accumulator. Inside the repeat loop append to the variable with the repeat variable. Add a CRLF at the end each time. Now you can display a list. To see how to generate teh CRLF click here. If you want to be able to choose one from this list you can write that accumulator to the multiple choice dialog box. Even though it’s only entered as one variable, %T2% perhaps, it will appear as several lines when you run the macro. Then if you choose the third one it will only take that line on to whatever else you want to do. I doubt this helps, I was just talking a stab at it. I you give us more detail we can help you better.
  7. You need to fist generate the CRLF as a variable. Click here to see a small subroutine I use all the tiem for this purpose. It does both but the important thing to understand is that an enter is actually two characters, carrige return and line feed. Might look like this in the script. As an asside you might consider modifing the file directly. Read each line in directly, do the substitution and write it back out to a new file. This would be a lot faster.
  8. This tracks with what I was seeing. However I thought my problem was worse than it was and there was another problem of my own making that was leading me to believe that the problem was more persistent than it was. I was trying to refresh as you suggested and thought it wasn't working but I was an idiot. For what I'm doing an F5 will work fine. In fact I can do it manually. But it is odd that Windows would show a folder in one Explorer window and the search in another can't find it! However the server is old and slow and sometimes it gets difficult. With the new server it should go away. Thanks again for the technical description, it’s good to know for the future.
  9. Setup: I have a macro that creates a text file listing all the folders in a specific folder on the file server. It also does some minor massaging and exclusions as it goes so it can be linked to in an Access database. All super simple and not enough to cause a problem. I use it to make sure there is an appropriately named folder for each client. Problem: This has been working great until just a little bit ago and now changes to the folder names, additions and such, are not being realized by ME. For instance if I add a folder and rerun the macro it doesn’t appear in the text file list. I check manually and the folder is there. Other weirdness: I don’t think this is ME’s fault. You see this is an old Windows 2000 server that’s a bit slow and way over tasked. I have noticed that if I have an explorer window open and do a search that same folder won’t appear n the search results. But I can open a new Explorer window next to it and see the folder clearly! Also in the past I’ve had instance where I’ve searched for a file and not been able to find it and later I could find it no problem even though nothing has changed. Question: Has anyone heard of this and if yes how can I get around this problem? Also is there something I can do in ME to get it to see these files? Is it possible that ME has some sort of cache of folder names that needs to be cleared before I rerun? Like I say I don’t think this is a ME problem per se but any advice would be very welcome. One last thing: If any developers read this it might be helpful to get a description of how ME accesses folders and files. What I mean is that obviously opening a folder in Windows Explorer will yield the correct result and the search does not which leads me to beleive that ME is using somethign more like the search mechanism to get directory listings. Could aid in troubleshooting to know where it gets its info from.
  10. Dude! How cool. I didn't even see that. Just what the doctor ordered! Thanks!
  11. I have an email settings macro that confirms user settings. However it is flawed because it appears ME only reads the email settings in the registry once at startup so it will still use the old settings until ME is reset. I see a command for restarting ME which I am considering using to get it to read the registry again but was wondering if there was an easier way where we could get it to read the email settings again without having to bail out of the macro. It's no biggie since it should only be once in a blue moon but I was just a wonderin'.
  12. Now it's working now. I was making a stupid mistake. Thanks for all your help.
  13. I had read something about those config files in Joe's book but your explanation is better. Thanks. For now since the network install is a pilot program and I only anticipate one macro using person to ever log into one machine I think I'll leave it set to the "All users use same settings" Now here's a problem I'm having. I used your variable trick and it's confirmed the machine is using HKLM as the hive for preferences. I have a little routine that checks the email settings and prompts the user if they are correct and if not gives them an opportunity to change them from the macro. Now early on the macro was complaining that the SMTP server wasn't valid which started me on this quest. I found a mistake in my email setting macro that wasn't relevant and after that I didn’t see the SMTP server error again. But now it’s doing something really strange. It tells me that it can not relay for “cory@bbluepointdesign.com”. This is my personal email address and the one I had defined when I created the macro and is the one on my machine currently. However the domain is different for this company so the server is correct in not allowing relay. But the HKLM registry settings have the user as autumn@companyname.com. So why is it trying to use my email address as the reply to? I checked the entire registry and my email address does not exist in that machine’s registry anywhere. So how the hell is it getting my email address? I’m totally baffled.
  14. Where's the registry value for the option to enable user individual settings anyway? I've looked and can't seem to find it. Am I doing this the wrong way? It seems a pain to have to use regedit to change options in ME if it's a 'no editor' installation. Is there an easier way. I was just trying this 'no editor' option out for a later rollout but if it's going to be this much of a pain maybe I should consider setting up security in the macros instead.
  15. I'm sorry, I should explain myself better. I'm trying to figure out how and where one can remotely edit the registry of a machine with no editor. When I remote to it I see no current user but rather an HKEY_Users followed by what looks like the GUID.
  16. OK, i'm being lazy here.... I don't know exactly how the registry loads current user settings but is there a way to edit the registry settign of a user who isn't currently logged in?
  17. You have impeccable timing my friend and your answer is just what I needed. Thanks! Now I just got to figure how this affects my macros... Oh, one more thing though. When I create a new user on the machine where does it get it's default registry settings? I think I remember Joe mentioning in his book in the setup section that there was a config file somewhere for the defaults.
  18. What hive does ME look in for email address, user name and SMTP server. I thought it was local_machine but I just did a run only install where there is no interface for options and it appears it my be looking in Current_User or someplace else for the SMTP server. Maybe someone could give me a general overview of where ME looks for settings when. Also how a new user gets defined would be nice to know too.
  19. Hey Joe, sorry I've been away for awhile. What I am seeking advice for and have been having trouble with it how to actually set the permissions. I don't mean functionally click and do but rather abstractly how one structures the permissions. NTFS has a zillion permutations of possible combinations but often the results are unexpected. You can have them apply to folders, subfolders and files in any combination and some overlap and override another like the delete permission for a folder. You can tell it not to delete the folder at that object level but the permission at the folder above for subfolders overrides. Arggg… I got close once to preventing a sub from being deleted but get this…. The user could delete the folder which would allow them to delete all the contents and then warn that you can’t delete the folder! Man, I’m driving myself nuts.
  20. Thanks! So far i've had one 'expert' on expert-exchange tell me it was impossible to do what I want. With so many possible variations I doubt it.
  21. That was an excellent answer, thanks! I had a misconception about locking. In my experience a lock means you can’t access it. Like AutoCAD. I did not know about the cache. This explains a lot. Now I’m still a little fuzzy on the locking. You’re explanation is good I’m just slow to learn. Is it fair to say this only applies to editing? And if there is only one person doing the editing would this not apply except for updating the cache? Given your explanation of caching and how locking works with the cache when a macro is being run it seems that I want to enable locking and sync. The cache setting is irrelevant. This way I can edit the macro file everyone is using by copying the used macro to a separate WIP macro (in the same file) and work on that one. This is important as I need to access other macros as subroutines. Then when I’m done I can rename it to the original name and hotkey and the next time a user runs it the macro will load. Also if a user is running the macro when I do this it’s no big deal as they will continue to execute the older version in cache which won’t be updated until the next time they run it. Did I get this right? One last question: What if you have a macro that runs for a long time? Something like a macro that loops indefinitely waiting for something to happen? Maybe it would be best to call that macro from a parent macro to force it to check periodically? Or run it as a scheduled item instead? What are your thoughts?
  22. Thanks for the quick response Kevo but some of my questions are still unanswered. In my case the server and network are sound. Let’s assume that I enable the sync and locking, now how should I work on this macro? Also could you explain how the locking and sync works? Finally and if still relevant could you explain how and when ME reads the lines of a macro file to execute. Does it read it once at startup and never again? Or maybe it reads the entire macro file once each time the macro is run. Or maybe it only reads one line at a time as it is executing. I know it’s rather technical but I’m curious and it would help me get a grip on how best to develop. For instance if it only read the code of one macro when it was run I would be free to work on another macro in that file without getting it confused. Hope you have a great weekend. Thanks!
  23. My hope is that Kevin will mainly answer this as I would like to know what the design intent was but of course all are welcome. I would ask him offline but I think many of us could benefit from the answer. Derfel brought a question about synchronization in “Line Numbers” that I too would like an answer to but since it was wondering off topic I thought I would ask it in a new post. Can you tell me what the best practice is for developing macros in a multi-user network environment? I was considering this the other day as I was once working on a macro while users were running it and weird things started happening for them so I swore off doing that. I was going to look into the implications of the sync feature but haven't gotten there yet. As it is now I have a couple of users on a network and we all access the same file. Sync is off. Currently I copy the macro in the macro file to work on while the users keep using the other. IOW I do not create another macro file. It seems stable but if I roll out a new change be deleting the old macro and renaming my development copy I have to have the users reload the MEX to realize the change. Since we are in a sort of trial stage this is no big deal but soon I’ll have a dozen or more so I’ll need another solution. I’ve heard of people copying macros to user’s machines, loading different MEX files from macros, using MXE file and all sorts of different things. What is best? I think that if users were only playing in this environment it would be best to have one file and use sync. But how and where should I do my development and how best should I implement my changes? One concern I have about sync is what functionally happen when it syncs? What if I change a macro while a user is running it and the sync kicks in? Maybe Kevin could explain when and how ME reads the lines of the macro to play, that would explain a lot. IOW does ME load the entire macro at the start of play or does it read it line by line as it’s being executed? That sort of thing. Many thanks in advance.
×
×
  • Create New...