Hello Guest it is April 18, 2024, 02:55:39 PM

Author Topic: VB Help  (Read 2957 times)

0 Members and 1 Guest are viewing this topic.

VB Help
« on: January 17, 2012, 11:09:30 PM »
Hello All.  It's been many years since I played with basic and I'm doing pretty good on some complex macros however I have two items I need to ask about.

1)  It seems the only way I can get messages to post to the message line and the errorlog is to make sure there is Code "something" afterwards.

Message("Send Test 1")
Code "G4 P0.5"
While IsMoving(0
  Sleep(10)
Wend

Any code will work, it doesn't have to be dwell.  But If I do not put code in there but just a sleep(10) or the While IsMoving() I stand a 50/50 chance the message will post.



2) Compound Booleans Test

If (RED=1 AND BLUE=1) OR
   (RED = 0 And Green = 1) Then
      do something
End If


Can multiple Boolean Tests be performed like this without using a lot of If Then Else and duplicating code?

Richard







Re: VB Help
« Reply #1 on: January 18, 2012, 12:45:40 AM »
I solved item 2.  I'm just curious about Item 1, it just looks messy adding that after messages.

I guess normally I would not be posting very many messages to the log and message bar once I have everything the way I want it.  Right now it comes in handy testing macros and debugging.

Richard

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: VB Help
« Reply #2 on: January 18, 2012, 05:11:16 AM »
Hi Richard - I don't have that problem with the message call (R3.043.022). What's the context and your version?

Ian