Jump to content
Macro Express Forums

Rustywinger

Members
  • Posts

    120
  • Joined

  • Last visited

Posts posted by Rustywinger

  1. Sorry for the above gripejack, and I have not yet had the 'opportunity' to work in Vista.

     

    What about writing a macro that loops through dynamic Width parameter and text string multiple choice variable values and detects the state of the Multiple Choice Dialog Box results using pixel color or some other boolean value? It could write the results to a text file, resulting in a nice little accumulation of data that you can use in your formulas? Something like this would take me too long to write myself... so send me a copy!

     

    Just an idea.

  2. I've been spending some time working thru issues on the Multiple Choice menu and now I'm working on size and column behavior so my macros will appear properly. The impedes was that my ME3 conversion made some inscrutable box sizes and I wanted to know how big to make things in cases where I am dynamically creating lists.

     

    <Gripe>

     

    Cory, I came in here Saturday to write up a gripe about this exact same issue, (but got sidetracked).

     

    The interface and mish-mash of governing logic behind the multiple choice dialog functions is confusing, to say the least. I have also had to create variables for the X, Y, W, and H. Not to mention the characters per line limit which is a real pain when you need to present choices collected from file sources that are potentally longer than what can be accommodated, requiring even more code!! Why are there even editable parameter values presented in this interface? At least 3.7 had made up for these flaws slightly with dynamic box sizes.

     

    Sorry to be grumpy, but this is an issue for me because it neccessiates the need to create code to make this a presentable function so I, a macro author, don't end up with dysfunctional and unprofessional-looking interfaces.

     

    If we MUST have dynamic columns in this dialog box, at least give us coders some control over how they present!

     

    </Gripe>

  3. MEP- fine product, no question about it.... but the UNDO?

     

    If I copy a bunch of lines and insert it somewhere in the million lines of code, and then decide to undo, it removes only ONE line! And the highlight will be gone... and to make this even better, it does this AMAZING scroll thing which totally disorients you... and if I was in the middle of a long spontaneous programming session I have no idea where the pasted code ends previous code begins!

     

    Anyway, that's my rant. Good day!

  4. I also don't see why the command is designed (for example) to return TRUE for If the Window Does Not Exist, which seems counter-intuitive to me.

     

    Programming Semantics! :-) IF NOT EXISTS and TRUE were simply the default setting in the Boolean setup box, so I went with that, it was a simple test in a little loop. I just knew it would work anyhow and this is just a case of function trumping form! lol!

     

    Maybe for a future release, all 'IF NOT' BOOLEAN conditions should change the default value to 'FALSE'?

  5. How do you guys manage?

    This is an issue for me as well, I have some fairly large macros and many smaller "support" macros that get called up by larger ones in the old programming environment which is used by the clerk pool in an office building. Generally the macros are linking interface functions and exchanging data across a range of applications the clerks use. I began some patchwork migration on some of them after getting MEP but hit some roadblocks quickly, mainly with the clipboard copy funciton errors I was getting (reported earlier in this forum)

     

    In the end I just redid the macros I use personally as the local alpha geek (how in the world did I become this?).

     

    Anyway, I will probably migrate things eventually, not broke, don't fix, blah blah, but man... the data and functionality heirarchies involved in some of the already deployed macros can take me days to upload into my head so that I am working on them functionally.

     

    Love MEP... gonna take awhile to fully migrate, but I think it will be worth it in the end. //just because I want to comment every line of code!!! ;-)

  6. Okayy...

     

    Got in to work today, tried running the macro while ME was minimized. The macro maximized ME then minimised it again, then hung. Yes, this is the "Variable Set String" with "Prompt for filename" command in a fresh macro file, fresh macro script, and same problem. Couldn't test in safe mode because I have no access to it and the IT boys probably wouldn't appreciate a program that can be fired up remotely by monitoring googletalk! :P

     

    No question about it, this is a bug or corrupt application. (v4.0.1.1) Unfortunately, I have no way to reproduce this as the same macro works fine on other machines and there do not seem to be any logs. Are there suggestions of where else I might look to glean information about this problem, some windows specific logs on my machine?

     

    ANYWAY- I reinstalled MEP (v4.0.2.1) and then everything worked. Tah-Dah. Which means I must get back to work now, thanks for the proffered thoughts!

  7. I don't have a specific solution either but, have you tried deleting some of the commands prior to the Variable Set String %CurrentCSV_FilePath%: Prompt for a filename command? Specifically, is the Variable Restore: Restore All Variables command causing the problem?

     

     

    Yes, on this specfic computer, I turned off everything else in the file except the prompt. Tried pasting it all into a new file. I created a new macro with just the file prompt. What happens is the Macro script window minimizes, and the MEP main window minimizes into the system tray... then nothing. running man runs.

     

    I ran this on another machine and it worked fine. This function was working right up until the sudden bit-flip. What keyboard command could I possibly have hit that would minimize windows? I was running it with CNTL-SHIFT-S and changed that to CNTL-SHIFT-U just to see if there was a conflict, but same result. One thing I didn't check now that I think about it, was if the prompt window was minimized too, but it's all on my work machine so I can't check right now, but I doubt this escaped my notice. :blink:

     

    Thanks for the help!

  8. FYI you don't need to set your integers to zero. They are in effect zero even if they appear blank in the debugger.

    Okay, thanks Cory... when I get back in tomorrow, I will look into this, the info about it not aborting until next command and hanging makes sense, in that effect it would not acutally be 'crashed'. If I take out the file prompt, the macro goes merrily on (without a file name haha)

     

    RE:integers- those commands followed a variable restore, I wanted those particular values "emptied out", they would generate errors at zero, but not at the values they may have been saved with later on in the Macro.

  9. This is one of those "at my wit's end" posts.

     

    A macro I have been working on for weeks suddenly "crashes" MEP. This is not a typical crash, with a crash reporter bug coming up. When I run a certain macro, The window effects of the closing script window take place, and it all minimizes to the system tray, with the running man in motion. I am able to open the MEP window again by clicking on the M but I can't get the macro process to stop. I end up restarting.

     

    Now anytime I run a macro that has a Set String Variable to Filename with a prompt to locate the file, the above happens. Even on a new Macro file with just that command alone. I even changed the macro key trigger to see if it was conflicting. Nope. If I try to get a filename prompt up, bye-bye, MEP. The macro that I had worked for weeks on starts with this command and it worked perfectly up until today. Below is the start of the macro in question, I didn't post the rest as it has no relevance to the issue.

     

    I have just tried this macro on a different machine and it works. What in the world could be causing the above to happen on a specific machine?

     

     

    Thanks!!!!

     

    <COMMENT/>
    <VARIABLE RESTORE Option="\x00"/>
    <VARIABLE SET INTEGER Option="\x00" Destination="%ExcelRowNum%" Value="0"/>
    <VARIABLE SET INTEGER Option="\x00" Destination="%SavedImages%" Value="0"/>
    <VARIABLE SET INTEGER Option="\x00" Destination="%NoImages%" Value="0"/>
    <VARIABLE SET INTEGER Option="\x00" Destination="%totalrows%" Value="0"/>
    <COMMENT/>
    <VARIABLE SET STRING Option="\x08" Destination="%CurrentCSV_FilePath%" Value="Please specify a file to process" _COMMENT="Prompts the user for file to process"/>

  10. Thanks, Kevin and Cory...

     

    Haywire... strong words! ;-)

     

    The actual thing that was showing up in there was the commas, duh. As Cory suggested I was selecting the row headers and then hitting the 'delete' button.

     

    This is funny because in the validation I wrote to detect the last row, I actually had it set to ignore any commas that might be present in the record being processed. Again, Duh.

     

    Well, I will get back to work on this now!

  11. Cory, sorry, the issue I am having is complex to me and hard to articulate and because of that, my post will get too long, and probably too much of an chore for samaritans to tackle.

     

    I just read your post and your linked web page, it seems very similar to what I am doing, except I am using comma delimited output. I read from a source excel file using "Process Text File", which grabs a record and then 'does its thing' and finally writes a modified line to a destination .csv source file using Append variable to text file command. So when I refer to Excel files above, they are not actually open when they are being processed.

     

    The Source CSV file can be in excess of 7,500 records and after each record is read into an ME variable, its values are isolated and used to perform automatic searches in another application to retrieve data from a remote database, as well as download associated files as identified from the contents of the variable.

     

    There are maybe 250 lines of instruction between the main Text file begin process and Text file End Process. This is a very long affair which runs for hours and things can go wrong so I have written validation into the beginning of this macro before the main process loop. This allows me to restart the whole process by analyzing the destination file to find out what row to restart loading the source file in the Process Text File loop.

     

    The PROBLEM itself is when in the down time when the process has stopped, I manually analyze the CSV file and find that, for example, the last 10 rows were errors and just delete them while open in Excel. I then close the file and run the macro again, and the validation correctly identifies which row to start (first blank row) reading in the source file... BUT, at the end of the loop, when the modified record is appended back to the destination text file, it doesn't write to one of the 10 blank lines where I just deleted errors, and instead begins on the 11th line. This really messes up the validation when I have to restart it again later.

     

    I am thinking this is some Excel quirk... it is saving some kind of data in the deleted rows that shouldn't be there. I'm trying to see if anyone can confirm this issue from previous experience? Maybe I should use some other viewing program to do my manual edits, but a 7,500 line file can be hard to handle.

     

    Thanks! (I'd post the validation code here, but I'm at home)

  12. Okey doke, I sent along a bug report regarding this, I know I should have the delay... was just lazy. B) Delay was in the main macro but not in the smaller test macro I set up to try and troubleshoot this issue.

     

    BTW: don't' try and disable the first line in your script. For me it crashes the scripting editor every time.

    Hey, was this just unrelated advice or something you saw in the code/post I submitted? I am leaning towards the former in which case, good to know... haha

  13. This might seem obvious to the more Excel saavy crowd...

     

    The question: I delete rows of data in an excel CVS, and then use a macro to append text to it, however the appended text will skip the deleted rows in Excel, leaving blank rows for however many rows you have deleted.

     

    :huh: <-This is me with a problem.

     

     

    The background, which is skippable if you know the answer to the above and have blessed me with it.... ( :D <- this would be me with the answer)

     

     

    I have a Macro that uses an Excel CSV source file run through a 'Process Text file' loop, it will grab data and use it to process a record in an application and then append the line to a destination CSV file.

     

    This process can be interrupted by errors or other undetectable events and the files are several thousand lines long. I restart the macro by running the destination file through a Process Text File loop in order to determine how many rows have been completed before restarting the main process with the source CSV file. All the above is all contained in one Macro which is simply fed a file name and then detects or creates the destination files it needs.

  14. So I have this loop that tests if a window exists by setting the boolean to true/false.

     

    The dialog box for setting up the 'If Window' Boolean argument allows for two considerations, 'If the window does not exist', and 'if the window is not focused'. Both scenarios would apply to my problem.

     

    So I set the target window title using the "browse" button, with partial match criteria.

     

    If the specified window does not exist, then it should return true to the WindExists Variable. The loop agrument is waiting for WindExists == TRUE.

     

    Howeeeeeever.... I start the loop up, then close the target window as a test. The macro keeps merrily looping away. What gives? The Boolean value being sent to WindExists Variable is remaining FALSE despite the fact the window is gone and it should return TRUE? The program in question is a java program called Image Viewer. Other macro commands work for this, such as the 'Wait for window title to lose focus'. No problem with that, however, this isn't how I want to set up the detection process, and I shouldn't have to given the boolean test loop SHOULD work.

     

    Any ideas from the smarter crowd?

     

    <REPEAT UNTIL Variable="%WindExist%" Condition="\x00" Value="TRUE"/>
    <VARIABLE SET BOOL Destination="%WindExist%" Command="148" Option="\x01" Title="Image Viewer" Partial="TRUE" Wildcards="FALSE"/>
    <END REPEAT/>
    <TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Window is GONE, GONE, GONE!\r\n\\par %WindExist%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>

  15. The Update Textbox command solved all that so I consider it one of the coolest little features.

     

    Cory, I read about this last month and was pretty excited. I also have long macros that span several applications a pop and make use of the 'close window'/'open window' commands at various points in the script to keep the user informed of what data is being crunched. The big plus to me is with the ability to run mutiple macros, I'm hoping I can keep the status box open and run other macros that update the content. Sweetness.

     

    I have a large macro process currently in proposal format (fingers crossed) and it will make extensive use of this feature to update status for clerks as they collect data from image files to import into Excel sheets.

     

    Love your prop idea... lots of creative visual possibilities involving math and loops! I used to work in MacroMedia Director and Flash (and FutureSplash for all you guys with a memory). This might not be mind blowing, but it will certainly give me a little mental fun.

  16. Someone else, Jeff maybe, and I thought it would be cool to have MEP animate Forest when execution was in process. This way if the macro stalled, was at a pause waiting for user input, or whatever he would stop running. It would be cool but I might be suffering from featuritis.

     

    I guess "Forrest Gump" trumped "...it happens". :blink: (This was in a PG movie, Mods!)

     

    Well, glad it isn't me. I thought maybe it had to do with the legacy stuff from ME3 since I have not done full code rewrites.

     

    I wonder if this isn't off a "wait for..." command thing?

     

     

    Thanks!

  17. Hi Cory!

     

    It turns out the Access utility was sending back data in two formats, one was back to the clipboard and one was to a file which the Macro would parse once the "Wait for program to terminate" returned true.

     

    Once we took out the part where the utility wrote the result back to clipboard, everything worked fine.

     

    However, like you, I still beleive this was caused by MEP's clipboard function. This issue was not present when I used ME3 and the utility had no problem writing to the clipboard then.

  18. I think you miss my point Steve. If you macro only does one copy and paste there is no difference. But if you macro is doing a thousand copy/pastes then my solution is superior as it only executes one copy/paste for everything.

     

    Hi Cory, I also employ this strategy and don't even bother opening the excel files. I just load it all into memory, slice and dice, then save it back to the excel file. Of course I got this idea from one of your ancient posts.

     

    I think this method can be scary for some as it requires an absolute faith in your personal skills as a data visualist/analysist and not to mention your programming prowess.

     

    However, for the task in this thread, the macro is called up by a clerk after they selected a single cell in the Excel sheet to process. The task spans several applications and a "behind scenes" DB query and returns to Excel with data to fill the row.

  19. Hi, Steve, I see your point too, just different applications of theory because my macro starts off with a single clipboard copy command and no coded delay was required in ME3 and shouldn't be in ME4.

     

    I am thinking simply the function lag in Excel also stalled ME3's progress, which doesn't appear to be the case now.

     

     

    Thanks for the applied brainpower, everyone!

     

     

    Your solution negates the need for a delay after the Copy command, but may require a delay before it. My solution

    negates the need for a delay before it, and may not need a delay after it. Since the Copy command is being repeated, it should

    eventually gather information quickly enough - in fact I've never had the loop hang for very long with the Copy inside.

×
×
  • Create New...