Hello Guest it is October 15, 2019, 08:07:17 AM

Author Topic: CB wildcard for strings in mach macros?  (Read 428 times)

0 Members and 1 Guest are viewing this topic.

CB wildcard for strings in mach macros?
« on: August 10, 2017, 06:40:20 AM »
I have a macro which reads the last 2 chars of the FileName of the file currently running, increments that number by 1, seaches for a file with that number as its name, and loads/runs it if found. If not found , it increments by 1 again.
I now want to change the file naming convention from, say, '21.nc' to '21 34.nc', where the number 21 refers to a position on a toolrack, as before. The other number (34) is not needed by Mach, only by the user.

To search for the next file I originally used
If Dir ("C:\Documents and Settings\User\Desktop\Gcode\" & (RackNum + 1) & ".nc") <> "" Then
etc

It would be really useful if I could have something like

If Dir ("C:\Documents and Settings\User\Desktop\Gcode\" & (RackNum + 1) & " " & ** & ".nc") <> "" Then
etc

where * would a 'wildcard' standing in for any single char. (A wilcard representing any number of chars would be equally useful here, I think)

Does Mach's version of CB have such a wildcard character? The CB 'EndUser' pdf doesn't mention wildcards (ctrlF), and neither did the macro programmers reference, but a quick google search turns up * as the correct character to use, but not in relation to Mach 3.



« Last Edit: August 10, 2017, 06:42:17 AM by moorea21 »