Hello Guest it is May 23, 2019, 01:25:57 AM

Author Topic: why won't this macro work??  (Read 2596 times)

0 Members and 1 Guest are viewing this topic.

why won't this macro work??
« on: June 30, 2010, 11:23:59 AM »
Hello

Im getting a "compile error" message

If Not IsActive (input4) Then   <<< will work if i get rid of this line
Code "G1 X 0.020"
While ismoving
sleep (1000)
setDro (0,0)

any Ideas??

thanks
Josh

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: why won't this macro work??
« Reply #1 on: June 30, 2010, 11:26:42 AM »
you need an "end if" in there.

Ian
Re: why won't this macro work??
« Reply #2 on: June 30, 2010, 11:29:55 AM »
Yes Sir!! now it works thanks

If Not IsActive (input4) Then   
Code "G1 X 0.020"
While ismoving
sleep (1000)
setDro (0,0)
end if

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: why won't this macro work??
« Reply #3 on: June 30, 2010, 11:59:05 AM »
might want to stick a "wend" after your sleep too. When your input goes inactive you'll likely get a syntax error. Also stick a () on the end of your isMoving (it's a function) not a sub.

Ian
Re: why won't this macro work??
« Reply #4 on: June 30, 2010, 12:26:46 PM »
If Not IsActive (input4) Then   
Code "G1 X 0.020"
While ismoving ()
Wend
sleep (1000)
setDro (0,0)
end if

Hows this?

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: why won't this macro work??
« Reply #5 on: June 30, 2010, 02:21:12 PM »
well you could stick it before the sleep but after would be better  ;D