Jump to content
Macro Express Forums

rberq

Members
  • Posts

    1,200
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by rberq

  1. MS Remote Desktop allows the remote user to sign on to the host machine, more or less at the operating system level, and then to do whatever his user ID allows him to do, as if he were sitting at the host's keyboard and monitor. Citrix allows extensive configuration of APPLICATIONS on the host, and retains a lot of control at the host as to what the remote user can do. Generally the remote user has no access to the host desktop, nor to any programs on the host other than those allocated to him. For example, the remote Citrix user could not even open Notepad on the host unless Notepad is permitted to him. Again, I'm no Citrix expert, but it doesn't surprise me that the host machine clipboard can be restricted, with no ability for the remote client to override.
  2. So let me restate what I think you are saying: 1) On the Citrix client, you can (sort of) paste into an application field by simulating keystrokes with ME. I am guessing you simulate typing the actual characters you want entered, rather than having ME enter Ctrl-v, because Citrix would intercept the Ctrl-v and paste inappropriate material from the application server's clipboard. Correct so far? 2) On the Citrix client, you can probably highlight the contents of an application field either by keystrokes or by a mouse swipe. You can accomplish this highlighting either manually or via ME keyboard/mouse actions. However, if you then do a Ctrl-c, Citrix intercepts the Ctrl-c and the copied data winds up in the (inaccessible) application server's clipboard. Correct? I don't know how big a development budget you have -- i.e., how important this is to your company -- but could you (1) highlight the desired field(s) on your local Citrix client machine, (2) do a full or partial screen capture via a PrntScrn key or with a package like SnagIT, then (3) use character-recognition software to read the data off the screen image? At that point you would have the data captured on your local PC and could do with it as you wish.
  3. If you are using a Citrix client on your PC to access an application on a remote server, then I withdraw my suggestion about reading from controls -- I don't think it will work, because the "real" controls don't exist on the client machine, they are only simulated. At least that is my high-level un-detailed understanding. I have had mixed success with Macro Express running on the Citrix client machine and doing copy/paste -- sometimes it would work, sometimes not, maybe depending on the version of Citrix, I don't know. Sorry, I'm not sure that is very helpful, but I'm a little confused as to just what configuration of remote vs. local machines and applications you are working with. Edit: I see Cory posted while I was typing. Maybe THAT'S why I could make it work sometimes and not others. I didn't configure the Citrix piece, so it could have been dependent on the preference or whim of the Citrix guru.
  4. Look at the Help screens for Environment Variables -- you can create variables with whatever name you like and store string data in them, then retrieve it later. But I don't remember whether the environment variable survives a reboot of Windows; I don't think so. Also look into Create Registry Entry, and write-to/read-from the variable. Again, I don't know whether the created entry survives a reboot, but it seems that it should -- what's a registry for, after all?
  5. You could also experiment with having ME read directly from the controls within the application form, as opposed to copying to the clipboard. (If you can make it work, it's very fast and the user need not even know it has happened if, say, you launch a macro based on the form's window title.) Then as Cory suggests have ME write the data to a file in order to transport it outside the application.
  6. Look up Command Line Parameters in the Macro Express Help screens. You can call either macexp.exe or meproc.exe and specify a macro to be run. I have done it from VB programs but I'm not really familiar with VB scripting so I can't give you an example.
  7. Wowzer! Feedback on a post I made four years ago! Glad it helped you. Cory's solution IS more elegant, but I can't name variables because I'm still stuck in the ME3 world. Can't teach an old dog new tricks, as my Grandpa used to say.
  8. No fair, Cory. That was three questions, not one, plus another question posing as a suggestion. But yeah, Amerifax, I think we can offer some guidance if we have a little more information...
  9. A little more information, please.... What is the file you are working with? Is it a text file, a Word file, or what? Why are you using Opus to edit the file, rather than Notepad or Word or some such editor? Are you typing the five-character insertion or do you want the macro to type it?
  10. How about a macro that doesn't move the files but renames them? For example, if the file is destined for folder A, then the macro: 1. Clicks once on the thumbnail to highlight it. 2. Uses keyboard commands to rename it from, say, FILE12345.JPG to A_FILE12345.JPG. 3. Moves on to the next thumbnail. The rename should happen pretty fast, not like waiting for the clipboard which can be slow. Then once you have renamed a few hundred or a few thousand, you run a simple DOS batch script to move them: move c:\sourcefolder\A_*.* c:\destination_A_Folder move c:\sourcefolder\B_*.* c:\destination_B_Folder move c:\sourcefolder\C_*.* c:\destination_C_Folder
  11. I don't know any way to do it within a single text type command. Would the following work for you? repeat start (with 10 repeats) text type <arrow down> repeat end
  12. Are you really working with, literally, more than 12 million files? Or is that hyperbole? I don't see how it is practical to sort through them manually in any case. That would be almost 7,000 hours of work even if you could handle one file every two seconds, which you probably couldn't. It would help to know what there is within each file name that you want to use for sorting. My first inclination would be to: Produce a complete file list using the DOS "dir" command. Sort the list by importing it into Excel or some similar computerized process (ME might be helpful at this stage). Convert the sorted list into DOS "move" commands in a batch file, with the appropriate destination folder embedded in each command. Run the batch file. If you truly want to handle the files manually with help from ME, then you could write a macro that 1. clicks on the file name to highlight it (you would start with the mouse positioned over the file name in a Windows explorer screen) 2. copies the highlighted file name into the clipboard (F2 key followed by Ctrl-c) 3. generates a command.com command string to move the file to the appropriate folder, and launches command.com with the command string. You could have several macros, identical except for the destination folder name, and launched by different hot keys. That way, you would position the mouse over the file name, hit the appropriate hot key, and the file would be zinged off to the destination folder.
  13. I don't know any way to do it directly from ME. However, if you can write the C# or VB code, your macro could call a program to check the mouse. Google "detect mouse button state" and you will find a number of examples of simple C# or VB or Javascript code to check it. It sounds like a useful command that Insight could "easily" add to ME -- I suggest you ask them to do so. Won't help you right now, but maybe in the future ....
  14. %tAlternative% may truly have length 24, but leading or trailing blanks may be disappearing during the Display. Try this: Set a variable to the asterisk, or a capital X, or anything you like. Variable Set String %tX% "X" Then concatenate your new variable to the beginning and end of %tAlternative%, and display your new concatenated variable. You will then be able to see whether there are embedded leading or trailing blanks. Or simply right-trim and left-trim %tAlternative% before setting the length.
  15. Thank you, Cory. I used a SAMS book for SQL and it was good. I will get both the books you recommend. Like you I have tried to make sense of OOP in terms of the older programming methods, and I agree, it is similar functionality except with a different wrapper. The most useful advice I have received on the subject of OOP is, "Don't over-think it".
  16. This is not an ME question, but I know some of you do a lot more than write macros. Can anyone recommend a good book or other resource for getting up to speed with Visual Studio / Visual Basic / .NET programming? I am NOT interested in the typical 1500 page book that tells me every mouse click and wrist movement to drag controls onto forms and display "Hello, World" in a message box. What I need is more of a technical understanding of how projects are structured internally, how they interact with Windows and with SQL databases and file systems, what those <weird strings of words in brackets> are all about, how to package procedures in a DLL as opposed to an EXE, how to integrate a VB program with one in some other language like C++, and so on. I come from a long background in procedural language programming (IBM Assembler, COBOL, RPG), where you could pick up a book and understand how your program interacts with the operating system. But I am having trouble getting my arms around object oriented programming and the fact that Microsoft invents a new programming architecture about every 18 months. Thanks for any sources you can recommend.
  17. Yes, "repeat with folder" is way easier, but doesn't give you size, which you said you wanted.
  18. I don't know an easy, straightforward way to do it. You could use the Program Launch command to run command.com, passing it a DOS "dir" command and directing output to a text file. For example, dir c:\foldername /s > c:\listfile.txt. Use appropriate options with "dir" if you want to include subfolders. Then use Text File Begin Process to read back the text file. The last couple lines should tell you number of files and total size, which you can extract into variables. When you get done with this macro you won't consider yourself a newbie any longer.
  19. You could experiment with the Wait for Web Page command, which is intended to tell you when IE is no longer busy (that is, next page has been completely loaded). Another method would be to pick a pixel location that you know will change color when the subsequent web page appears, and monitor for the change with a REPEAT loop that checks current color. That might or might not be sufficient, since the spot on the screen could change before the next page has finished loading. Or, try having the macro type Ctrl-f (again in a REPEAT loop) to find and highlight "RATEPLAN SELECTION", followed by ESC to clear the Find box, followed by copy-to-clipboard, then examine the clipboard contents for the text. If it's there in the clipboard then your next page has at least partially loaded. Might be best to follow detecting the text with Wait for Web Page. This method is kind of ugly since the Find box will appear on the screen. Make sure to clear clipboard content so you don't "find" text left over from last time the macro ran. If you're lucky, someone will post a cleaner and simpler and more reliable method that I haven't thought of.
  20. A couple more ideas, in case Paul didn't nail it: (1) Should you be getting pixel color relative to WINDOW or relative to SCREEN? (2) Instead of relying on an absolute color value, do an initial capture of pixel color, save it as both original color and current color, then "repeat until current color is NOT equal to original color". The trouble with specifying an exact color value is, the color may change on a different PC or if you switch among 16 / 24 / 32 bit color schemes. (3) Move the mouse pointer to the pixel location, as a debugging tool to make sure the macro is checking the right location. P.S. Maybe ME doesn't like your accent. Over here we always check colors, not colours>
  21. Interesting concept ... Can you give an example of one of your most-useful ones?
  22. Free advice, and worth it: Check carefully the enhancements available with ME Pro, and if you don't REALLY need them then stick with ME3. The ME3 script editor is just much easier to navigate, and ME Pro has been very buggy. I have put together some fairly complex (IMHO) applications with ME3, running happily on about 350 PCs. I began several times to convert them to ME Pro as fixes to Pro were released, but each time I just ran into problem after problem after problem. Sorry to be a naysayer, my frustration is showing. ME3 has worked SO well that it was really a bummer to struggle with ME Pro.
  23. Alt + spacebar E (for Edit) P (for Paste) In all this time using computers, I never knew I could do that. Thank you! As my Dad liked to say, "You learn something every day." He forgot to mention that sometimes you feel really dumb that you hadn't figured it out already.
  24. Alan, is that a ME Pro feature? I can't find that activation option in ME3. rks -- I can see one way to do what you want, but it is kind of clumsy: Schedule a macro to run every x seconds, and if the window is running set a switch to "on" (probably best to store it as an environment variable). Then next time it runs, x seconds later, if it finds the switch is ON but the window is no longer running, you know it closed in the interim. Like I said, it's a little clumsy and not "instantaneous" like activating a macro when a window becomes on-top. But in the x-second intervals between scheduled runs, all kinds of other macros can run.
  25. I'm not sure what you mean by "trigger". Is the window title what triggers (activates) the macro? If so then what do you mean by "trigger a folder to be on top"? Isn't the window becoming "on top" what activates the macro, in which case it is already on top? Or are you saying that some other window can become topmost after your macro begins running? Personally I never had much luck with setting window order. A simple Activate Window always worked fine to put it on top.
×
×
  • Create New...