Jump to content
Macro Express Forums

Errors with URL String Variables in MXEs


Recommended Posts

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

Link to comment
Share on other sites

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

 

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...