-
Posts
1,002 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Events
Posts posted by joe
-
-
But when I try it no initial or closing entry is made as described. It does however appear to log error is encountered. Logging messages appears to work fine and I could use that instead but it seems silly.
On my system, checking the Preferences->Playback->Log All Macro Information is the only way to get a "Macro Start" recorded. Left unchecked it will not record the start of a macro, or the end of one either, for that matter.
The Do Not Display Error box within the Log Errors command acts differently depending on if a Macro Return / Macro Stop command is encountered. If the macro ends without encountering either then a "Macro Completed" is recorded regardless of being checked or unchecked. However, if your macros contain Macro Return / Macro Stop commands then the box must be checked in order to record the end of the macro.
-
Silence can speak a thousand words....
Over the weekend I looked for some functionality in WMI. Nothing. I find it strange. There has to be something or else Windows could not pop up the error message that it does. I'll check out some API calls later. BTW doing a Google was pretty much useless, too.
-
The book can also be purchased as a PDF download for $19.95
And of course, I HIGHLY recommend either one!!
-
Macro Express executables cannot be built. And as far as I know, there are no plans to provide for this capability.
-
Here is al ist of functions ready for testing:
Application Level Functions
--------------------------------------------------------------------------------
- XL_AppLaunch - Launches a new instance of Excel
- XL_AppAttach - Attach to an already running instance of Excel
- XL_AppDetach - Detaches Excel from the Macro Express Extended Library
- XL_AppTerminate - Shuts down Excel without saving the changes you may have made
- XL_AppClose - Shuts down Excel but saves any changes to the workbooks first
- XL_AppSave - Saves all workbooks without prompting
- XL_AppHide - Makes the Excel application invisible
- XL_AppShow - Makes the Excel application visible
Workbook Level Functions
--------------------------------------------------------------------------------
- XL_WorkbookAdd - Adds a new, blank workbook to Excel
- XL_WorkbookOpen - Opens an existing Excel workbook file
- XL_WorkbookTerminate - Closes an Excel workbook without saving your changes
- XL_WorkbookClose - Closes a workbook but saves any changes to it first
- XL_WorkbookSave - Saves an Excel workbook to a file
- XL_WorkbookSaveAs - Saves an Excel workbook as a different file or in a different format
- XL_WorkbookSaveAll - Saves your changes to all the open workbooks without prompting
- XL_WorkbookCopy - Saves a copy of the workbook to a file but doesn't modify the open workbook in memory
- XL_WorkbookActivate - Makes an Excel workbook the default, active workbook
- XL_WorkbookGetActive - Returns the name, index number, or both of the active workbook
- XL_WorkbookGetCount - Returns the number of workbooks in Excel
- XL_WorkbookHide - Makes an Excel workbook invisible (hidden)
- XL_WorkbookShow - Makes an Excel workbook visible again
- XL_WorkbookEnumerate - Returns an array of workbooks and properties suitable for a CSV file
- XL_WorkbookExists - Returns true if a workbook exists in the Excel application
- XL_WorkbookIsVisible - Returns true if a workbook is visible or false if it is not
- XL_WorkbookIsChanged - Returns true if a workbook has been changed (modified) or false if it has not
- XL_WorkbookHasPassword - Returns true if a workbook has a password or false if it does not
- XL_WorkbookGetFullPath - Returns the full path file name of the target workbook
- XL_WorkbookGetNameFromIndex - Returns the name of a workbook based on its index number
- XL_WorkbookGetIndexFromName - Returns the index number of a workbook based on its name
Sheet Level Functions
--------------------------------------------------------------------------------
- XL_SheetAdd - Adds one or more worksheet(s) to a workbook
- XL_SheetSaveAs - Saves a single worksheet to a different file or in a different format (Note: Not yet implemented)
- XL_SheetDelete - Deletes a worksheet without saving changes
- XL_SheetActivate - Activates a worksheet
- XL_SheetGetActive - Returns the name, index number, or both of the active worksheet
- XL_SheetHide - Makes a worksheet invisible (hidden)
- XL_SheetHideAll - Sets all worksheets, except the active worksheet, to hidden on a specified workbook
- XL_SheetShow - Makes a worksheet visible again
- XL_SheetShowAll - Makes all worksheets on a specified workbook visible again
- XL_SheetGetCount - Returns the number of worksheets on a workbook
- XL_SheetCopy - Copies a worksheet and places it at the position specified
- XL_SheetCopyToOtherWorkbook - Copies a worksheet from one workbook to another
- XL_SheetMove - Moves a worksheet to a specified position
- XL_SheetMoveToOtherWorkbook - Moves a worksheet from one workbook to another
- XL_SheetRename - Renames a worksheet
- XL_SheetExists - Returns true if a worksheet exists or false if it does not
- XL_SheetIsVisible - Returns true if a worksheet is visible or false if it is not
- XL_SheetEnumerate - Returns an array of worksheets and properties suitable for a CSV file
- XL_SheetGetNameFromIndex - Returns the name of a worksheet based on its index number
- XL_SheetGetIndexFromName - Returns the index number of a worksheet based on its name
- XL_SheetSort - Sorts all worksheets on a workbook
- XL_AppLaunch - Launches a new instance of Excel
-
But i want based on a variable t1 which gets assigned while copying from the application to go to the exact name of the sheet and paste there.
The key to having Macro Express go to the correct sheet, is to know how to go to the correct sheet manually, then use the Text Type command.
You can activate any sheet in a workbook by using the Excel Go To dialog; once a workbook is launched, simply type <CTRL>+G to bring forth the dialog. In the Reference: field type the name of the sheet followed by an exclamation point followed by a cell reference (A1, C3, etc). Say, for example, you wanted to activate a sheet named MyWorksheet: enter "MyWorksheet!A1" into the field and hit enter. If you were to set a text variable in Macro Express, say %T1%, then that is what Macro Express would type.
-
There is no subscriber list for our company (Professional Grade Macros). We use the forum to update information. Insight Software Solutions (Macro Express) does have a newsletter and is kind enough to post our information in it.
-
Very well thought out, Zero. Very well organized. Thanks a bunch for your input.
Probably sooner rather than later we will begin adding IE functions to the Macro Express Extended Library. We are currently tied up with the Excel portion, but when we do start on the IE side, more than likely it'll be with functions that return arrays of click-able links, table data, form data, and so forth. Then we will move up the ladder.
At the proper time, we'll post a topic asking for testers. And your input as a tester would certainly be welcome.
-
From the forums it seems this isn't the case and that the question has been beaten to death, but I felt I needed to ask anyways.
Good timing on your question/statements, Zero!
We are working on our Macro Express Extended Library. Currently we are on the Microsoft Excel portion of it. But I've been itching to get to the Internet Explorer DOM section and even have some functions sketched-out.
What I've been looking for is a way to do data mining. However, I've reports of others wanting to have more interaction with, and to automate IE. My question remains: "What exactly does it mean to automate IE"?.
What would you like to see Macro Express do with IE? Floyd and I are always open to suggestions for our new Macro Express Extended Library.
-
The Microsoft Excel section of our new Macro Express Extended Library product is currently under development and we are looking for a handful of testers having Microsoft Excel 2000, 2002 (XP), 2003, or 2007.
You must have Windows 2000, XP, or Vista and be an experienced Macro Express 3 user having a good working knowledge of Microsoft Excel (workbooks, worksheets, ranges, cells, formatting, and so forth). And you must play well with others, like Floyd does ... only better
If you are interested, please email Floyd or Joe. We will begin going through the requests starting this weekend. Seating is limited, so vote early and vote often
Warning: if you are chosen, test the functions only on Excel data that you can afford to lose. DO NOT test on anything critical like your company's year-end tax data, or for that matter, any of your employer's data. Do not use these functions on anything important. They are, after all, just being developed and it is possible that we, or you, might make a mistake.
In return for your efforts, active testers will receive one free license of the Macro Express Extended Library when it is released. Hey! You in the back ... stop snickerin' it's all we got.
-
I did forget to mention that it will do its job in under 1 second on a file that small (473 k). We got lucky in that the data you wanted to extract was easy to find and parse. Anything more complicated would be better served using regular expressions.
Glad it worked for you!
-
Here is a macro that will parse through a string without using an external regular expression. Although, for something like this, regualr expressions are MUCH better and easier. The clipboard will contain your string of numbers at the end of the macro. You will need to adjust the location and name of the input file.
If I have the time, I will post a macro that generates a temporary external regular expression, uses it to get the values from a string or file, and then deletes itself when finished.
// Create CR/LF string and a string of digits Variable Set %T10% to ASCII Char of 10 Variable Set %T13% to ASCII Char of 13 Variable Modify String: Append %T10% to %T13% Variable Set String %T4% "0123456789" // Read in the file to search and begin main loop Variable Set String %T1% from File: "SPRHum1.mrc" Repeat Until %N1% <> %N1% // Locate next occurrence of "a66". If not found then we are done. Variable Set Integer %N1% from Position of Text in Variable %T1% If Variable %N1% = 0 Repeat Exit End If // Delete everything in the search string prior to "a66" Variable Modify Integer: Dec (%N1%) Variable Modify String: Delete Part of %T1% // "a66" must be followed by 8 digits and a space so if a space is in position 12, this could be a good find. // If not, then delete the first character ("a") so the next search won't find it again. Variable Set Integer %N1% from Position of Text in Variable %T1% If Variable %N1% = 12 Variable Modify String: Copy Part of %T1% to %T2% Variable Modify String: Delete Part of %T1% Variable Modify String: Trim %T2% // Make sure that positions 4 through 11 are all digits. // If not then this is not a good find so don't append it to the save string Repeat Start (Repeat 8 times) Variable Modify String: Copy Part of %T2% to %T3% If Variable %T4% does not contain variable %T3% Variable Set String %T2% "" Repeat Exit End If Repeat End If Variable %T2% > "" Variable Modify String: Append "%T2%%T13%" to %T5% End If Else Variable Modify String: Delete Part of %T1% End If Repeat End // Copy the save string to the clipboard. Variable Modify String: Save %T5% to Clipboard Delay 250 Milliseconds Macro Return <REM2:Create CR/LF string and a string of digits><ASCIIC:10:1:10><ASCIIC:13:1:13><TMVAR2:08:13:10:000:000:><TVAR2:04:01:0123456789><REM2:><REM2:Read in the file to search and begin main loop><TVAR2:01:04:C:\Temp\SPRHum1.mrc><REP3:08:000002:000002:0001:1:01:N1><REM2:><REM2:Locate next occurrence of "a66". If not found then we are done.><IVAR2:01:13:1:a66><IFVAR2:2:01:1:0><EXITREP><ENDIF><REM2:><REM2:Delete everything in the search string prior to "a66"><NMVAR:09:01:0:0000001:0:0000000><TMVAR2:11:01:00:001:N01:><REM2:><REM2:"a66" must be followed by 8 digits and a space so if a space is in position 12, this could be a good find.><REM2:If not, then delete the first character ("a") so the next search won't find it again.><IVAR2:01:13:1: ><IFVAR2:2:01:1:12><TMVAR2:10:02:01:001:012:><TMVAR2:11:01:00:001:012:><TMVAR2:01:02:00:000:000:><REM2:><REM2:Make sure that positions 4 through 11 are all digits.><REM2:If not then this is not a good find so don't append it to the save string><REP3:01:000004:000001:00008:1:01:><TMVAR2:10:03:02:N01:001:><IFVAR2:4:04:8:T3T><TVAR2:02:01:><EXITREP><ENDIF><ENDREP><IFVAR2:1:02:4:T><TMVAR2:07:05:00:000:000:%T2%%T13%><ENDIF><ELSE><TMVAR2:11:01:00:001:001:><ENDIF><ENDREP><REM2:><REM2:Copy the save string to the clipboard.><TMVAR2:16:05:00:000:000:><MSD:250><MRETURN>
-
So we are on the same page:
If your regular expression is correct, the file you sent has 133 matches in it.
Are you wanting to just get a list of the "a66########" numbers within the file?:
- a6612345678
- a6687654321
- a6656473829
- ...
or do you need other information from the file, too?
Also, is there always whitespace following the pattern of "a66" + 8 digits? Or could there be non-whitespace characters adjacent to them?
- a6612345678
-
Can you supply a sample file? Zipped, if possible. It would make it easier to determine a solution.
-
There is a Shutdown command within the System category. Use it as the last line in your macro.
I'm curious as to why you want to do this, though.
-
There was a discussion on this recently. Floyd created a pretty good example on opening and closing floating menus based on window titles.
As you have already discovered, a macro can be activated when a window or control gains focus, but there is no way to activate a macro (which would be used to disable a floating menu) on a Window Close event.
-
It cant process the linebreak and save it into a variable...
Not sure what you mean by the above.
- Are you trying to process each line from a text file? ... see the Text File Process command
- Are you attempting to create a <CR><LF> text variable? ... see the Variable Set to ASCII command
- Are you trying to process each line from a text file? ... see the Text File Process command
-
Yes, this discussion has been had. But it never hurts to repeat it because it's a hard thing to track down in a program and will have me scratching my head each time ... until the light goes on.
When you tell Macro Express to text Type <ALT>F, it must do the same thing on the keyboard that any of us do:
<ALT><SHIFTD>f<SHIFTU><ALT> That is; hold the Alt and Shift Keys down, press "f" and then let 'em all go.
If the accelerator key in an application is expecting a lowercase "f" it won't get it.
Also, some older application menus require a <ALT><ALT>f rather than a single <ALT>.
-
I presume that the macro stops running as soon as the program starts to launch ...
Yes, if it's the last command in the macro. Did you, by chance, change the Delay in Seconds field on the Advanced tab of the Program Launch dialog? Macro Express will wait that many seconds before launching an app.
-
I know licensing might be an issue. My concern is that each virtual connection would be running a different library. And I have no idea if this will work or not.
Then again, licensing might not be an issue. You already have those. But I would not presume to speak for Insight.
Okay, I'm lost now. Are you saying that your organization is dumping 50 of its desktops to go back to terminals for all of their apps? Or are you saying that there would be terminals for just Macro Express?
-
The boys at Insight will need to answer this one.
But I know that Macro Express will mostly run over Citrix, VPN, RD, and so forth. I say "mostly" because it depends on what the macro is doing and how it was designed.
For larger clients, we set up a single library on a server somewhere and all workstations access and work off of that library. But these are standard desktops with their own copy of Macro Express.
I suspect the licensing might be an issue.
-
I'm trying to think of what could cause this. It does not happen on any of our Vista systems. In fact, I've never seen it happen at all.
Are you sure the macro has stopped? Does the icon change from "the running guy" back to the big blue "M"?
-
Just some quick thoughts:
I would have each macro scheduled to fire not at startup but at a specific time, maybe 1 or 2 minutes apart. Startup would mean to fire on a reboot also.
Do not use the Macro Run command to string them together. Not in this case. Not for unattended automation unless the called macro is doing something that you know will never throw an error.
Use a dedicated folder/file, or use the Registry, or use the message log itself to have each macro record its state. If successful, have it write something to one of the above destinations. Your other macros can read these states to determine what, if anything they should do. If nothing is written then the macro threw an error.
Turn off the error display by using the Log Errors command. It will stop the macro without a dialog so another macro can fire. How to is shown in the command's help file.
You could have your macros continue firing until all work is done. Again, use an output message to communicate states to the other macros. If a macro is finished with its task, use the Macro Disable command so it does not run again.
-
Can a wildcard be used for the tail end of the filename?
No. But I like the idea and can see the benefit. This particular applet is not examining file names, but rather the DOM objXL.Workbooks.Name, so it would require converting a wildcard string passed by the user into a regular expression pattern and then finding the first match.
We are currently working on a library of Excel commands to be accessed directly from Macro Express. So, this feature may show up there instead of here ... or both.
Installing PGM Functions Library in Vista
in Macro Express 3.x Third Party Tools
Posted
Been a long time, how are you doing?
Well, there is a problem with the install, but running them. Send me your email addres and we'll set you up!