Page 1 of 3

VBScript to JScript need help

Posted: Thu Mar 03, 2011 4:51 am
by index_999
dear friends.help me please to translate this code VBScript to JScriptDim Syste,Form,Button Set System = CreateObject( "Kixtart.System" ) Set Form= System.FormSet Button = Form.Button Button.Center Button.Text = "Click Me" Button.OnClick = "Button_Click" Form.Center Form.Show While Form.Visible Execute Form.DoEvents WEnd Function Button_Click MsgBox "Hi hows it going?" End Function


index_9992011-03-03 11:54:38

VBScript to JScript need help

Posted: Thu Mar 03, 2011 6:16 am
by jvierra
This is NOT vbscript. It is VB.NET Forms scripting. It cannot be converted into jscript.


VBScript to JScript need help

Posted: Thu Mar 03, 2011 7:11 am
by index_999
thanks for answer, but i dont't think so. You can try it on your computer with kixforms.dllnow i have some JScode code too, but it's not work true://-------------------------------------------var system = new ActiveXObject("Kixtart.System");form = system.Form();form.Text = "Test Events";form.Width = 400;form.Height = 300;var button1 = form.Controls.Add("Button");button1.Text = "button1";button1.Top=100;button1.Left=100;button1.OnClick =button_Click1;var button2 = form.Controls.Add("Button");button2.Text = "button2";button2.Top=100;button2.Left=200;button2.OnClick =button_Click2;function button_Click1(){WScript.Echo("Button1 Click Event"); };function button_Click2(){WScript.Echo("Button2 Click Event"); };form.Center();form.Show();while (form.Visible){button_Click1.call(form.DoEvents()); }

VBScript to JScript need help

Posted: Thu Mar 03, 2011 8:25 am
by jvierra
You are talking abpouot KixStart. I would try posting in a KixStart forum.

You can manually convert the VBS to JS wqhich is not hard but the KixStart stuff is custom to that vendor.

VBScript to JScript need help

Posted: Thu Mar 03, 2011 8:58 am
by jvierra
I don't understand.

You say it doesn't work BUT it works for button_Click1. What is it that doesn't work?

Execute is a Kisxstart method. I would assume:form.DoEvents(); would be the correct syntax however DoEvents is a VB primitive. Does KixStart use different modules for VBS and JS?



VBScript to JScript need help

Posted: Thu Mar 03, 2011 9:35 am
by jvierra
#1. I do't think you understand forms or programming forms.
#2. YOu would get better and more to teh point help on KixStart forum as none of this has anything to so with JScript of VBScript.

Execute is VBS syntax that executes a block of code. The coed I posted is similar for JScript. If it soesn't work then it is likely a KixStart issue.

VBScript to JScript need help

Posted: Thu Mar 03, 2011 10:19 am
by jvierra
It has nothing to do with ECMA. ECMA is a web standard and not an admin scripting stndard. ECMA also has nothing to do with KixStart. KixStart is a vendor proprietary product.

Yuo really need to go to a KixStart forum. In many years we have never had a KixStart issue here. KicStart is seldom used in Admin scripting.

Maybe, if you are lucky, someone who uses KixStart might be watching this forum.

You really need to understand that DoEvents is a VB function/method. It has little to do with JScript.

Neither VBScript not JScript have an ability to manage events except with certain COM classes that follow a very specific protocol. People who use KixStart regularly would have a better sense of how to over come this issue.

My suspicion is that yo are mixing many differnt bits you have copied off of the Internet without much understaanding of any of them. THis will make it much harder for you to understand where to get an answer or what exact question to ask.

Start with a KixStart foum. I believe that it wil lget you closer to an answer much faster.


VBScript to JScript need help

Posted: Thu Mar 03, 2011 10:39 am
by jvierra
ECMA is a standard that is based on both VBScript and JScript. It is a subsret although almost complete. ActiveX is not part of ECMA. AtiveX is a Microsoft technology based on COM. MS is phasing out ActiveX and COM.

VBScript to JScript need help

Posted: Thu Mar 03, 2011 10:54 am
by index_999
do you know about Microsoft's plans to phasing out ActiveX technology? ;) it's great. and what will be with OCX and DLL?from 5, 10, 15 years or tomorrow?


VBScript to JScript need help

Posted: Thu Mar 03, 2011 10:58 am
by index_999