Help me with StringReplace - SOLVED!

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Help me with StringReplace - SOLVED!

Post by mightycpa » Fri Oct 31, 2014 8:46 pm

I can be dumb as a post sometimes... the answer to the problem below is

change this:

StringReplace>cleanFret,' ','-',FingerPos

to this:

StringReplace>cleanFret, ,-,FingerPos

The quotes are for other languages... not MacroScheduler!

******************************************************************************************************************
Boy, the things I have problems with.... anyway:

I have this string that I get from the clipboard:

" x 3 2 0 1 0"

I trim it, then I do a StringReplace. I'm trying to turn it into:

"x-3-2-0-1-0". It doesn't work.

Code: Select all

       Label>GetFingerPosition
        Remark>//fingerpos
        MouseMove>x_impossiblevar,y_impossiblevar
        LClick>
        Wait>0.1
        Press Ctrl
        Send>a
        //Release Ctrl
        //Press Ctrl
        Send>c
        Release Ctrl
        Wait>1
        GetClipBoard>fretText
        Trim>fretText,cleanFret
        StringReplace>cleanFret,' ','-',FingerPos
        MessageModal>%cleanFret% is now %FingerPos%
The MessageModal shows me that cleanFret and FingerPos are the same value after the string replace.

Here's that: Image

url: http://www.anony.ws/image/DcMV

I put the string into excel, parsed it into characters, then found the ascii code for each character. Those blank spots are char 32.

Why doesn't this work?
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Help me with StringReplace - SOLVED!

Post by Marcus Tettmar » Mon Nov 03, 2014 4:02 pm

Glad you solved it.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

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