Jump to content
Macro Express Forums

Set Variable From Prompt... Limitation?


Recommended Posts

Well, I'm stoked about ME Pro, so here I am re-creating my most-often used-at-home macros on the new system and I've

just come across what I hope is a simple matter of adjusting a preference.

 

I have a macro that opens a dialog box so I can choose what often-visited website I'd like. Example: Wikipdedia.

 

So my dialog box prompts me and I select Wikipedia, another prompt opens asking me what I want to search for. At this

point I would normally put in something like "Italian dressing" or "rhododendron" or whatever I happen to be curious about.

 

So far, so good.

 

I previously also had it set so that if the prompt remains "" (aka BLANK), then it just goes to the Wikipdedia home page.

 

Alas, in ME Pro, if nothing is entered into the prompt window, the "OK" button remains inactive. I can work with this at

home because, really, I could just set the default for that variable as "Wiki Home" or "----" and send it automatically to the

Wikipedia home page when the variable = "-----".

 

But that's for my personal use.

 

At work I have a similar set-up where I need to combine various serial numbers into a program we use. How many serial

numbers is dependent on the account. Maybe there is one, maybe there are ten. So my macro prompts me for a serial

number and I enter it. The macro then types the serial number into the correct box and prompts me for the next one, and

so on. When there are no more serial numbers, I leave the prompt blank, and the macro recognizes that to mean it is time

to move on.

 

I don't want to limit my co-workers with the necessity to remember just how many dashes it takes, in case they start typing

a number and then realize they don't need one after all.

 

Is there a preference to activate the "OK" button when the prompt is left blank? Or am I just going to have to suck it up and

deal with it or find a different work-around?

 

The bottom line, I guess, is simply this: Can't "" be legitimate contents for a text variable?

 

Here's my code, in case somebody wants to take a close look and tell me what I could do differently to make this work the

way I want (or in case somebody has a more efficient way to do the whole thing):

<VARIABLE SET STRING Option="\x00" Destination="%T1%" Value="A"/>
<MULTIPLE CHOICE MENU Style="\x00" Result="\x00" Dest="%T1%" Title="Launch What Page?" Prompt="What web site are you launching?" Options="Google\r\nDictionary\r\nWikipedia\r\nPGMacros\r\nOther" Left="Center" Top="Center" Monitor="0" Width="443" Height="296" OnTop="FALSE"/>
<IF VARIABLE Variable="%T1%" Condition="\x00" Value="A" IgnoreCase="FALSE"/>
<VARIABLE SET STRING Option="\x01" Destination="%T2%" Prompt="What are we searching?" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/>
<IF VARIABLE Variable="%T2%" Condition="\x00" Value="gmail" IgnoreCase="FALSE"/>
<WEB SITE URL="http://mail.google.com" Wait="FALSE" Default_Browser="TRUE" _IGNORE="0x000C"/>
<ELSE/>
<VARIABLE MODIFY STRING Option="\x0F" Destination="%T2%" ToReplace=" " ReplaceWith="+" All="TRUE" IgnoreCase="FALSE"/>
<WEB SITE URL="http://www.google.com/search?hl=en&q=%T2%" Wait="FALSE" Default_Browser="TRUE" _IGNORE="0x000C"/>
<END IF/>
<END IF/>
<IF VARIABLE Variable="%T1%" Condition="\x00" Value="B" IgnoreCase="FALSE"/>
<VARIABLE SET STRING Option="\x01" Destination="%T2%" Prompt="What are we defining?" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/>
<IF VARIABLE Variable="%T2%" Condition="\x00" IgnoreCase="FALSE"/>
<WEB SITE URL="http://dictionary.reference.com/" Wait="FALSE" Default_Browser="TRUE" _IGNORE="0x000C"/>
<ELSE/>
<VARIABLE MODIFY STRING Option="\x0F" Destination="%T2%" ToReplace=" " ReplaceWith="%20" All="TRUE" IgnoreCase="FALSE"/>
<WEB SITE URL="http://dictionary.reference.com/browse/%T2%" Wait="FALSE" Default_Browser="TRUE" _IGNORE="0x000C"/>
<END IF/>
<END IF/>
<IF VARIABLE Variable="%T1%" Condition="\x00" Value="C" IgnoreCase="FALSE"/>
<VARIABLE SET STRING Option="\x01" Destination="%T2%" Prompt="What are we searching?" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/>
<IF VARIABLE Variable="%T2%" Condition="\x00" IgnoreCase="FALSE"/>
<WEB SITE URL="http://en.wikipedia.org/wiki/Main_Page" Wait="FALSE" Default_Browser="TRUE" _IGNORE="0x000C"/>
<ELSE/>
<VARIABLE MODIFY STRING Option="\x0F" Destination="%T2%" ToReplace=" " ReplaceWith="_" All="TRUE" IgnoreCase="FALSE"/>
<WEB SITE URL="http://en.wikipedia.org/wiki/%T2%" Wait="FALSE" Default_Browser="TRUE" _IGNORE="0x000C"/>
<END IF/>
<END IF/>
<IF VARIABLE Variable="%T1%" Condition="\x00" Value="D" IgnoreCase="FALSE"/>
<WEB SITE URL="http://pgmacros.invisionzone.com/" Wait="FALSE" Default_Browser="TRUE" _IGNORE="0x000C"/>
<END IF/>
<IF VARIABLE Variable="%T1%" Condition="\x00" Value="E" IgnoreCase="FALSE"/>
<VARIABLE SET STRING Option="\x01" Destination="%T2%" Prompt="What website?" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/>
<IF VARIABLE Variable="%T2%" Condition="\x07" Value=".com" IgnoreCase="FALSE"/>
<IF VARIABLE Variable="%T2%" Condition="\x07" Value=".org" IgnoreCase="FALSE"/>
<IF VARIABLE Variable="%T2%" Condition="\x07" Value=".net" IgnoreCase="FALSE"/>
<IF VARIABLE Variable="%T2%" Condition="\x07" Value=".gov" IgnoreCase="FALSE"/>
<IF VARIABLE Variable="%T2%" Condition="\x07" Value=".edu" IgnoreCase="FALSE"/>
<VARIABLE MODIFY STRING Option="\x06" Destination="%T2%" Value=".com"/>
<END IF/>
<END IF/>
<END IF/>
<END IF/>
<END IF/>
<WEB SITE URL="http://%T2%" Wait="FALSE" Default_Browser="TRUE" _IGNORE="0x000C"/>
<END IF/>

Link to comment
Share on other sites

After trying your code it is unclear whether this is a design change to the command or a bug. I suspect it's a bug.

 

The work-around is to enter a character (any character) and then a backspace. The OK button will remain enabled, which is what leads me to suspect a bug.

Link to comment
Share on other sites

After trying your code it is unclear whether this is a design change to the command or a bug. I suspect it's a bug.

 

The work-around is to enter a character (any character) and then a backspace. The OK button will remain enabled, which is what leads me to suspect a bug.

Ok, I see that works. If it's a bug, I can live with that. Early versions are rarely 100%. Hopefully it gets fixed in an

early version update.

 

Thanks!

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...
×
×
  • Create New...