if message is "XYZ" then do next step (not working)?

Shani shani.runrev at gmail.com
Tue May 4 03:22:09 EDT 2010


HI, 
Thanks
I have check with if pResult is "XYZ reached at goal" then
And if pResult is " XYZ reached at goal " then
But both is not working 
Wheras when I receive blank 
if pResult is empty then
this command work. 


-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Kay C Lan
Sent: Tuesday, May 04, 2010 7:23 AM
To: How to use Revolution
Subject: Re: if message is "XYZ" then do next step (not working)?

Hi Shani,

as Craig predicted, it's a typo. Your script says:

if pResult is "XYZ reached at goal" then
>

and you say pResult =:

" XYZ reached at goal "
>

notice there is a space both at the beginning and end of the actual result,
but not so in the if test, i.e.

"XYZ reached at goal" = " XYZ reached at goal "

is false.

HTH

On Tue, May 4, 2010 at 2:46 AM, Shani <shani.runrev at gmail.com> wrote:

> HI, thanks for your reply,
>
> I have tested
> But this work .                                                if pResult
> is
> empty then
>                                                          click at the loc
> of btn "StartGame"
>                                                          end if
> where as this not work, I don't know why
> its command proper write error
>
>                                          if pResult is "XYZ reached at
> goal" then
>                                              click at the loc of btn
> "StartGoal"
>                                               end if
>
> when I display the pResult
> answer pResult
> it display
> " XYZ reached at goal "
>
> Regards,
> SHani
> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of
> DunbarX at aol.com
> Sent: Monday, May 03, 2010 7:27 PM
> To: use-revolution at lists.runrev.com
> Subject: Re: if message is "XYZ" then do next step (not working)?
>
> Your handler works for me.
>
> If you step through the script, where does it not go wrong? Sometimes in
> debugging I will rewrite even simple "if/then" statements in their
expanded
> form:
>
> if this then
>   dotThat
> end if
>
> Instead of: if this then doThat.
>
> Because you can place a breakpoint at the "doThat" line to see if the
> condition is being tested correctly. If you never reach that line, you can
> find
> the problem more quickly.
>
> I think it is something simple, like a typo.
>
> Craig Newman
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list