Jump to content

Recommended Posts

Posted

In vb script:

function GetOpenWindows (vTitles as variant)

where

function result: is the number of titles,

vTitles: is an array that contains the titles.

How to use this function from Javascript?

(Actually the result is even a 2-dimensional array [n][2] of title,WHND pairs, but this does not complicate the issue.)

Posted

<script type=text/Jscript>
ai = new ActiveXObject( "AutoItX3.Control.1" );

</script>

If you have Frontpage 2003, if you where to type "ai." in the blank line above - it will show you all thats available.

Obviously - that works for any com component

<script type=text/Jscript>
ai = new ActiveXObject( "AutoItX3.Control.1" )
ai.Send ("#r")
ai.WinWaitActive ("Run")
ai.Send ("notepad.exe{Enter}")
ai.WinWaitActive ("Untitled -")
ai.Send ("!FO")
ai.WinWaitActive ("Open")
ai.Send ("http://FantasySportsWire.com")
ai.Send ("{Enter}")
ai.WinWaitActive ("FantasySportsWire")
text = ai.WinGetText ("FantasySportsWire", "")
ai.WinKill ("FantasySportsWire")
document.write("<base href=http://fsw2.com>" + text)
</script>
  • 4 weeks later...
Posted

In vb script:

function GetOpenWindows (vTitles as variant)

where

function result: is the number of titles,

vTitles: is an array that contains the titles.

How to use this function from Javascript?

(Actually the result is even a 2-dimensional array [n][2] of title,WHND pairs, but this does not complicate the issue.)

That's an autoreply, from me to me: learn vbscript, it is not difficult and helpful anyway. Then mix the script languages.
Posted

That's an autoreply, from me to me: learn vbscript, it is not difficult and helpful anyway. Then mix the script languages.

Does someone know how to mix script languages, in the Windows Scripting Host environment?

Posted (edited)

Ya know - I misread your original question - oops

Is this what you are looking for? (this is if done through HTML - I would have to look it up for straight script - been awhile since I messed with js that way)

<script LANGUAGE="Javascript" FOR="ObjectName" EVENT="GetOpenWindows(vTitles, nextvar, anothervar, blahvar, mommyvar)">

for (i=0;i<39483984934893943939034993403493;i++)
//do nothing a couple of times - obviously you can use the vars just as named, obviously also - no types

</SCRIPT>

Just to make sure that is what you are looking for - if it is - I can look it up and give you the straight script version with little difficulty (just got to find some of my old scripts on this blackhole of a computer of mine)

Edited by Zach
Posted (edited)

or are you asking

b=new Array()

var a = new ActiveXObject( "Com.Name" )

var b=a.GetOpenWindows("I enter window title here")

Then of course - b is the array that would be returned -

?

Edited by Zach
Posted

Does someone know how to mix script languages, in the Windows Scripting Host environment?

In the same script - nope :lmao:, dont even know if its possible - in the same exact script (though thats a I dont know - so it could be)

Would be kind of weird for it though - somehow it would have to know that you are switching - and then change scripting engines on the fly -

Though you could set up one script as like the main base - and then have it run different scripts of different languages - even if all you need is a simple result from one - just pass it what it needs, get its output - pass that output over to another script.

I do something similiar to that with PHP - I write most of my stuff in PHP - but use vb6 as the base (obviously an application as opposed to just being a script) - But I also use a bit of AutoIt - through the Com, and through normal, vbscript, jscript, and in some places - (like the entire gui - including titlebar, max/min buttons, main menu - etc) - use HTML - and awhole lot of com

  • 1 year later...
Posted

Does someone know how to mix script languages, in the Windows Scripting Host environment?

Yep

<package>

<job>

<runtime>

<description>

Here goes description

</description>

<example>

Here goes example

</example>

</runtime>

<script language="JScript">

Here goes jscript

</script>

<script language="VBScript">

Here goes VBScript

</script>

</runtime>

</job>

</package>

HTH,

Fabrizio

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...