iFix - Script to Close KeyBoard?

mjp123gp

Member
Join Date
Mar 2012
Location
Savannah, GA
Posts
94
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
 
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
 
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.
 
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.
 

Similar Topics

Private Sub DataLink70_Click() 'The Comments below have been added automatically. 'Any changes could cause adverse effects to the...
Replies
2
Views
1,766
hi, Can anyone please help me to learn how to use VB scripting in iFIX scada. i know how to create a basic visual basic coding.. but dont know...
Replies
5
Views
3,685
Dear all, I am beginer in ifix hmi programming. I have 2 ifix 6.0 pc with license FiX and client.. Can some one tell me how to configure sample...
Replies
0
Views
113
Hello, I have to deal with iFix again and am looking at the most efficient way to create alarms to display in iFix, i.e. not creating an...
Replies
0
Views
138
Hi everyone. I'm beginner with Ifix. I'm appreciate if you share me some document to understand how to play with Ifix 6.0. By the way, I have some...
Replies
11
Views
627
Back
Top Bottom