Calling a file
hi eveyone
to call an image we write READ_IMAGE_FILE
to call a sound file we write READ_SOUND_FILE
i need to call a movie file ouside the database when pressing a button
my filename is ('c:\film.avi')
what is the command line that achive this result
1. Add the Windows Media Player ActiveX control to the block of your form
2. Import its interface. (Program -> Import OLE Library Interfaces)
OLE Classes: MediaPlayer.MediaPlayer.1
3. The following packages must appear in your Form:
MediaPlayer_IMediaPlayer
MediaPlayer_CONSTANTS
4. Add the following code to play a file
DECLARE
handle ole2.obj_type;
BEGIN
handle := forms_ole.get_interface_pointer('OLE1');
MediaPlayer_IMediaPlayer.ole_Open( handle, 'c:\1.avi' );
END;
Also you can use Host build-in.
DECLARE
cmd varchar2(1000);
BEGIN
TOOL_ENV.GETVAR( 'COMSPEC', cmd );
cmd := cmd || ' /c start ' || 'c:\1.avi';
Host( cmd );
END;
Similar Messages
-
Hi ,
Is it possible to call .htm files saved on disk - let's say c:\my_htmFiles on AppServer/DevSuiteServer using the web.show_document form's built-in...????
I have tried the following:
web.show_document('c:\my_htmfiles\first.htm','_blank') and
web.show_document('file://c:\my_htmfiles\first.htm','_blank')
but whereas in the web browser's file->open both of them work.... in web.show_document do not....
Is it possible to do it....?????
Note: I use Dev10g
Thanks....
SimI 'll try it of course.... but is it possible to define multiple directories down this virtual directory.....????
Assuming that there is the following dir structure:
C:\dev10gr2/tools/web/html
|
|--------------------------------------------/app1
|---------------/subdir1
|---------------/subdir2
|--------------------------------------------/app2
|--------------------------------------------/app3Is it possible to define multiple dirs ....????
Is there any doc which describes it with examples.....?????
Thanks.......
Sim -
How to call PDF file in Web Dynpro Appl?
How to call PDF file in Web Dynpro Appl?
Hi Gobinath,
1. Create a value attribute of type byte called pdfSource.
2. Insert an UI element called Interactive Form in your layout
3. Set the source property of this Interactive From UI element to the context pdfSource.
4. Insert a button which would open your pdf file.
public void onActionsubmit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionsubmit(ServerEvent)
IPrivate<viewname>.IContextElement contextElement = wdContext.currentContextElement();
byte[] bytes = contextElement.getPdfSource();
try
File file = new File("C:
temp
example.pdf");
FileOutputStream os = new FileOutputStream(file);
os.write(bytes);
os.close();
catch (IOException e)
// do something
e.printStackTrace();
//@@end
Warm Regards,
Murtuza -
Hi All,
I have created .chm file. Now I want to open specific htm file on press of F1 on the form. How do I give the path ? I am using following code to call chm file:
If pVal.MenuUID = "275" And pVal.BeforeAction = True Then
If SBO_Application.Forms.ActiveForm.TypeEx = "ChkRdo" Then
Dim psi As New ProcessStartInfo()
psi.UseShellExecute = True
psi.FileName = "C:\Documents and Settings\Harish Patil\Desktop\Checkbox and Option button\ChkOpt\ChkOpt\New_HTML_Help.chm"
Process.Start(psi)
BubbleEvent = False
End If
End If
This works fine but call the main chm file. How do I call specific file?
Thanks & RegardsHi Sheetal,
If u want to open a different file depending on the Form Type and if u dont have many different form types the i guess u can use the following code snippet.
If pVal.MenuUID = "275" And pVal.BeforeAction = True Then
If SBO_Application.Forms.ActiveForm.TypeEx = "ChkRdo" Then
Dim psi As New ProcessStartInfo()
psi.UseShellExecute = True
psi.FileName = "C:\Documents and Settings\Harish Patil\Desktop\Checkbox and Option button\ChkOpt\ChkOpt\New_HTML_Help.chm"
Process.Start(psi)
BubbleEvent = False
ElseIf SBO_Application.Forms.ActiveForm.TypeEx = "ChkRdo" Then
'Past the above same code with a different file name
End If
End If
like that u can open different files, or if u have name different files and forms.. then its better to use the Case statement instead of the If clause.
Hope it helps.
Regards,
Vasu Natari. -
Error no. 4 in SAPGUI during graphic call or file transfer.
Hi,
In the landscape there are still 46b sap version, i have some functional queries that when i executes go to the sap graphic screen and it throws with no output. I understand that that it works in ECC version but not for 46b.
This issue is related to SAPGUI, as i have the latest sapgui installed 710 that works well for ECC.
But if i input the parameter in sap 46b system , and execute to get the graphic chart i get this:
The Generation of Graphs for Stock Movements in the MC49 Transaction.
When you call a hierarchy graphic, the following error messages are displayed
1. 'Too much data in a table or too many tables defined
2. E4: error writing to XC pipe: child #1 ( id: STAT ); reclen12
3. Error no. 4 in SAPGUI during graphic call or file transfer.
I have also look in to note 316232, 361222, 96885. for this but this says to upgrade the sapgui,which is already in.
What is the solution for this.
Regards,
Chetan.Take a look at this thread. This may provide you some guidance as it appears that Error has been encountered before.
[Link Here|Error no. 4 in SAPGUI with Graphics call or file transfer;
Regards,
Zecher -
Call .bat file from java code
I need to call an application that uses a .bat file to execute from a java program. Is that possible?
This is the .bat file:
importcli.exe ciaf2735 C:\Importcli\files\SAI2735*.txt
importcli.exe ciaf2735 C:\Importcli\files\CI2735*.txt
importcli.exe ciaf2735 C:\Importcli\files\SC2735*.txt
importcli.exe db1800 C:\Importcli\files\*.mdbmagaupe wrote:
I need to call an application that uses a .bat file to execute from a java program. Is that possible?
This is the .bat file:
importcli.exe ciaf2735 C:\Importcli\files\SAI2735*.txt
importcli.exe ciaf2735 C:\Importcli\files\CI2735*.txt
importcli.exe ciaf2735 C:\Importcli\files\SC2735*.txt
importcli.exe db1800 C:\Importcli\files\*.mdb
Hmmm, I wonder what would happen if there were a web search engine and you could research like this:
[http://www.google.com/search?hl=en&q=call+.bat+file+from+java] -
How to call external files from java?
How to call external files in java. For example how to call a *.pdf file to open in its default editor(say Acrobat), or a *.html file to open in the default browser or a *.txt file in a notepad etc..,
In my program i have *.chm (Compiled Windows HTML Help) help file. how to open it in its default editor it?Jayarathina_Madharasan wrote:
no one answered my questionHi what wrong did i do...basically insulted all the volunteers here who took the time to consider your question and try to offer you help. Other than that, you did nothing wrong.
From JavaRanch :
And even if an answer doesn't solve your problem, even if it should totally miss the point - the best thing to do to motivate others to continue trying to help you is showing respect and gratitude for the investment of time that was put into dealing with your issue.
Edited by: Encephalopathic on Apr 14, 2008 10:01 AM -
When importing a flash animation into captivate flash will not call external files
Is there a way to import flash into captivate and it still be able to call external files (ie. sound, video xml)? When I import flash into captivate it will not call any external file.
Hi all
Wow, I was so hoping fellow Adobe Community Expert Paul Dewhurst would pop in on this thread.
Why? Well, Paul sent me a way cool gizmo a while back that hacked the Info button. It used an external file for some of the information! So somehow Paul managed to sort what it took to insert a Flash object into Captivate and have that object extract data from an externally located file.
Cheers... Rick
Helpful and Handy Links
Captivate Wish Form/Bug Reporting Form
Adobe Certified Captivate Training
SorcerStone Blog
Captivate eBooks -
Question about calling batch file by using the System Exec+.vi?
Hi
I have a problem about calling batch file. I know that the system exec is equivalent to "run" in Windows. I called the batch file c:\rtxdos\bs\ch0.bat successfully in the "run" but it didn't work in the LabVIEW program. The dos prompt had an error message "Bad command or file name" and it just happen when I call this batch file in LabVIEW. Why?
Bill.Hi,
Try to set the "working directory" parameter of System exec.vi to the directory where the batch file is located. It may help.
Good luck.
Oleg Chutko. -
How to call java files from different directories
hi, how do i call java files from a different directory??
let say i got partA.java, and i need to include functions from partB.java which is in a different folder. how can i do that?Chicon wrote:
Hi nuttynibbles,
Before the class declaration in partA.java, you must have an import statement like :
import someDirectory.partB;
public class partA {
... and before you ask... you'll probably want to read through this http://java.sun.com/docs/books/tutorial/java/package/index.html -
Hi all,
I can call html or jsp file from jsp file, but how can I call text file in jsp, I put my text file same lever asmy jsp file it don't work!
where I should put the text file??
thank youmary,
since you knew the file name ,when clicked in name send to server,read the file and write to servlet outputstream.
I think this would help you.
If anything wrong in mycode ..forums will help you further
BufferedInputStream bis=null;
BufferedOutputStream bos=null;
int bytesRead=0;
byte buff[]=new byte[1024];
File f=new File(test.txt);
try{
bis= new BufferedInputStream(new FileInputStream(f));
bytesRead=bis.read(buff,0,buff.length);
if(bytesRead!=-1){
// create a BufferedOutputStream from ServletOutputStream
bos=new BufferedInputStream(response.getOutputStream());
do{
bos.write(buff,0,bytesRead);
}while((bytesRead=bis.read(buff,0,buff.length))!=-1)
}catch(Exception e){
////error handling
} -
Call .jrxml file from jsp
hi experts,
i created the jasper report file, and i want to call this file through the jsp.
plz help m.
i written the following code but it gives the error:
==code==
<%@ page import="java.sql.*" %>
<%@ page import="java.lang.*" %>
<%@ page import="java.lang.Object" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>
<%@ page import="net.sf.jasperreport.engine.*" %>
<%@ page import="net.sf.jasperreport.engine.util.*" %>
<%@ page import="net.sf.jasperreport.engine.export.*" %>
<%@ page import="net.sf.jasperreports.engine.JasperCompileManager" %>
<%@ page import="net.sf.jasperreports.engine.design.JRMultiClassCompiler" %>
<%@ page import="net.sf.jasperreports.engine.JasperManager" %>
<%@ page import="net.sf.jasperreports.engine.xml.JRXmlLoader" %>
<%@ page import="net.sf.jasperreports.engine.JasperPrint" %>
<%@ page import="net.sf.jasperreports.engine.JasperFillManager" %>
<%@ page import="net.sf.jasperreports.engine.JasperExportManager" %>
<%@ page import="net.sf.jasperreport.engine.JREmptyDataSource" %>
<%@ page import="net.sf.jasperreports.engine.JasperReport" %>
<%@ page import="net.sf.jasperreports.engine.design.*" %>
<%@ page import="net.sf.jasperreports.view.JasperViewer" %>
<%@ page import="net.sf.jasperreports.engine.JRException" %>
<%
String reportSource ="C:/apache-tomcat-6.0.16/webapps/ROOT/Emp/report/sample.jrxml";
String reportDest = "C:/apache-tomcat-6.0.16/webapps/ROOT/Emp/report/sample.html";
Map params = new HashMap();
try
JasperDesign jasperDesign=JRXmlLoader.load(reportSource);
JasperManager.loadXmlDesign("sample.jrxml");
JasperReport jasperReport =JasperCompileManager.compileReport(jasperDesign);
JasperPrint jasperPrint =JasperFillManager.fillReport(jasperReport, params, new JREmptyDataSource());
JasperExportManager.exportReportToHtmlFile(jasperPrint, reportDest);
JasperViewer.viewReport(jasperPrint);
catch (JRException ex)
ex.printStackTrace();
%>
==error==
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 31 in the jsp file: /Emp/report/rept.jsp
JREmptyDataSource cannot be resolved to a type
28: JasperDesign jasperDesign=JRXmlLoader.load(reportSource);
29: JasperManager.loadXmlDesign("sample.jrxml");
30: JasperReport jasperReport =JasperCompileManager.compileReport(jasperDesign);
31: JasperPrint jasperPrint =JasperFillManager.fillReport(jasperReport, params, new JREmptyDataSource());
32: JasperExportManager.exportReportToHtmlFile(jasperPrint, reportDest);
33: JasperViewer.viewReport(jasperPrint);
34: }
plz help m.Error log tells:
JREmptyDataSource cannot be resolved to a typeYou have missed "s" in package name. Instead of:
<%@ page import="net.sf.jasperreport.engine.JREmptyDataSource" %>do:
<%@ page import="net.sf.jasperreports.engine.JREmptyDataSource" %>Thanks,
Mrityunjoy -
Can i call a file which is not bundled with war file
i am dynamically creating a file which i want to call in another jsp but it is giving error file missing. i am working on sun app. server all the jsps servlet,beans are bundled with war file. can i call a file in some jsp which is not bundled with war. i am also setting path of server to that folder.but its not working. how can i do it.
Do you have a small code sequence that you can share with us?
-
How to call *.C file in LV
Hi frenz,
i have created .C file for addtion of two numbers. Now i need to call that file from LabVIEW. How is it possible?.
Thanks in Advanceragupathi wrote:
Hi frenz,
i have created .C file for addtion of two numbers. Now i need to call that file from LabVIEW. How is it possible?.
Thanks in Advance
Well, considering the functionality you implement it would be about 1000% easier to implement that directly in LabVIEW. This is in fact a statement that is true for many programming problems although the amount of advantage you get will vary a bit.
If you insist on using your C file approach you will have to find a C compiler that can create a DLL from that C file. This will likely require you to study a bit about DLLs and how to create them in your C compiler. And then some more studies about how to call a DLL from LabVIEW using the Call Library Node.
But implementation of C code to be used in LabVIEW has only two really good reasons.
1) If you already have the entire C code available and want to reuse it as library in LabVIEW. Rewriting everything in LabVIEW is in that case often not a feasable option.
2) If you need to do low level stuff like calling into system APIs, calling device drivers, or doing general low level stuff that requires a lot of bit shuffling such as compression/decompression or encryption/decryption algorithmes.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
How can I call .exe file in java
Hello,
I want to call excutable files(.exe) in my java source code. How can I use the excutable files in java code.
Thanks.
RobinSee java.lang.Runtime.exec()
-
How to call HTML file from forms 6i
Please can any one told me how i can call HTML file placed in my computer in specific path from forms 6i
i tried web.show_Document('file path','_blank');
but it doesn't work with me i don't know why and it doesn't give me any error
thanksthanks you for your reply
but it still not working with me
i tried this
host('iexplore C:\PPF\UserManual\index.htm');
is it true, any advice
Maybe you are looking for
-
Is there any way to use bluetooth and force audio out at the same time?
I have an older treadmill that uses IFit which means a program on my phone controls my treadmill via an aux audio cable. I like using BT headphones so I don't have cords hanging. So...I'm trying to figure some way to either a) have iphone connected p
-
Hi ,I have just bought an unlocked iphone 4S in NewYork and I will take it to my country(Turkey).I have a question about activation , I have a Turkish simcard here , Does it matter if I activate it in USA or Turkey ? I mean If I activate it in USA ,w
-
I Bought "Aperture 2" and "Aperture 3" in BOX in the past...and now?
In the past I bought "Aperture 2" and subsequently "Aperture 3" in DVD in an Apple Store. I recently Bought a MacBook Pro Retina. To install Aperture I had to create a dmg from DVD and install it because in my Mac profile in AppStore it results that
-
[SOLVED] Completly format a second HDD, and mark bad sectors.
Hi, all! I couldn't see a more appropriate place to post this, as it didn't seem right to put it in 'Kernel/ Hardware'. My apologies if it is in the wrong place. I have a second hard disk drive in my PC and when I use it, it occasionally gives 'bad s
-
Hello all!! I've tried to install Sun Workshop 5 in a Solaris 6. I've followed the steps in the manual but when I do step number 6 (start workshop install), I type the command and the next error is displayed: "DISPLAY ERROR: Could not open an X Windo