Hi Martin, just one more rephrasing:
you don't need to have it show up in the script manager for any particular reason. It only does if window eyes was the one who started the script. If you want window eyes to start it, then use the "add" feature to add it to the list of global scripts, or to an application's scripts, and windowEyes will start it, and it will appear in script manager. or put it into a .wepm file and add that. If you have a .vbs file, and you mean for it to be run by wscript, then you'll need to specify the full commandline including wscript, not just the .vbs file name; otherwise, windowEyes will host the vbs script itself as well. does that help make it any clearer? Chip ----- Original Message ----- From: martin webster To: aaron , [email protected], windowseyes surport team Sent: Mon, 22 Mar 2010 12:04:22 +0000 (UTC) Subject: making my unhosted VBScript known to the script manager? Hi all, How do I get my unhosted VBScript to show up in the script manager?. According to the docs I should use the ClientIdentify method of the Application Object inconjunction with ClientInformation but I don't seem to be getting it right. Below is Doug's example script he left us with on friday only I wrote a function using win32 process wish does give me the Script's PID but when I give this to the ClientIdentify method nothing shows up in the script manager still. I know that it is giving the correct information because if you remove the "'" from the three lines with in the function you get full path name of where the script was run from and Object name (the object process that started the script).. Please help. Begin VBScript Dim MyHotKey, keyFlag, PID keyFlag = False Set WE = CreateObject("WindowEyes.Application") WE.ClientIdentify(GetProcessId("wscript.exe")) PID = GetProcessId("wscript.exe") WE.Speech.Speak "this is the process ID" & " " & PID set MyHotKey = WE.Keyboard.RegisterHotkey("control-shift-c", GetRef("helloWorld")) While Not keyFlag wscript.Sleep 100 Wend WE.Speech.Speak "all done, thanks for playing" Sub helloWorld() WE.Speech.Speak "hello world" keyFlag = True End Sub Function GetProcessId(scriptObject) Set objSWbemServices = GetObject ("WinMgmts:Root\Cimv2") Set colProcess = objSWbemServices.ExecQuery _ ("Select * From Win32_Process") For Each objProcess In colProcess If InStr (objProcess.CommandLine, WScript.ScriptName) <> 0 And objProcess.Name = scriptObject Then GetProcessId = objProcess.ProcessId ' WScript.Echo "object name" & " " & objProcess.Name, _ ' "process Id" & " " & objProcess.ProcessId, _' ' "full path and file name" & " " & objProcess.CommandLine End If Next End Function
