Jump to content
Macro Express Forums

Cory

Members
  • Posts

    4,207
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by Cory

  1. Dude, I've never noticed that before! Kewl. I knew I hung around here for a reason, learn something new every day! UDa Man
  2. I'm going to hazard a guess that if it's headless you're accessing it via remote control software like Remote Desktop or other application. The general rule is that ME will not 'see' anything when it's minimized or disconnected. This is because, well, nothing is happening. For RD you must not minimize the session window but rather window it. This allows you to open other applications. However if this is an animal which will be running unattended, in the middle of the night and without a RD session things are more difficult. Realistically you need to initiate and maintain a console session. That's the local session created when you would normally log in at the machine. In this case the computer doesn't realize no one is looking and maintains the normal user environment ME needs. One way to do this is to set the machine up to log a user in automatically when it starts up and then join that session using RD from a remote session. Or you can use a program like VNC which always interacts wit the console session. But the ice thing is that it's a service so you can actually log into the console session remotely when the machine boots.
  3. Skipping ahead is something I just wrote up click here to see what I was talking about. In a text editor or word processor you can search for the existence of text this way: In the text body do a CTRL+A to select all the text Copy text to the clipboard Copy the clipboard contents to a string variable Use an If Variable > Contains condition to look for the desired text Do whatever you like in the condition If you are only looking for the text in a file and don't have to do anything in the editor you can do it without opening the editor: Set String Variable from file If variable contains desired text Do whatever you like in the condition
  4. Variables are all wiped out when a new macro begins so one doesn't' need to clear them usually but if you do you can use the Clear Variables command. I often cache variables to the registry as a means of bridging the between macros gap. It sounds intimidating but it's really very simple. To write one do something like this: <REGWSTR:1:HKEY_CURRENT_USER\Software\Insight Software Solutions\Macro Express\Miscellaneous\Remember Me> Then read it back at the beginning at the macro with: <REGRSTR:1:HKEY_CURRENT_USER\Software\Insight Software Solutions\Macro Express\Miscellaneous\Remember Me>
  5. You have a good problem but I do not have WinAmp so I’m not sure what to suggest. But before I get to that I would like to make an out of box suggestion. Instead of interacting with WinAmp why not just have ME play the audio for you? If it’s a WAV file or can be converted to one you can use the Sound Wave File but if it’s an MP3 then you need to use the Video Play Clip. I know, it says “Video” but it works for any audio your MM Player will play. Another approach would be to simply launch the MP3 file like you would a program. Whatever program is associated with the file extension will launch. Like this: <LAUNCHDEL2:0:01"C:\Media\Popular Music\.38 Special\1987 Flashback The Best Of .38 Special2 - Hold On Loosely.mp3"> Or if it’s not the default launch winamp from here and set the file name as a parameter like this: <LAUNCHDEL2:0:01"c:\program files\winamp\winamp.exe"<PARAM>"\\phaedrus\data\Media\Popular Music\.38 Special\1987 Flashback The Best Of .38 Special2 - Hold On Loosely.mp3"> Usually you don’t need to “Activate” a window either as it will launch in the existing window. You can copy those bits of code to your clipboard and paste into ME’s scripting editor to see the actual command. BTW, I’m guessing you probably know this already but there are a lot of cool keyboards and other input devices out there for the disabled. I’ve dealt with having multiple windows of the same title before but in your case I’m not sure what one can do. I’ll have to think on this one.
  6. I don’t know exactly what kind of editor you’re using but you might consider using an If Window On Top with the condition equal to the title of the error dialog box. After issuing the find command put in a delay of 100mS or more for good measure though. If that doesn't work you might consider using control conditions instead. EG If Control C1 = "Not Found".
  7. My writeup on GoTo got me to thinking about using Repeat Until for user input validation so I wrote my thoughts as well here.
  8. It has limited application but there is a simple way to effectively do a GoTo in ME. I wrote it up on my webpage.
  9. You might also consider using If Not Control Enabled. And I would tend to use the Break instead of Macro Stop/Return. Kevin: That’s an interesting trick! I’ll have to try that sometime.
  10. Try Launch Program Only. I think that without a window title it won't wait for it. Then you can wait for a control in the popup box or whatever. And if Excel is already open it will just open to that instance of Excel.
  11. I've upgraded many times and I have never had a problem. From my perspective ISS always adds features and fixes bugs and never required overhaul of the code. The only change I've ever had to do was to remove work-a-round code that I had inserted when something was broken in ME. Also if you look at some of the commands you will find some that look very similar like the two Time commands. In several cases this is apparent because one is deprecated but they left the old command in for reverse compatibility. I think that until a major version release you should do just fine to run what you had before. Like Kevin said you might need to adjust some timing but then again I don’t think I have ever had a large macro that didn’t require minor tweaks form time to time.
  12. You're way behind in your version. If I were you I would start by upgrading to 3.7.1.1 AKA 3.7a. Try that and post again if you're still haivng troubles. Also if it keeps happening you should open a support incident with ISS.
  13. I'm still confused but I have a small brain so it's no wonder. <g> Can't you simply use the random number generating function to pick one? Variable Set Integer > Random.
  14. Once you have the exported data why don't you add the zeros before importation? If it were me I would process that file or set of data and if it starts with a colon add a zero to the front of it. Text File Begin Process: "list.txt" Variable Modify String: Copy Part of %T1% to %T2% If Variable %T2% = ":" Variable Set String %T1% "0%T1%" End If Variable Modify String: Append %T1% to Text File Text File End Process <BTFBEG:001:000001:000000:c:\list.txt><REM2: ><TMVAR2:10:02:01:001:001:><REM2: ><IFVAR2:1:02:1::><REM2: ><TVAR2:01:01:0%T1%><REM2: ><ENDIF><REM2: ><TMVAR2:20:01:00:000:000:c:\listfixed.txtT><REM2: ><BTFEND>
  15. I'm sorry but I can't understand your post. You want T1-3 all to be the same variable? I'm not following you.
  16. How funny. I just wrote a fun macro that will print every PDF in a given folder. Timing had been a problem in the past so I came up with a better way. Here is the command I used: <LAUNCHDEL2:0:01C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe<PARAM>/t "%T3%" "%T2%"> T3 is the complete file UNC path and the T2 is the printer name as it appears in the printer control panel. So if you wrote it all out in run prompt might look like: “C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe” /t "C:\temp\test1.pdf" "HP LaserJet 4+" On common problem is that if you get the file name from somewhere else like Repeat With Folder you need to remember to encapsulate it with quotes if there’s a chance there will be spaces in the path. Also, of course, you will need to change the program’s file path accordingly to your installation of Acrobat. Another oddity is that Adobe really wants to have an open, empty instrance of Acrobat running. I figured out why but it's a long story. Perhaps if you posted an example I could see where you're going wrong. Also try to make it work from the run line first then substitute for variables. Click here for my web page on the subject if you have not already reviewed it. If you're interested I attached my recent macro. PDFPrint.mex
  17. Ah, this is exactly the kind of answer I was looking for but it doesn’t seem very useful as ME doesn’t appear to enforce the file existence after the fact. IOW if I check the box, close preferences, and manually delete the file ME will never recreate it. Since it doesn’t ‘stick’ and wants to add it to places like C:\Users\cory.CJ\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup which will differ from machine to machine I think it will be better to just manage the shortcut files and if necessary protect them with NTFS ACLs. Thansk guys!
  18. That's funny Kevin. I too will add beeps as markers but I have also use the time command to make a series of timestamps down to the miliseconds.
  19. That's funny Kevin. I too will add beeps as markers but I have also use the time command to make a series of timestamps down to the miliseconds.
  20. We covered all this in a previous post and the only reasonable solution was to run the Word macro with a command line switch. I have tried it and it works well. There were some good examples there as I recall.
  21. An idea I had and have played with a little is to make my own error handling. I create ‘markers’ where I write something to the registry like “waitfor23” for my twenty-third wait command right before it starts waiting. Then when it’s done waiting wipe out the registry value. At the beginning of the macro I can enable another macro like “error handler” which is set to run on a schedule. At the end of the macro I disable the error handler macro. So if nothing errors all if fine. But if it does error out and the user cancels the macro then the error handler macro is still enabled and will run. It will use that registry value to somehow jump back to that point in the macro or do something else. Crude, but it works.
  22. As far as I know there is no way. In the future this will change but for now we have to deal with it. How I approach the problem is to instead of letting the timeout happen I will do a 10X repeat with a 1 second delay. In that repeat I will test the top window to see if it meets my criteria. This way I can in effect get the error handling I want.
  23. The default delay setting for clipboard operations is only 250ms so I doubt that's the problem. Make sure your choosing to paste the text back in with the TT instead of typing. If your typing delay is slow that could cause it. And it wouldn’t hurt to check your preferences for that clipboard delay timing. Maybe you increased it at some point.
  24. Assuming you mean when typing into a text editor, yes. But it might be different for each editor. IOW if you use Word all the time it would be simple but the method would be different for Excel. What I would to is (TT) Text Type “Something, something, “ then TT “<ALT>of” to pull up the format dialog box and change the font and move on typing the next “something, “. But like I said, it would be different in many applications. You could then have ME detect which program is running and do a different routine. EG if it sees “Microsoft Word” in the title it does routine A. But is it sees “Wordperfect” in the title then it would do routine B.
×
×
  • Create New...