Jump to content
Macro Express Forums

More on codebox


Recommended Posts

But here even if I do have wide code it doesn't make the whole message wide. Oops! Guess not! The preview works!

<COMMENT Value="Prelims"/>
<VARIABLE SET TO ASCII CHAR Value="9" Destination="T"/>
<VARIABLE SET TO ASCII CHAR Value="10" Destination="LF"/>
<VARIABLE SET TO ASCII CHAR Value="13" Destination="CR"/>
<VARIABLE SET STRING Option="\x02" Destination="%Source%" _COMMENT="Grab the clipboard"/>
<VARIABLE SET STRING Option="\x00" Destination="%Output%" Value="Last Name%T%First Name%T%Middle Name%T%Catch All%CR%%LF%" _COMMENT="Create a header row"/>
<TEXT BOX DISPLAY Title="Progress" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Working. Please wait.\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="1" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x02" Delay="2"/>
<COMMENT Value="Start main loop"/>
<REPEAT UNTIL Variable="%Source%" Condition="\x00"/>
<COMMENT Value="Cut out one line"/>
<VARIABLE SET INTEGER Option="\x0E" Destination="%Position%" Text_Variable="%Source%" Text="%LF%" Ignore_Case="FALSE" _COMMENT="Find the end of the first line"/>
<VARIABLE MODIFY STRING Option="\x09" Destination="Line" Variable="%Source%" Start="1" Count="%Position%" _COMMENT="Copy line over"/>
<VARIABLE MODIFY STRING Option="\x0A" Destination="%Source%" Start="1" Count="%Position%" _COMMENT="Delete line from source"/>
<VARIABLE MODIFY STRING Option="\x00" Destination="%Line%" _COMMENT="Trim off the CRLF of the line"/>
<COMMENT Value="Grab last name"/>
<IF VARIABLE Variable="%Line%" Condition="\x06" Value="," IgnoreCase="FALSE" _COMMENT="In case it doesn't have a comma we junk it"/>
<VARIABLE SET INTEGER Option="\x0E" Destination="%Position%" Text_Variable="%Line%" Text="," Ignore_Case="FALSE" _COMMENT="Find the comma position"/>
<VARIABLE MODIFY STRING Option="\x09" Destination="%Name Last%" Variable="%Line%" Start="1" Count="%Position%" _COMMENT="Copy the last name out"/>
<VARIABLE MODIFY STRING Option="\x0A" Destination="%Line%" Start="1" Count="%Position%" _COMMENT="Delete last Name"/>
<VARIABLE MODIFY STRING Option="\x0F" Destination="%Name Last%" ToReplace="," All="FALSE" IgnoreCase="FALSE" _COMMENT="Get rid of the comma"/>
<VARIABLE MODIFY STRING Option="\x00" Destination="%Line%" _COMMENT="Kills left over space"/>
<COMMENT Value="Grab first name"/>
<IF VARIABLE Variable="%Line%" Condition="\x06" Value=" " IgnoreCase="FALSE" _COMMENT="Checks to see if it has a space"/>
<VARIABLE SET INTEGER Option="\x0E" Destination="%Position%" Text_Variable="%Line%" Text=" " Ignore_Case="FALSE" _COMMENT="Find position of space"/>
<VARIABLE MODIFY STRING Option="\x09" Destination="%Name First%" Variable="%Line%" Start="1" Count="%Position%" _COMMENT="Copy out first name"/>
<VARIABLE MODIFY STRING Option="\x00" Destination="%Name First%" _COMMENT="Remove space"/>
<VARIABLE MODIFY STRING Option="\x0A" Destination="%Line%" Start="1" Count="%Position%" _COMMENT="Delete first name from line"/>
<ELSE _COMMENT="Sweet!"/>
<VARIABLE MODIFY STRING Option="\x08" Destination="%Name First%" Variable="%Line%" _COMMENT="Copies all of line to the First name"/>
<VARIABLE SET STRING Option="\x00" Destination="%Line%" _COMMENT="Deletes the rest of Line"/>
<END IF/>
<COMMENT Value="Grab Middle name"/>
<IF VARIABLE Variable="%Line%" Condition="\x06" Value=" " IgnoreCase="FALSE" _COMMENT="Checks to see if it has a space"/>
<VARIABLE SET INTEGER Option="\x0E" Destination="%Position%" Text_Variable="%Line%" Text=" " Ignore_Case="FALSE" _COMMENT="Find position of space"/>
<VARIABLE MODIFY STRING Option="\x09" Destination="%Name Middle%" Variable="%Line%" Start="1" Count="%Position%" _COMMENT="Copy out middlename"/>
<VARIABLE MODIFY STRING Option="\x00" Destination="%Name Middle%" _COMMENT="Remove space"/>
<VARIABLE MODIFY STRING Option="\x0A" Destination="%Line%" Start="1" Count="%Position%" _COMMENT="Delete middle name from line"/>
<ELSE/>
<VARIABLE MODIFY STRING Option="\x08" Destination="%Name Middle%" Variable="%Line%" _COMMENT="Copies all of line to the middle name"/>
<VARIABLE SET STRING Option="\x00" Destination="%Line%" _COMMENT="Deletes the rest of Line"/>
<END IF/>
<COMMENT Value="Output"/>
<VARIABLE MODIFY STRING Option="\x06" Destination="%Output%" Value="%Name Last%%T%%Name First%%T%%Name Middle%%T%%Line%%CR%%LF%"/>
<ELSE/>
<COMMENT Value="Output"/>
<VARIABLE MODIFY STRING Option="\x06" Destination="%Output%" Value="%T%%T%%T%%Line%%CR%%LF%"/>
<END IF/>
<END REPEAT/>
<COMMENT Value="Stick on Clipboard"/>
<VARIABLE MODIFY STRING Option="\x10" Destination="%Output%"/>
<BEEP/>
<TEXT BOX DISPLAY Title="Progress" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 All Done! I put the results on your clipboard\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="1" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x01" Delay="2"/>
<DELAY Flags="\x01" Time="2"/>

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...