Hi Marten,

This is how I run my Trek game written in Python and compiled into an executable. I run it using shell and there are many window features to set and the command line option if needed...

       Bruce

Sub LaunchTrekGame( typeVoice)
Dim winType: wintype = 3 ' Activates the window and displays it as a maximized window.
Dim WshShell
Silence
Speak "Now playing the Star Trek Game! "
Sleep 1000
' Set WshShell = CreateObject("WScript.Shell")
Set WshShell = CreateObject("Shell.Application")
Dim ReturnCode
' WshShell.ShellExecute (clientPathToWav & "CuckooRecordAndPlayWav\RecordAndPlay.exe", theWavFile, scriptPathToWav, "open", winType) ', "runas" ReturnCode = WshShell.ShellExecute (clientPathToExe & "Trek2014.exe", typeVoice, "", "open", winType) '"runas", winType)
Set WshShell = Nothing
Set winType = Nothing
Set ReturnCode = Nothing
End Sub

Sub MoveFiles()
' Move all sound files into Trek folder.
Dim objFSO, objFile, FileName
Dim objFolder, currentFolder, newFolder
Set objFSO = CreateObject("Scripting.FileSystemObject")
' Create the folder.
If Not objFSO.FolderExists( myTrekData) Then newFolder = objFSO.CreateFolder( myTrekData)
' Folder of original files.
Set currentFolder = objFSO.GetFolder( myTrekData0)
For Each objFile In currentFolder.Files
if Left( CStr( objFile.Name), 8) = "TrekData" And Right( CStr( objFile.Path), 4) = ".ogg" Then
  FileName = Mid( objFile.Name, 9)
  If Not objFSO.FileExists( myTrekData & "\" & FileName) Then
   objFSO.MoveFile objFile.Path, myTrekData & "\" & FileName
  Else
   objFSO.DeleteFile( objFile)
  End If
 Else
if Left( CStr( objFile.Name), 8) = "TrekData" And Right( CStr( objFile.Path), 4) = ".exe" Then
   FileName = Mid( objFile.Name, 9)
If objFSO.FileExists( clientPathToExe & FileName) Then objFSO.DeleteFile( clientPathToExe & FileName)
    objFSO.MoveFile objFile.Path, clientPathToExe & FileName
  End If
 End If
Next
Set currentFolder = Nothing
Set objFSO = Nothing
End Sub

MoveFiles

Sent: Thursday, April 02, 2015 6:01 PM
Subject: start exe file from vbs


Hi,

When I start Becky mail, I want Window-eyes to start an autohotkey scriptfile. It is an exe file I have created. I can use WE to load the exe file, but It seems to give strange effects to Window-Eyes, so it is better to load it another way. I want WE to load a beckystart.vbs file and this vbs script will load the becky script exe file.

I have found the below script and this will work when starting the vbs file, but when loading it in Window-Eyes and starting it, It will not load. Window-Eyes will not execute this script because of the wscript object.
Does anybody know how I can start an exe file from a vbs file?

I have found the below script for visual basic:
Dim oShell
Set oShell = WScript.CreateObject ("WScript.Shell")
oShell.run "becky.exe"
Set oShell = Nothing

And yes: I can also make a autohotkey .exe file that will only load the becky.exe scriptfile, but I want it in a vbs if possible.

And I have created the autohotkey scriptfile for becky in autohotkey, so it can also be used when using jaws or nvda etc.

Regards, Marten

_______________________________________________
Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Ai Squared.

For membership options, visit http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/lab4me%40fltg.net. For subscription options, visit http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com List archives can be found at http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com

_______________________________________________
Any views or opinions presented in this email are solely those of the author 
and do not necessarily represent those of Ai Squared.

For membership options, visit 
http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/archive%40mail-archive.com.
For subscription options, visit 
http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com
List archives can be found at 
http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com

Reply via email to