Hello Guest it is May 11, 2024, 09:16:05 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Cbyrdtopper

631
Peter, thosj's post answered this question.
Bryanna posted this on the linked thread. 
https://www.machsupport.com/forum/index.php/topic,36545.msg250346.html#msg250346

632
Mach4 General Discussion / Re: Message Box with Cancel?
« on: February 10, 2018, 05:10:27 PM »
Daz,
Thanks for the video.   I had that error pop up yesterday, didn't know what it was.   I'm guessing once you close it out the first time, you're good to go until Mach gets shutdown and turned back on again?

633
Mach4 General Discussion / Re: Message Box with Cancel?
« on: February 10, 2018, 02:33:07 PM »
 This was allowing me to get text and numbers and use them.   Just not inside the repeat command.

 

634
Mach4 General Discussion / Re: Message Box with Cancel?
« on: February 10, 2018, 01:40:07 PM »
Daz,
Here is my entire macro.  The repeat command works, to test this I kept hitting cancel and it pops back up as expected. 

However, when I input a number, it acknowledges that number until it reads the "until" line, then the variable "ActualTool1" returns an ERROR instead of #.

--What is the actual tool?
function m110()
local inst = mc.mcGetInstance()

repeat
     local ActualTool1 = wx.wxGetNumberFromUser("What tool is in the turret?", "Tool # ","Current Tool", 1, 1, 6) -- Default, Min, Max.
until (ActualTool1 ~= -1)

mc.mcToolSetCurrent(inst, ActualTool1)

end --m110

if (mc.mcInEditor() == 1) then
 m110()
end

635
Mach4 General Discussion / Re: Message Box with Cancel?
« on: February 10, 2018, 12:33:55 PM »
After testing the "Repeat" Command.  It isn't working as expected.  When I run through the code, it returns an ERROR when it reads "while actualtool ~=1"  After I input a number in the box, it reads that number just fine.  But as soon as the debugger gets on the "While" line, it returns an ERROR in the ActualTool Variable.

636
Mach4 General Discussion / Re: Message Box with Cancel?
« on: February 10, 2018, 10:34:09 AM »
Thanks for the info, Brett and Craig.
I've looked through that manual before.  I don't know why I didn't think to look for a "Repeat" command.  Couldn't see the forest for the trees I guess.
Craig,
I'm guessing Mach uses the 5.2 stuff then?

637
Mach4 General Discussion / Re: Message Box with Cancel?
« on: February 09, 2018, 04:26:02 PM »
Thanks Daz.  That's exactly what I was looking for.  I had no idea that command even existed!! :)

638
Mach4 General Discussion / Re: Message Box with Cancel?
« on: February 09, 2018, 10:00:56 AM »
So,
to make this loop, I was going to do something like this:

while rc == -1 do
local ActualTool = wx.wxGetNumberFromUser()
local rc = ActualTool
end

but it won't change the rc inside the loop.  I changed the variable name to Test and it returned an ERROR.   Why is that?

While writing this reply, I was testing the loop again.  It isn't even changing my variable ActualTool from the GetNumberFromUser. 

639
Mach4 General Discussion / Re: Message Box with Cancel?
« on: February 08, 2018, 04:45:34 PM »
This is working great!
I went ahead and made it a function in the screen load script; just to tidy things up.  

I also put it on the 25th scan.  

if testcount == 25 then
SetActualTool()
end

It was popping up right as Mach4 was initializing, and it was hiding it behind Mach.  So, moved it to 25 and it pops up on the screen just fine, in about 1.5 seconds. 

640
Mach4 General Discussion / Re: Message Box with Cancel?
« on: February 08, 2018, 03:34:25 PM »
Quote
I put this in the "First Run PLC Script."  It didn't crash and as far as I can tell it didn't alter anything else.  Is that okay?  Or is there a better way to make something run only on startup?   Open to any and all suggestions. 

I like calling them regionally global.  ;D

Brett, I like it! lol :)
I thought about making a function.  It would make it a little cleaner.  I'll give that a try next.