Newbies probitai Posted June 7, 2007 Newbies Posted June 7, 2007 (edited) 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, 2007 by Guest
Genx Posted June 7, 2007 Posted June 7, 2007 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
Genx Posted June 7, 2007 Posted June 7, 2007 Oh right, but it will start hidden by default so just chuck in: FMApp.Visible = True after: Set FMApp = CreateObject("FMPRO.Application")
Recommended Posts
This topic is 6380 days old. Please don't post here. Open a new topic instead.
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 accountSign in
Already have an account? Sign in here.
Sign In Now