command line paramenter

J

jg

hope this is the right NG.

trying make it easy for users, I would like my bat file to bring up front
page with two documents. So far I can make it to open only one document (
pathspec\something.shmtil) but can't find the way to specify more than one

Actually, I would love to script the second document
FrontPage will open the html,
locate the single java applet
grab the entire applet code section <applet.... to </applet> into
clipboard
open an hta and paste into an input area


So far I have not found the way. I am still too much of beginner and not
much budget, so I just have to be contend with opening the second document
for now
 
S

Steve Easton

You're going to need a bit more than what's available from a .bat ( command
line ) file.

You're going to need at least a vb script ( vbs ) file that can create a
file system object.
Then use the file system object to open document one, parse the file and
copy the parameter info into a variable.
Then create a second file system object to create the .hta file and write
the data from the variable to the .hta.

You might try the news group: microsoft.public.scripting.vbscript


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
S

Steve Easton

TBMK, not without opening a second instance of FrontPage.

What are you trying to "make easy for users" that they can't do by opening FrontPage and the
two files??


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
M

MD Websunlimited

Hi jg,

To accomplish you'll need to use an auto run macro, not intrinsic, in FP itself. The auto run script could look for a command line
parameter then open the two files associated with it. After opening you could then walk the HTML using the document object of FP to
find the applet and insert it into the .hta file.

The auto run is implemented in a FP COM Add-in using the OnConnection event handler with code similar to the following:

On Error GoTo ERR_BAD_KEY
'Get the key state of the left and right shift keys
iShift = GetKeyState(VK_SHIFT)
On Error Resume Next

'If shift is not pressed, run the Auto_Start routine in the FP Web.
If (GetSetting("FPX", "Options", "RunMacro", "1") = "1") Then
sMacro = GetSetting("FPX", "Options", "RunMacroName", "Auto_Run")
If (iShift And 128) <> 128 Then Application.Run sMacro
End If

In this case the auto_run macro is not ran if the shift key is held down when FP is started.

HTH,
 
J

jg

Thanks/

Unfortunately there are casual non IT users in a fast paced office who get
asked to make some minor change on those two files. These people may not
have the clue nor the time to find where those files are.

In FP2003, I do notice, I can have more than one file open manually inside
the FP. it is rather unfortunate that I can't make it open more than one
file from command line
 
J

jg

Excellent, thank you very much
This is something I can work on

Now I only have to deal with the issue of locating the macro in trusted
common location in the domain.

In this w2k3 domain, they don not want to put up their own certificate
authority now, not want to get external certificate.

By default auto macro and scripts are to be located inside the appropriate
office startup folders, otherwise unsigned scripts a and macros are treated
not trusted.
 
S

Stefan B Rusynko

FP VBA (macros) are only supported in the current user profile in Microsoft FrontPage.fpm at
%AppData%\Microsoft\FrontPage\Macros

If you are looking to make it global you would need to make it a com addin
See
http://msdn.microsoft.com/library/d...3_ta/html/odc_fpautomatingrepetitivetasks.asp

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Excellent, thank you very much
| This is something I can work on
|
| Now I only have to deal with the issue of locating the macro in trusted
| common location in the domain.
|
| In this w2k3 domain, they don not want to put up their own certificate
| authority now, not want to get external certificate.
|
| By default auto macro and scripts are to be located inside the appropriate
| office startup folders, otherwise unsigned scripts a and macros are treated
| not trusted.
|
| | > Hi jg,
| >
| > To accomplish you'll need to use an auto run macro, not intrinsic, in FP
| > itself. The auto run script could look for a command line parameter then
| > open the two files associated with it. After opening you could then walk
| > the HTML using the document object of FP to find the applet and insert it
| > into the .hta file.
| >
| > The auto run is implemented in a FP COM Add-in using the OnConnection
| > event handler with code similar to the following:
| >
| > On Error GoTo ERR_BAD_KEY
| > 'Get the key state of the left and right shift keys
| > iShift = GetKeyState(VK_SHIFT)
| > On Error Resume Next
| >
| > 'If shift is not pressed, run the Auto_Start routine in the FP Web.
| > If (GetSetting("FPX", "Options", "RunMacro", "1") = "1") Then
| > sMacro = GetSetting("FPX", "Options", "RunMacroName", "Auto_Run")
| > If (iShift And 128) <> 128 Then Application.Run sMacro
| > End If
| >
| > In this case the auto_run macro is not ran if the shift key is held down
| > when FP is started.
| >
| > HTH,
| >
| >
| > --
| > Mike -- FrontPage MVP '97 - '02
| > http://www.websunlimited.com
| > FrontPage Add-in
| >
| >
| >
| > | >> hope this is the right NG.
| >>
| >> trying make it easy for users, I would like my bat file to bring up
| >> front page with two documents. So far I can make it to open only one
| >> document ( pathspec\something.shmtil) but can't find the way to specify
| >> more than one
| >>
| >> Actually, I would love to script the second document
| >> FrontPage will open the html,
| >> locate the single java applet
| >> grab the entire applet code section <applet.... to </applet> into
| >> clipboard
| >> open an hta and paste into an input area
| >>
| >>
| >> So far I have not found the way. I am still too much of beginner and not
| >> much budget, so I just have to be contend with opening the second
| >> document for now
| >>
| >>
| >
| >
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top