Jump to content
Macro Express Forums

paperguy

Members
  • Posts

    18
  • Joined

  • Last visited

Everything posted by paperguy

  1. Thanks for the replies Rand and Jason. In the original launch.mxe I had the menu selection goto %T1%. I did a SWITCH with four CASE statements, three for the macros I need to run and the fourth for the CANCEL option. When it stopped working today and before I created my test macro scenario, I put breakpoints just before each of the "program launch" commands in each of the CASE statements. At each breakpoint the right value was passed into %T1% and when I pressed continue (to execute the "program launch" command) the macro dies cleanly. I would have thought if the MXE's I am attempting to launch were in the wrong location then the launch.mxe macro would display an error message as the mutiple "program launch" commands have "Bypass File Existence" unchecked? Anyway I PLAN B'd it as I replaced the "program launch" commands with the actual code that the playable macro uses, into the launch.mxe. Works fine but I'm still befuddled as to why my playable macro in a playable macro stopped working?
  2. I had one playable macro on my Desktop (which I love to leave uncluttered) which would open and launch a series of apps to assist me in my web development. Then I had two more, so it was time to unclutter. I moved the three .MXE's to my Macro Express3 folder and then on my Desktop I wrote a playable macro (launch.mxe) that had a multiple choice menu to select and launch one of the three .MXE's. Worked like a charm MEx comes through again! Today, NOT WORKING! The launch.mxe macro just dies off cleanly, no errors at the point in the launch .MXE file that has the program launch command in it. So I wrote a short playable test macro called "test of MxxxMxxx.mxe". If I launch it from the Macro Express3 folder, it plays fine. Then I wrote another non-playable (below), test macro which should launch "test of MxxxMxxx.mxe" "Test" macro Program Launch: "test of MxxxMxxx.mxe" settings for [Program Launch: "test of MxxxMxxx.mxe"] Launch Program Only Program Path/Name: C:\Program Files\Macro Express3\test of MxxxMxxx.mxe Any ideas?
  3. Neither am I, just reasonably good at Googling I tried it on a loop also and it would kill the "running man" process - MacExp.exe but somehow MEx3 would restart it. When I tried it on a more "normal" macro that I run it worked fine. Since the idea of this is for emergencies only, why not try something like this: Const HIDDEN_WINDOW = 12 strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set objStartup = objWMIService.Get("Win32_ProcessStartup") Set objConfig = objStartup.SpawnInstance_ objConfig.ShowWindow = HIDDEN_WINDOW Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process") errReturn = objProcess.Create("cmd.exe /c taskkill /IM MacExp.exe /t /f", null, objConfig, intProcessID) errReturn = objProcess.Create("cmd.exe /c taskkill /IM MacEdit.exe /t /f", null, objConfig, intProcessID) errReturn = objProcess.Create("cmd.exe /c taskkill /IM MacScript.exe /t /f", null, objConfig, intProcessID)
  4. Most extraordinarily awesome! I tried this on one of the macros I run frequently and it seems to stop Mex3 dead in its tracks. kill_me3.vbs Const HIDDEN_WINDOW = 12 strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set objStartup = objWMIService.Get("Win32_ProcessStartup") Set objConfig = objStartup.SpawnInstance_ objConfig.ShowWindow = HIDDEN_WINDOW Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process") errReturn = objProcess.Create("cmd.exe /c taskkill /IM MacExp.exe /t /f", null, objConfig, intProcessID) I programmed one of my keyboard keys to run the script. It FORCES a kill of MacExp.exe and any of its children. It also inadvertently closes the MacroEdit window, but thats easy enough to restart. Thanks rberg for the idea!
  5. Unfortunately not. Thats why I am forced to go running around trying to click on the little guy while all hell breaks loose on my Desktop. I happen to use the "Smart Move" option in XP, which while very convenient exacerbates this situation. Although it happens infrequently it is very DISCONCERTING. Too bad that MEx3 doesn't have a application "bounds" checker that you could setup for a macro. Bounds would be set by the user and any deviation would give warning that MEx3 would then terminate the macro.
  6. For some reason the combination of my WinXP Pro + Adobe Flash + MEX3 occasionally causes the macro to go South. All of a sudden its opening files all over my desktop and doing all kinds of scary things as I chase the "running man" trying to abort the macro and doing keypresses to the same end. Is there a good method to set a trap for the macro (aborting it) if it leaves the "stage" of the applications specified that it should be dealing with?
  7. Thanks Kevin - that did it, I skipped over that part when I was setting up the strings. MY BAD!
  8. Hi, I tried searching this issue in the forum but it is hard to do when the search engine won't accept the words 'run' and 'in', even when enclosed in a "" phrase string Heres my issue - I have a macro which in it uses "Run Macro in Variable" extensively. The text string in the variable has multiple occurences of drive-folder locations. I need to use the macro on a different drive and folder. So my idea was to copy the command text from the Direct-Editor and paste it to Notepad. In Notepad I would do a search and replace to enter the new drive-folders I need for the text string. It worked pretty well but when I copied the text back into ME's Direct-Editor the "Run Macro in Variable" text strings were messed up. The text string in the variable uses "|" as a Carriage Return character but when it's pasted into Notepad it gets converted to "□". When viewed with the Scripting Editor any text after the 1st occurence of a "|" is gone. Confused, I tried copying the macro text from the Direct-Editor and then creating a new blank macro and pasting it in Direct-Edit mode. I got the same result, any text after the 1st "|" Carriage Return is missing. I don't want to go through the macro and in every "Run Macro in Variable" in the macro edit the text string dialog box to change the multiple occurences of drive-folder locations. It's just too tedious. I suppose I could write a macro to edit my macro Any ideas on an easier way to do this? Thanks - Stumped
  9. If the windows of the different versions are in anyway differentiated, then could you not use "GET PIXEL COLOR" to establish which window you are dealing with?
  10. I've had intermittent luck using "Wait for Web Page", it sometimes gets fooled by IE7 and the URL its waiting for. Get Pixel Color - did it for me.
  11. Glad to have them, thank you, and it is a GUI so your experience should still be valid. The "Wait for Text" might be handy, but the "Wait for Window Title to be Active." would fail as the 1st time FLASH is run the control, nor the window title is not seen? properly by ME and after the wait period the macro aborts. To reiterate for clarity's sake, preventing failure of the macro occurs by: FLASH is running and I have to go the through a sequence that brings up the popup box manually by hand, then subsequent runs of the macro are successful FLASH is running and I have ran the macro 1st time with failure, then 2nd and subsequent runs are successful. I originally had used the mouse move technique but lately have become enthralled with Get Control But if it never sees C1, wouldn't this be an infinite loop? Getting back to the mouse click idea, I found it strange that although the popup window is not "seen" by Get Control it still must be active and in focus as by typing N for "NO"clicks the right option button. One issue that I have with Flash is that depending where in the apps window your mouse cursor was located, popup boxes will appear in a few different places rather than in centre of the app window. Is there a mouse command in ME that can replicate the windows behaviour of "Snapping to default option"?. This is a mouse setting in windows and it will snap the mouse pointer to the default option of a windows dialog box in my case the "YES" option of my particular box, not the one I want but than a "relative offset" mouse move command would get me to the "NO" button to click. This might be advantageous to using absolute X,Y points. Thanks for the help Steve
  12. So I checked through the forum and most of the issues with ME's Get Control and Windows windows seem to be that the windows aren't all constructed to a standard that would allow Get Control to be a 100% reliable. My issue is a little different. I manually do the alterations to a file in my program and then replicate those actions with appropriate scripting in the ME editor. I do it a section at a time and fine tune as I go along till everything works. So thats what I did to convert my Adobe Illustrator files in FLASH to .swf files. First test run through went great. Later that evening fired up the computer and initiated my macro and it hung early into the script on a Get Control. I got the control did not appear error message which I thought was strange as I was looking right at it. Went into the code and double checked everything and couldn't see anything wrong. So I thought well I'll just try it again - maybe I missed something as the macro was executing. Start the macro and everything worked! Odd. But then I remembered the first time when I was writing the macro, I stepped through the program myself and clicked the NO choice in the control window. So playing my hunch I shutdown FLASH, restarted it and ran the macro and again the control was not found. But restarting the macro again and now it could see the control. So for some reason when FLASH starts the 1st time the macro doesn't see? - the control box. But CANCEL'ling the control box manually and restarting it, ME sees the control box. My solution for the 1st time issue was to create an IF statement and if the control process failed the ELSE statement types in a N for NO into the control box and the macro runs properly. If Control %C1% Visible Set Focus to %C1% Mouse Single Left Click on Control %C1% Else Text Type: n End If Is there a better way to code for this event and why wouldn't ME see the control box the 1st time even though that box has focus, because typing in the N causes the control box to close?
  13. Well this is an ugly way (I'm new to ME) but it works: Activate Window: "notepad" Text Type: <ALT>fp Activate Window: "Print" Text Type: <ALT>d Text Type: Adobe PDF Text Type: <ENTER> Text Type: <ALT>p I suppose you could design an ME menu with all the printer names in your system and select the one that you want and have that input into the "Connect to Printer":Printer dialog box.
  14. Great, that solved a problem or two. Getting near the end (both the project and my consciousness level) , I had a control window with 20 lines of parameters, vertically stacked that I needed to change one in the middle. So I used this: Get Control %C8% (Export Flash Player: Edit) Set Focus to %C8% Mouse Double Left Click on Control %C8% Delay 55 Milliseconds Text Type: 35 By the way I had "Get Control using Text" turned off. Worked GREAT! Then when I returned to the "stage" of FLASH there is a property panel with data entry boxes for Width, Height, X offset and Y offset, so I decided to use the same technique but it keeps failing tell me the control could not be found. Here is the code for the Width entry box: Get Control %C10% (: Edit) Set Focus to %C10% Mouse Double Left Click on Control %C10% Delay 55 Milliseconds Text Type: 620<ENTER> So am I to infer all control boxes aren't created equal
  15. Okay, I've got the 1st half of my automation completed, 12 .pdf's modified and converted to 12 .ai files in about 5 minutes. I've only had 3 hrs. sleep last night and it's hard to think straight. I programming the 2nd half of my automation 12 .ai files modified and converted to 12 .swf files. I getting through it slowly but I have a real turkey of a question, (tried Help but didn't find it there), the Windows "Select All" command <CTRL>+A is it simply TEXT TYPE: <CTRL>A or is that like pressing <CTRL> and letting go then pressing A ? Thanks
  16. Thanks Stan, it's exactly what I needed. I found it worked a little better with the "Variable Set Integer %N1% to 1" placed before the "Text File Begin Process" line. It took me awhile to get timing set for all the windows, but I've sorted mostly out except for one pdf. This one pops up a Windows dialog box asking me to choose one of two options. This screws up the macro. In the dialog box the option I want is already highlighted - so all I would have to do is to instruct Macex to type the ENTER key. Could I use the "If Window" to test the presence of this dialog box and then on the result, take appropriate actions?
  17. Hi; Even though I haven't grasped a lot of it's capabilities, it's easy to see that this software readily allows ones creative urges to be released. My problem - I need to to alter a series of .pdf's (text characters and numeric ending filenames) one at a time in Adobe Illustrator and then save them as .ai files. For the .ai files I am using pg1.ai, pg2.ai... and so on. Then I take the files into Flash CS3 and convert them to .swf files. I created a Captured macro that works reliably on the first pdf filename, e.g. XY 54 32 1.pdf and saves it out to pg1.ai. Currently in the macro I use the TextType command to input the Open "XY 54 32 1.pdf" filename and then the Save As "pg1.ai" filename. Scanning the tutorials and help pages it seems a Text File Process reading a filelist.txt with the appropriate Open and Save filenames might do the trick. In the Text File Process loop how do I get the Open and Save text variables to increment so they can be placed in the Open and Save file dialog boxes? Or is there a better way to do this? Thanks
×
×
  • Create New...