Source language: Translate to:

Finding [#13][#10]

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Finding [#13][#10]

Postby dpayer » Tue Apr 28, 2015 1:17 pm

Why doesn't this code work to find the location of a carriage return/line feed?

Code: Select all
SetVar "[mystring]" "xxxyyyzzz[#13][#10]test"
SearchStr "[mystring]" "[#13][#10]" "[found1310]" ""
alertbox "test" "found 1310 at position [found1310]"


This will always indicate zero in the popup, meaning it doesn't find [#13][#10'] (CRLF) in the string.

David P.
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1384
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Finding [#13][#10]

Postby HPW » Tue Apr 28, 2015 2:44 pm

Hello,

Seems you did not use the wizard:

Code: Select all
SetVar "[mystring]" "xxxyyyzzz[#13][#10]test"
SearchStr "[#13][#10]" "[mystring]" "[found1310]" ""
alertbox "test" "found 1310 at position [found1310]"

;-)

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2521
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Finding [#13][#10]

Postby Gaev » Tue Apr 28, 2015 2:49 pm

David P:

Try ...
Code: Select all
SearchStr "[#13][#10]" "[mystring]" "[found1310]" ""
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Finding [#13][#10]

Postby dpayer » Wed Apr 29, 2015 6:29 am

Hahahahahaha.

You are both right. Just when you think you know your syntax and don't need the wizards, you are made humble by the most simple thing.

Thank you.
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1384
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Finding [#13][#10]

Postby Wrangler » Wed Apr 29, 2015 8:03 am

Actually, searchstr input is backward as compared to other wizards. I've made this mistake myself several times, forgetting about that. It's Dave, testing us to see if we're on the ball. :)
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Re: Finding [#13][#10]

Postby Odd » Thu Apr 30, 2015 5:44 am

8)
User avatar
Odd
 
Posts: 81
Joined: Sat Apr 02, 2005 3:34 am
Location: Norway


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 0 guests