June 7, 200718 yr Newbies Hi, Is it possible to start FM without having the Open window ? I have a VBScript that I want to execute everyday using the Windows task manager. Here's the VBScript : Option Explicit Dim Oshell Dim strCmd Dim FMApp Dim FMDocs Dim myOpenFile Set OShell = CreateObject ("wscript.shell") strCmd = chr(34) & "C:Program FilesFileMakerFilemaker Pro 8.5 AdvancedFilemaker Pro Advanced.exe" OShell.Run strCmd, False 'wait 10 seconds for correct start wscript.sleep 10000 Set FMApp = CreateObject("FMPRO.Application") Set FMDocs = FMApp.Documents Set myOpenFile = FMDocs.Open("C:FileName","User","PassWord") myOpenFile.DoFMScript ("ScriptName") But on that line, strCmd = chr(34) & "C:Program FilesFileMakerFilemaker Pro 8.5 AdvancedFilemaker Pro Advanced.exe" I'm prompt with the Open window. After I click Cancel, everythings going well with the script. Thank you Probitai Edited June 7, 200718 yr by Guest
June 7, 200718 yr Hi Probitai and welcome to These forums :, I'm not sure that you actually need to specifically specify that FileMaker be run first.. i.e. you should be able to omit: Set OShell = CreateObject ("wscript.shell") strCmd = chr(34) & "C:Program FilesFileMakerFilemaker Pro 8.5 AdvancedFilemaker Pro Advanced.exe" OShell.Run strCmd, False
June 7, 200718 yr Oh right, but it will start hidden by default so just chuck in: FMApp.Visible = True after: Set FMApp = CreateObject("FMPRO.Application")
Create an account or sign in to comment