Sign in to follow this  
Followers 0
t0ddie

if else issue

3 posts in this topic

$bak = ClipGet()

if $bak > "" then MsgBox(4096, "Test", "there is text in the clipboard", 10)

else sleep(10000)

endif

this is supposed to check if there is text in the clipboard, and if not.. sleep

i get an error saying else statement with no matching if statement.. yet i see the if statement right there.

how would i adjust this code.. so that it actually WORKS

thanks alot!

~Todd


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

If you are going to use the else on a seperate line it has to be formatted:

$bak = ClipGet()
if $bak > "" then
   MsgBox(4096, "Test", "there is text in the clipboard", 10)
else
   sleep(10000)
endif

Or you can do it all on one line:

$bak = ClipGet()
if $bak > "" then MsgBox(4096, "Test", "there is text in the clipboard", 10) else sleep(10000)

This is all covered in the help file.

*** Matt @ MPCS

Edited by Matt @ MPCS

Share this post


Link to post
Share on other sites

ty


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0