Hello Guest it is March 29, 2024, 02:16:20 AM

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 - stirling

1181
VB and the development of wizards / Re: SendKeys ???
« on: September 05, 2011, 03:38:06 AM »
Do you get your "hardware" working ok??? ANy plans for a serial interface??
Yes thanks - works a treat - modbus setup/monitor interface at the moment, looking at direct serial as well.

Ian a question,  Is it possible to pass a variable from the M1s script to the VBS script.
Yes - the simplest way is probably un-named args. Just push command line arguments separated by spaces and pop them with the arguments method.

Code: [Select]
'**M1S Script
Set oShell=CreateObject ("WScript.Shell")
'any preamble code here

oShell.run "C:\TP.vbs " & GetOemdro(123) 'push the value of DRO

NotifyPlugins(12345)         ' Open Plugin window

Set oShell = Nothing


Code: [Select]
'**VBS Script
set oShell = WScript.CreateObject("WScript.Shell")
Set args = WScript.Arguments

WScript.Sleep 5000 'wait 5 secs then do the sendkeys
oShell.sendkeys args.Item(0) 'Send command line args(0) value

WScript.Sleep 1000
oShell.sendkeys "{ENTER}"

Cheers

Ian

1182
VB and the development of wizards / Re: SendKeys ???
« on: September 04, 2011, 10:07:57 AM »
just tried it on a copy of vista (raided the skip - any amount in there!) and it worked fine here. Try the attached .vbs. No Mach involved. Just copy it to your desktop and double click it and wait a few secs - sorry - you knew that  ;D

Ian

1183
VB and the development of wizards / Re: SendKeys ???
« on: September 04, 2011, 04:15:22 AM »
Hi Terry

As no one else has come up with anything, I have something but she isn't the prettiest gal in town - but then neither is sendkeys.

It looks like the plugin is blocking - which may be for good reason - who knows? Anyway, the idea is to spawn a thread outside Mach and execute sendkeys from that. In the .m1s fire the .vbs and THEN fire up your plugin - as written, 5 secs later sendkeys will fire. Season to taste.

You'll see the .m1s is coded to call the .vbs in c:\ - you'll probably want to change this to somewehere under c:\Mach3 or whatever.

Assumptions:
You have the windoze scripting host present and enabled.
The plugin dialog sets focus properly and has a tab set (if it's needed).

I thought twice about posting this cos you could do some truly nasty things with it if you feel like being creative - but as ever - if it breaks your PC, your machine or your heart you get to keep the pieces. ;D

Cheers

Ian

1184
General Mach Discussion / Re: Problem with motor tuning
« on: August 31, 2011, 05:06:37 AM »
Has been suggested on the mechmate forum( Thats what i am building ) , that the motor tuning dialog uses different software to run than the rest of the program. That would explain the difference, but not sure if that is true or not.
Not so much different software but I think the screen is not updated whilst in tuning. This thread seems similar if it's any help http://www.machsupport.com/forum/index.php/topic,18398.0.html

Ian

1185
General Mach Discussion / Re: Queue not refilling... why?
« on: August 30, 2011, 06:01:25 AM »
Yes - I wondered if the macropump idea was to turn it off "immediately" if someone knew how to turn it back on via CB. I dismissed that as a "good" idea as I reckon that anyone who knew how to turn the menu on via CB would presumably know how to edit the macropump as well. Anyway that's all academic - as has been said - it's really not a good idea to hose Mach with a constant assault from the macropump.

Ian

1186
General Mach Discussion / Re: Queue not refilling... why?
« on: August 30, 2011, 05:29:15 AM »
A good point well made  :P

Ian

1187
General Mach Discussion / Re: Queue not refilling... why?
« on: August 30, 2011, 05:06:23 AM »
Not sure I can see the point of putting this in the init string either. When you turn off the menu it's state is stored in the xml anyway. Once it's off - it's off accross all future sessions - until you turn it back on again.

Ian

1188
VB and the development of wizards / Re: Button with two functions
« on: August 27, 2011, 09:05:13 AM »
Peter - yes - I mislaid an "end if" but you found it - fingers not keeping up with head again.

The problem you're encountering is ONE reason why I said earlier that this is not the best way to do it. The macropump is running at 10Hz so it's not unreasonable that when you press the button the macropump reads it several times - what you end up with is a rather nice game of roulette. The macropump POLLS the state of the input. A TRIGGER acts like an interrupt and executes it's macro on the active state change of the input. This does away with this problem.

see http://www.machsupport.com/forum/index.php/topic,15120.msg101160.html#msg101160

Ian

1189
VB and the development of wizards / Re: Button with two functions
« on: August 27, 2011, 04:27:21 AM »
Or...

Code: [Select]
If isActive(OEMTRIG5) then
  if isOutputActive(OUTPUT5) then
     deActivateSignal(OUTPUT5)
  else
     ActivateSignal(OUTPUT5)                   '
end if

however, using the macropump to respond to triggers is kinda missing the point of triggers...  ;)

Ian

1190
Third party software and hardware support forums. / Re: USB TO PARALLEL
« on: August 26, 2011, 12:56:34 PM »
Guys - I think what this is about is on the downloads/plugins page towards the bottom "PLCM Series Devices" PureLogic.

COASTEL - I think maybe you're not aware that the folks here on the forum are NOT Artsoft employees. If you're getting no reply from a THIRD PARTY company I'm not sure we can help you.