Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6380 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted (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 by Guest
Posted

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

Posted

Oh right, but it will start hidden by default so just chuck in:

FMApp.Visible = True

after:

Set FMApp = CreateObject("FMPRO.Application")

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.