Jump to content

if else issue


 Share

Recommended Posts

$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.

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...