View Full Version : Need help with File Open, Print
I'm redoing this post cause it was meant as a question, so i used the question icon...lol. Here it is again:
I need help with the proper command for "File open", i.e. to open .htm and .html files, and also the print command so that it will properly print a page viewed... I'm a newbie, so please help if u can. Thanx.
To open a htm file in the default browser use the file open action.
File.Execute ("%SrcDir%\Test.htm", "", Continue)
I'm not sure you can ge thhe default browser to print from AMS.
=================
To open a HTM file in the web object:
WebBrowserObject[WebBrowser1].NavigateTo ("http://www.indigorose.com")
To Print:
WebBrowserObject[WebBrowser1].Print
Just remembered a post a while back from Lorne. If the HTM file is local and it is open in an external browser you may be able to do a File.Open with a print verb to get it to print.
It will be local .htm files i will want to open from a browser i made with ams... ex. i will want to open folder c:\my documents\my htm files\*.htm... could u please give me the proper command lango... ? Appreciate it much ;-).
Drop a Browser object on a page, the put this action in a click event.
WebBrowserObject[WebBrowser1].NavigateTo ("file://C:/your/path/here/your.htm")
Please don't laugh... I have created a little document browser, and set it to open a local web page at startup that i have on my hard drive... but i then created a text object that says "File"... what i want is, when File text object is click, the directory i specify will open, from where i can choose a page, and it will then display that page... directory will be c:\My Documents\My HTM Files\*.htm ... can u help? lol
Here is a sample. (http://www.warmuskerken.com/ams/nim.zip)
It will open the files ok, but before it opens the folder, it returns this error: "Could not Load Dll" and lists the path. Is this merely because I must have exact path of files location entered? Darn us newbies got so much to learn...lol
Check your distribution folder and make sure there is a file there named GetFolders.dll
If it is there and you are still getting the error, modify the click event to be this
%FullPath% = Dialog.FileBrowse (Open, "File Open", "%Desktop%", "HTML (*.htm, *.html)|*.htm|*.html")
WebBrowserObject[WebBrowser1].NavigateTo ("%FullPath%")
Sorry to make this such a long drawn out thing, there is no GetFolders.dll under distribution, where do i get such a file?
Got the GetFolders.dll afterall, but i'm still getting the "Could not load dll" error before it will permit me to open an .htm page...
What OS are you running? What version of IE?
The DLL is one that I wrote to get the My Documents directoy. If putting in the static address path works, do that.
Worm: a funny thing happend, i figured how to file open without using the dll, however it worked fine in win xp and cause error in win98... so i went back to figuring out how to use the GetFolders.dll that you sent me. I think I got it working now... just had to move GetFolders.dll into distribution folder for whatever cause.
exactly! I must have missed that when I zipped it up.
Have Fun!
The reason for the DLL is that the My Documents folder may not be where you expect it to be. Using the DLL, you'll be able to define where the user has their My Documents folder.
Probably not too many people would change the location. At my place of employment, it is the company standard to change it to a location on the servers so that a users documents are backed-up.
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.