You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old November 14th, 2017, 07:33 AM   #1
mjp123gp
Member
United States

mjp123gp is offline
 
Join Date: Mar 2012
Location: Savannah, GA
Posts: 38
iFix - Script to Close KeyBoard?

We use iFix 5.8 and we've been having issues with the pop-up keyboard application. When an operator presses the login button, we open the iFix login screen along with the MyTSoft popup keyboard. If they don't press the exit button on the keyboard after loggin in, the next time someone tries to login, it will open a new instance of the MyTSoft application and this continues until theres so many open that they can't login anymore. I am trying to add a script that will terminate the keyboard application but I'm not that good with VB. I've tried monitoring the login.exe process and do a shell taskkill to close it but I'm not having any luck.

Has anyone had similar issues? Any recommendations on how I can monitor a successful login to trigger the taskkill command? Or maybe there's an easier way to do this

Thanks
Mark
  Reply With Quote
Old November 14th, 2017, 03:03 PM   #2
TheWaterboy
Lifetime Supporting Member + Moderator
United States

TheWaterboy is offline
 
TheWaterboy's Avatar
 
Join Date: May 2006
Location: State of Denial
Posts: 688
That sounds odd, I thought the keyboard would slide out of the way when you are done with it. But here a potential solution.

Insert the following script in General Declarations section for the project:

Code:
Private Declare Function SendMessage& Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Any)

Private Declare Function FindWindow& Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String)
Insert a pushbutton object into the application from which to close My-T-Soft keypad. Note: Recommended that this be inserted on an overview screen or a picture that is opened and available to the operator.
Select the pushbutton object with the mouse then right click and select Edit Script.
Insert the following script between the CommandButton1_Click and End Sub:

Code:
Dim hw& Dim cnt&
hw& = FindWindow(vbNullString, "My-T-Soft")
cnt& = SendMessage(hw&, &H10, 0, 0&)
Save the edited picture.
Activate My-T-Soft touchscreen and then switch the above picture to run; click on the pushbutton object and the My-T-Soft touchscreen application will be closed
  Reply With Quote
Old November 15th, 2017, 10:21 AM   #3
mjp123gp
Member
United States

mjp123gp is offline
 
Join Date: Mar 2012
Location: Savannah, GA
Posts: 38
Thanks. The keyboard will slide out of the way and also close if the close button is pressed. The issue is they are not doing this. They just press login button again after they get logged out then a new keyboard process is started. I'm trying to automate the whole thing to make it as "idiot proof" as possible. The keyboard has an exit button, but it's just not being pressed by operators. That's why I was trying to automate the whole process.
  Reply With Quote
Old November 15th, 2017, 10:52 AM   #4
TheWaterboy
Lifetime Supporting Member + Moderator
United States

TheWaterboy is offline
 
TheWaterboy's Avatar
 
Join Date: May 2006
Location: State of Denial
Posts: 688
This sounds like a case for "percussive maintenance" on the operators

You could add an event when the keyboard is opened and a timer to run the code to close it.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Reading Event codes into Wonderware Ones_Zeros LIVE PLC Questions And Answers 12 October 12th, 2017 04:59 AM
Batch script executed from InTouch doesn't generate output gardarog LIVE PLC Questions And Answers 5 May 13th, 2017 06:09 AM
VB Script for iFIX Scada varunmahendran91 LIVE PLC Questions And Answers 5 December 10th, 2014 12:51 PM
Fix32 v6.1 -> iFIX v5.5 VBA Problem Scripts JElder LIVE PLC Questions And Answers 7 March 9th, 2012 08:31 AM
iFix can't see the alarm tags!!! johnlam LIVE PLC Questions And Answers 3 June 5th, 2007 11:46 PM


All times are GMT -5. The time now is 11:57 AM.


.