Adam
-
Posts
15 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Adam
-
-
External scripts can pass in parameters. "Macro Run" does not, as far as I know.
After about 10 hours of testing to figure out how the variable scope chain works, I think I figured out a way to create an in-memory truly global variable scope (no registry, env vars, files, etc). That's the good news. Bad news is that I don't have time to build a production-quality implementation and test it before I have to produce a deliverable tomorrow.
One important criteria for tomorrow is script readability. Semi-technical users may be modifying them.
Out of curiosity, if you're working in the scripting editor, what parameter passing methods have you found to be the most visually concise? For example, variable set string on one line, then macro run on the next line, requires two lines... even more if there are multiple variables another macro requires. One line macro run commands would be nice, but I haven't seen a way to implement that in a simple looking fashion.
To contrast that question, what parameter passing methods have you found to be best for execution speed?
Cheers!
Adam
-
Kevin,
Thank you. I hadn't really chosen a name yet. I'll keep that in mind.
If the libraries are built for Macro Express Pro, I assume it's okay to use the name in a description of what it is?
For example: "RandomName - A library of extension macros for Macro Express Protm."
We welcome the idea of creating add-on function libraries for Macro Express Pro. We are even contemplating creating some ourselves.The name 'Macro Express' is a registered trademark of Insight Software Solutions, Inc. Use of this name in another product requires permission. We recently received a request to use 'Macro Express' as part of a product with a name eerily similar to the one you propose. After careful consideration we suggested that the party choose a different name that does not infringe on our registered trademark.
We think it would be a great idea to have users create libraries for Macro Express Pro. However, we request that you choose a different name.
We invite anyone interested in developing add-on libraries for Macro Express Pro, either as Open Source or as a product for sale, to contact us for questions and advice.
-
Macro Express is very good for many things. However, intuitive web application interaction is not one of them.
As I continue teaching M/E to others here at Save the Children, the web application functionality gap is making our macros more complex, brittle, lengthy, and maintenance intensive. We use a lot of web apps, and I don't want our staff to feel overwhelmed trying to use M/E.
To prevent it becoming a large issue, I've considered blending Macro Express and JavaScript in an in-house web apps extension library. The more I think about it though, a hybrid web apps library seems like it would help all Macro Express users (increasingly so as web apps continue to proliferate). Building something in-house would help only us. What would y'all think about collaboratively creating a web interaction macro library for everyone's benefit?
A few macro ideas:
- An intuitive and robust cross-browser "wait for web page" macro...
- Focus ID [%foo%]
- Click to capture a DOM element and save it to [%bar%]
- Focus element [%bar%]
- Get text of element [%bar%]
- Click element [%bar%]
- Click [n] element in class[%baz%]
- Get the values of all checked checkboxes on a page
- Etc...
Cheers!
Adam
- An intuitive and robust cross-browser "wait for web page" macro...
-
I've never used this command before, so I may have misunderstood. But don'tyou have to enter the full path and filename as it says? In my case I did the following:
1. Made an MXE file identical to yours
2. Pasted your macro but then edited it so that it looks like this:
Load Macro Text File: set_variables.mxe
<LOAD MACRO TEXT FILE File="C:\\Docs\\MXE files\\Mine\\set_variables.mxe"/>
It ran without producing an error message, displaying a dialog 'Load Macro Text File', with the specified file in the 'Select a file to load:' box (and the macro then terminated). On clicking that nothing happened. Should it?
All that aside, is the error message arising from the playable macro itself, not the macro that runs it? If the latter, then presumably it's because you haven't defined that variable in your original playable macro. Did you get the message "The variable "internet_urls_jquery" is not currently defined. Would you like to create it now?" ?
BTW, for my own education, could you briefly explain why you use this method of running a macro please, rather than say a hotkey or menu?
--
Terry, East Grinstead, UK
Terry,
It ultimately came down to the issue of variable scope. Thanks for reminding me of that. Scoping is the reason I was playing around with different macro invocations, to see if there was some way I could access the callee's variable's from the caller.
-
Ha! Now that's a good idea Joe! I had tried temporary substitution with other characters but eventually MEP evaluated and caused a problem. I never considered replacing the percent signs with percent variables.
Second that. Handy workaround.
-
Thanks for the insight fellahs.
Joe,
I thought about doing the mid-form registry entries or ini files, but I'm not that familiar with methods for using those from an HTA. When you talk about writing to them for mid-form saving, what method do you prefer?
Adam
-
Not sure if this is me or ME 4.0.1.1
When running a single line macro:
<LOAD MACRO TEXT FILE File="(full path to file here)\\set_variables.mxe"/>
Which references this file:
<<Macro Express 4 Playable Macro>> [string:%internet_urls_jquery% elements:0 global:true] [string:%internet_urls_firebug% elements:0 global:true] <<BEGIN SCRIPT>> <VARIABLE SET STRING Option="\x00" Destination="%internet_urls_jquery%" Value="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"/> <VARIABLE SET STRING Option="\x00" Destination="%internet_urls_firebug%" Value="http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js"/>
I get the error:
---------------
The following error was encountered:
Undefined variable or the variable is the wrong type "%internet_urls_jquery%"
Macro Name: Foo
Line Number: 2
---------------
Any thoughts on what might be causing that?
Thanks!
Adam
-
External scripts seems like one of the most powerful and least documented features of M/E Pro, so I'm curious who is playing with them in what ways.
At a minimum they make regular expressions a snap.
I've personally been pondering the the HTA/HTML capabilities. A couple questions come to mind.
How would you return multiple variables from a HTA/HTML page? Multiple wscript.echo()?
How would you deal with a user filling out half an HTA/HTML page with a variety of form elements, (radio, multiple select, text area, etc) then coming back to it a day later?
Cheers!
Adam
-
Version: M/E pro 4.0.0.1
When working with an URL like:
http://data.un.org/Data.aspx?d=MDG&f=seriesRowID%3a563%3bcountryID%3a100%2c108%2c116%2c12%2c124%2c140%2c152%2c156%2c170%2c178%2c180%2c188%2c191%2c212%2c218%2c222%2c231%2c24%2c246%2c250%2c276%2c288%2c300%2c308%2c32%2c36%2c384%2c4%2c40%2c50%2c56%2c64%2c68%2c70%2c752%2c756%2c76%2c818%2c826%2c84%2c840%2c854&c=2,3,4&s=_countryEnglishNameOrderBy:asc,year:desc&v=1
M/E currently says that %3a563% isn't defined. I can't find anything about escaping percent characters in strings in the forums or help docs.
Any thoughts on the best way to store that in a variable and navigate to that page?
Cheers!
Adam
-
Masochist.. perhaps. Using the scripting editor is a lot like using dreamweaver's design view to make web pages. Kinda clunky. Things are faster and more flexible when you can "see" the design while looking at the code.
Anyone have an unofficial list they wouldn't mind sharing?
-
Title sums it up. I'm trying to get away from using the scripting editor.
Thanks!
Adam
-
Though it'll be (relatively) slow because of a copy command, you could just have it do this:
Shift Key Down Text Type: <ARROW RIGHT> Shift Key Up Clipboard Copy If Clipboard Text Equals "1" Sound Beep Else Sound Beep Sound Beep End If Text Type: <ARROW LEFT> Clipboard Empty
<SHIFTD><TEXTTYPE:<ARROW RIGHT>><SHIFTU><CLIPC><IFOTH2:07:1:1><BEEP><ELSE><BEEP><BEEP><ENDIF><TEXTTYPE:<ARROW LEFT>><CLIPE>
-
A useful trick, and one that was definitely worth sitting down and figuring out.
Variable Set String %T1% "blah blah blah blah Orders halb halb halb halb" Variable Set Integer %N1% from Position of Text in Variable %T1% Variable Modify Integer: %N1% = %N1% - 1 Variable Modify String: Delete Part of %T1%
<TVAR2:01:01:blah blah blah blah Orders halb halb halb halb><IVAR2:01:13:1:Orders><NMVAR:02:01:1:0000001:2:0000001><TMVAR2:11:01:00:001:N01:>
-
I'm a bit of a newbie to the program at this point, but if it looked like the program closed when it actually didn't, there must have been a color change. What about sampling a relative section of the screen, (or window, or control if possible) for pixel color on the same .5 sec time frame? If the pixel color changed, it would increment %N5%. It seems like that would be able to give you the count.
Perhaps waiting for the control to gain/lose focus?
Variable implementation and performance implications
in Macro Express and Macro Express Pro
Posted
I'm curious about how variables are implemented... or, to be more specific, I'm curious if the way they're implemented has performance implications when you start dealing with macros that have many variables.
What are the implications of defining one hundred variables on a single macro? What about one thousand? Ten thousand?
For context, this is a purely theoretical question. Dealing with a macro that has a thousand (or ten thousand!) variables is an experience I'd rather avoid.
Cheers!
Adam