is there an efficient way to deal with capital letters

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
timle
Pro Scripter
Posts: 96
Joined: Tue Apr 20, 2004 5:53 am

is there an efficient way to deal with capital letters

Post by timle » Thu Jun 02, 2011 4:53 pm

Hello,
I use if statement to look for a certain word below but I have to use several "if" statement to catch all the possible capital letters( See below) is there a more efficient way to do that with out getting complicated

thanks

sample:

if>segment_1=hou,moveon,
if>segment_1=Hou,moveon,
if>segment_1=HOU,moveon,

Jerry Thomas
Macro Veteran
Posts: 267
Joined: Mon Sep 27, 2010 8:57 pm
Location: Seattle, WA

Post by Jerry Thomas » Thu Jun 02, 2011 7:51 pm

What about this...

Code: Select all

UpperCase>segment_1,segment_1
If>segment_1=HOU,moveon
...
or force to lowercase, whichever works better.
Thanks,
Jerry

[email protected]

timle
Pro Scripter
Posts: 96
Joined: Tue Apr 20, 2004 5:53 am

Post by timle » Thu Jun 02, 2011 8:00 pm

what I want to do is seach for the file start with "hou",HOU,Hou" then moveon, so I can use like this



UpperCase>segment_1,segment_1
LowerCase>segment_1,segment_1

If>segment_1=HOU,moveon
...

right?

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Thu Jun 02, 2011 8:02 pm

Hi timle,

Here's what I would do...

Code: Select all

Let>segment_1=Hou

UpperCase>segment_1,segment_1

If>segment_1=HOU,moveon
//if>segment_1=Hou,moveon, 
//if>segment_1=HOU,moveon,  

MDL>No... the value of variable segment_1 does not was equal to HOU (case-insensive)... now what?
//insert additional code here...
Goto>End

Label>moveon
MDL>Yes... the value of variable segment_1 was equal to HOU (case-insensive) so we've "moved on"
//insert additional code here...

Label>End
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

Jerry Thomas
Macro Veteran
Posts: 267
Joined: Mon Sep 27, 2010 8:57 pm
Location: Seattle, WA

Post by Jerry Thomas » Thu Jun 02, 2011 8:31 pm

This will get the list of files names starting with "hou" and is not case sensitive

Code: Select all

GetFileList>%Desktop_Dir%\hou*.*,HOU_files,;
Separate>HOU_files,;,HOU_file_names
Then you can work with each one until the list is completed.
Thanks,
Jerry

[email protected]

timle
Pro Scripter
Posts: 96
Joined: Tue Apr 20, 2004 5:53 am

Post by timle » Thu Jun 02, 2011 8:49 pm

Thanks for all your input

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts