Jump to content
Macro Express Forums

Cory

Members
  • Posts

    4,207
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by Cory

  1. I don’t understand something. You say you were printing a variable? Could you describe that more?
  2. There must be something wrong. I routinely copy huge amounts of Excel data and don’t usually have a problem. Hint: If you want to highlight ranges in Excel use the F5 command. Works brilliant in ME. When you copy tables of data from an Office app it will be in the format of a tab separated value file with tabs and CRLF on the ends of lines. If I were you I would copy the clipboard to a variable and write that to a file. Then open that file with a hex editor. When you get to the point where it’s going wrong see what’s different. Otherwise you would need to post an example with instructions so one of use could see where you are going wrong.
  3. Cory

    Webdav

    I have two PF playlists, one is the entire collection and the other is form '71 (Meddle) on. And I have to admit I tend to listen to the later more. Although I'm thinking of removing "Obscured by Clouds". It's a rare day when I'm in the mood for early PF. I was just remarking to a buddy that Syd was probably the most famous rocker that never was. When news of his death was published I was surprised he was still alive! It was fun researching his life again though. That's one thing I love about the Internet and sites like Wikipedia, things that were huge enigmas growing up in Billings Montana are all laid bare now. I can loose an entire evening with a drink and the laptop revisiting the old rock days and learning how things really were. Have you ever listened to Water’s “The Pros and Cons of Hitchhiking”? I like Roger but I think a lot of that was things I was going thru at the time I was listening to him. If you’re interested I have a story about him from a good friend who had a close encounter. Send me a PM if you’re interested.
  4. Dude, you're joking. That's the ugliest website I've ever had. Like my home page? Captures my mission statement. I think it says "I'm too busy to put anythign meaningful here".
  5. Cory

    Webdav

    I appreciate it Floyd. Oddly enough I was just listening to the complete discography of Pink Floyd. I tip my hat to your graphic, I assume you’re a fan? I just ripped The Wall DVD to my HTPC as part of my reference collection this weekend too. Pretty corny to watch it these days but that was the early 80’s and if you’re a fan… I have a workable solution now so I’m going to get off this quest. But it sticks in my craw that I have to buy another application to do it.
  6. Sure. Use Windows Search and choose the option to search for text within files. But if it’s only on the second line you want to limit your search for then we need ME. First do a repeat with folder to plow thru all the files. If there are more than text files then you need to extract the extension from the path and add a condition that will pass on files that don’t have a “.txt” extension. Now that you have the file name do a Text File Begin Process. This normally reads each line into a text var as a repeat loop but you can tell it to start at row 2 and only process one row. Once it exits the loop your text var is now set to the second line of the file. Now all you have to do it add a condition to If Variable – Contains to determine if your text is in there. If it is move the file to Folder A. You will need to have an Else part to this condition and in the Else move to folder B. Anyway that’s how I would do it. But I haven’t finished my first cup of joe yet.
  7. First off let me say this is simple and if you just need to get it done and don’t have time to learn I’m available for hire. Also a macro like this would only take a matter of minutes to write so it would be pretty cheap. In this case what I would suck the entire text file into a text variable and then use the Variable Set Integer command and Get Position of Text in a Variable. Then add the number of characters to get to the space in front of the first digit of your number. For Input Rate :” I think the value is 13. Now I would delete that first part of the variable and do another Get Position to find the position of the first space which should be the first space after the number decrement it once and now Copy Part of Text to get your number! Variable Set String %T1% from File: "test.txt" Variable Set Integer %N1% from Position of Text in Variable %T1% Variable Modify Integer: %N1% = %N1% + 12 Variable Modify String: Delete Part of %T1% Variable Set Integer %N1% from Position of Text in Variable %T1% Variable Modify Integer: Dec (%N1%) Variable Modify String: Copy Part of %T1% to %T1% <TVAR2:01:04:c:\test.txt><IVAR2:01:13:1:Input rate :><NMVAR:01:01:1:0000001:2:0000012><TMVAR2:11:01:00:001:N01:><IVAR2:01:13:1: ><NMVAR:09:01:0:0000001:0:0000000><TMVAR2:10:01:01:001:N01:> You would simply add another chunk to the above code to do Output to a different variable. Now just save your variables to a file using Variable Modify String. Look on the second tab for those commands. You might check out my CRLF & TAB macro on my webpage. It can help you build a file. Like I said I'd be happy to write somethign for you too. You could send me some sample files and I can have you up and running in no time. Also I can teach you how I did it so you can tweak it later yourself.
  8. Cory

    Webdav

    Oh, products like SharePoint and HyperOffice depend on them.
  9. Cory

    Webdav

    Web-based Distributed Authoring and Versioning http://en.wikipedia.org/wiki/Webdav In XP and Vista one can have 'web folder' that allow one ot open a Windows Explorer window to a HTTP site. For instance I can open http://bluepointdesign.com and access all the files there as if they were a local folder. Vista/XP have two ways of accessing them. First is the web folders which is GUI only and first came with Office XP I think and the second is called a WebDAV Mini-redirector. Supposedly it will allow one to access them from a mapped drive. But the buzz on the street is that it's buggy and has tons of limitations. In any case I can't find any decent documentation on how to use it. I did find a bit of shareware called DriveOnWeb that maps a drive letter and seems to work with a secure site. But I get the feeling one could do it with the built in tools. My goal is to directly access and move files to the WebDAV site using ME internal file manipulation commands. But so far the web folders are only GUI.
  10. So when Window A is apparent the list in ME doesn't see it? That's weird. What kind of application is it? You might try using a "Wait for Control" in your timing.
  11. Cory

    Webdav

    Has anyone had any success moving files to a Web folder (WebDAV) with ME?
  12. Oh, one other thing. You could probably check this option state in the registry and change it if need be if you have many users.
  13. Uhhhhh.... Well the option is a check box so if you see one item in the taskbar for all open Excel files do it the other way... :-) But to answer your question if it's checked teh individual open files appear as "Windows in Taskbar". That is multiple windows and therefore multiple icons on the taskbar. But of course they can still stack but I don't think that effects what you want ot do with ME.
  14. You say 'network drive'... If you are sharing these variables with more than one machine then I suggest you save them in text files and not the registry so your users can all see the same variables. You should also check into the ini file capability in ME. This is a much more structured way of dealing with variables in text files. As far as text files versus registry I would have to say that performance wise there's probably no appreciable difference. If you remember in the early Windows days variables were saved in text file called ini files. ini files were often a pain as they could get corrupted easily, have file locks, and in general were difficult to manage with file structure changes as so on. The Registry was the solution for that and it's just a big database and it was MS's intention that everyone use this to keep settings instead of ini files or other methods. I just like it because if it’s simplicity. Also the structure is the same from machine to machine. And there’ are nice features like HKCU (HKey Current User) which changes for each user logged in. The path is always the same but if I have a workstation with multiple users they can each have their own preferences. But in any case I knew that the registry was the solution so I reckoned I’d just use it instead of ‘discovering’ the shortcomings for myself. The registry has special protections and since it's spooled up in memory it's very quick. I just have an aversion to disk writes and reads. I will often process large amounts of data in a variable instead of using something like the ASCII File Process. Things are just way faster that when you don’t involve the disk but of course it's only appreciable when you're processing thousands of records. To answer your question there are many benefits but I'm not really conversant. But you can read a really good writeup on the advantages on Wikipedia. This link will take you right to the section.
  15. There is also a prefercne in Excel to display each open file as it's own item in teh taskbar. Options > View > Windows in Taskbar
  16. You might want to check out the script command Macro Playback Speed. I'm not sure if it will do what you want but it's worth checking into. On thing that I've noticed in my change of techniques over the years is that if i have explicit delays in my script I feel I'm doing something wrong. Sometimes it's easier to address a timing issue by inserting a 2 second delay but as you have found not all machines act the same way and it doesn't always work. Whenever possible you should find smart ways to control timing. By that I mean "Wait for File Ready or Wait for Control Visible. Things like that.
  17. I always use the last example Kevin suggested. Don’t be intimidated it’s actually a lot simpler and you will slap yourself in the forehead when you realize how much better it is.
  18. When you have a variable you want to save for next time simply write that variable to a registry key. Then when the macro starts up again next time load the value from their. I recommend using the HKCU (HKey Current User) hive and use the miscellaneous folder under Macro Express. It’s HKEY_CURRENT_USER\Software\Insight Software Solutions\Macro Express\Miscellaneous normally. Just make a key in there called “My variable” or whatever you like. Also I keep lots of values in here and instead of modifying them from the macro I create a separate macro for setting preferences. This way if the value doesn’t change that often, say their screen name, the macro won’t prompt them every time for it.
  19. Like I said. Simply have every user use the same macro file and enable the sync. As soon as a change is made all will get the updates the next tiem a macro fires. And you can still keep a development copy. Just overwrite the file used by all when you're ready to roll it out.
  20. I'm not sure what you mean in Your first paragraph. I'll guess you mean that when the macro completes the variables do not persist. In this case I save the variables to the registry and then read them back in at the beginning of the macro. Also if you read them in and set the variable before prompting the user the value will appear in the dialog box. As for your second paragraph I’m not quite sure what you mean. If you want to update the macro file simply save the file in a network location and enabled the synchronize options in ME. You can find them under the preferences in the network section.
  21. I’m sorry I don’t have time right now to teach you how to write the macro but I’ll toss out a couple of ideas. First off you could do it completely in ME or you might want to use RoboCopy (Vista) or Xcopy (XP, 2000). These command line copy utilities have the option for date range parameters. This could make writing the macro a little easier. It just depends exactly how you want to do this. But it looks like it might be easiest to just do this one in ME. Simply process the folder with a Repeat With Folder command and put the file name and path in a text variable. Then use the Variable Set From File to break out the file name and extension to be used later in the copy command and then do it again for the YMD. Then use those date values in a File Copy Command string to construct your path. If you’re in a hurry I could write it for you for a nominal fee or if I have time later I can make a crude untested example for free.
  22. That's interesting, I'll have to look into that. Can it modify ACLs?
  23. I was just trying a few things and although I could not reproduce your problem. I tried 3 machines, Vista Ultimate without Aero, Windows 2003 Server, and Windows 2000 Pro where I reproduced your MC dialogs exactly and ran them on the current version of ME. It appears you have XP but I don’t have an XP box at hand although I could check tonight when I get home. The Vista and Server 2003 machines show no underscores in either case and the W2k machine showed them in both. This doesn’t help you much but it does make me wonder… Why can’t I get underscores in Vista?
  24. I don't know exactly how to do it for ownership but as a general rule for thigns like this I find a way to do it from a command line and use that command in a Launch command. I then redirect the output of the command to a file. I then pull htat file into a variable and parse out what I need. Someone else could probably give you an easy script to do what you need but I'm not very good at VB Script so if it were me I would use XCACLS from Microsoft ot SetACL with is from a third party. But like I say there's probably a easier way with a VB Script.
×
×
  • Create New...