Store table data in a tab separated file in oracle apex
How to store table data in a tab separated file in oracle apex ?
Suppose i have a table 'Table1' as shown below.
id name
1 x
2 y
I want to get the result 'select * from table1;' into a tab separated file in oracle apex.
For client you could
- invoke call to Oracle Reports, where an .rdf is ready to generate one for you
- utilise download as csv option in interactive reports
- call page that generates csv using htp package (CSV Download without Header, possible?
- modify an interactive report to do a similar thing (http://www.talkapex.com/2009/04/custom-download-for-apex-interactive.html)
Similar Messages
-
Problem in Uploading Data using a Tab Separated File?
Hi All,
I am trying to upload a file which tab separated containing customer and bank details and my file structure somewhat in the following manner.
10 21169 abcde xyz kdHDHLk gdh ghgah (Customer Details)
20 21169 DE 20050000 01122334 (bank details for customer 21169)
20 21169 DE 23022200 1122334455
(bank details for customer 21169)
20 21169 DE 23984899 223344556 (bank details).
But when I am trying to intial upload the details to an internal table using GUI_upload FM and display to check if it is loading correctly or not it is not giving me any o/p.
I am copying the code which I am trying to execute. Please tell me what way I need to modify the code so that it executes correctly.
parameters: p_file type rlgrap-filename.
data: begin of wa_file,
text(256) type c,
end of wa_file.
data: it_file like table of wa_file.
types: begin of ty_kna1,
kunnr type kunnr,
name1 type name1,
sortl type sortl,
stras type stras,
ort01 type ort01,
land1 type land1,
spras type spras,
end of ty_kna1.
data: it_kna1 type standard table of ty_kna1,
wa_kna1 type ty_kna1.
types: begin of ty_knbk,
kunnr type kunnr,
banks type knbk-banks,
bankl type knbk-bankl,
bankn type knbk-bankn,
end of ty_knbk.
data: it_knbk type standard table of ty_knbk,
wa_knbk type ty_knbk.
data: v_id(2).
At Selection-Screen on Value-Request for p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
* FIELD_NAME = ' '
IMPORTING
FILE_NAME = p_file
Start-of-Selection.
data: p_file1 type string.
p_file1 = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = p_file1
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
DATA_TAB = it_file
* EXCEPTIONS
* FILE_OPEN_ERROR = 1
* FILE_READ_ERROR = 2
* NO_BATCH = 3
* GUI_REFUSE_FILETRANSFER = 4
* INVALID_TYPE = 5
* NO_AUTHORITY = 6
* UNKNOWN_ERROR = 7
* BAD_DATA_FORMAT = 8
* HEADER_NOT_ALLOWED = 9
* SEPARATOR_NOT_ALLOWED = 10
* HEADER_TOO_LONG = 11
* UNKNOWN_DP_ERROR = 12
* ACCESS_DENIED = 13
* DP_OUT_OF_MEMORY = 14
* DISK_FULL = 15
* DP_TIMEOUT = 16
* OTHERS = 17
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
constants: c_tab type X value '09'.
loop at it_file into wa_file.
if wa_file+0(2) = '10'.
split wa_file at 'c_tab'
into v_id
wa_kna1-kunnr
wa_kna1-name1
wa_kna1-sortl
wa_kna1-stras
wa_kna1-ort01
wa_kna1-land1
wa_kna1-spras.
append wa_kna1 to it_kna1.
elseif wa_file+0(2) = '20'.
split wa_file at 'c_tab'
into v_id
wa_knbk-kunnr
wa_knbk-banks
wa_knbk-bankl
wa_knbk-bankn.
append wa_knbk to it_knbk.
endif.
endloop.
write:/ 'Customer Master General Data'.
uline.
loop at it_kna1 into wa_kna1.
write:/ wa_kna1-kunnr,
wa_kna1-name1,
wa_kna1-sortl,
wa_kna1-stras,
wa_kna1-ort01,
wa_kna1-land1,
wa_kna1-spras.
endloop.
clear wa_kna1.
skip 2.
write:/ 'Customer Master Bank Data'.
uline.
loop at it_knbk into wa_knbk.
write:/ wa_knbk-kunnr,
wa_knbk-banks,
wa_knbk-bankl,
wa_knbk-bankn.
endloop.
clear wa_knbk.
Regards,
MDDeclare Class cl_abap_char_utilities
Use File type as 'DBF'
Has_field_seperator = w_tab in FM GUI_UPLOAD
DATA: w_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = w_file
filetype = 'DBF'
append = ' '
write_field_separator = w_tab
TABLES
data_tab = it_extractchar
fieldnames = it_header
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
OTHERS = 22 -
Exporting table data to a Comma Separated file / .dat file?
Hi All,
I want to export the table data to a .CSV or .DAT file. This data is an input to other software to read and load like "Informatica".
I tried spooling the file by providing the extension as .CSV but that did'nt work!
Could you please let me know how can I get the data of a table into a .CSV or .DAT file?
I am trying to get it via SQL Prompt.
Thanks in advance.
HimanshuTake a look to the Laurent Schneider's solution.
Nicolas. -
Acquire data from a tab delimited file using a popup dialog object on a stamp
I am trying to import data from a tab delimited file using a popup dialog object on a stamp. I have purchased the book by Thom Parker--All About PDF Stamps in Acrobat and Paperless Workflows and have been working through the examples in the appendix.
My problem is understanding how to bring the data into the dialog object from the file.
I don't want to plagiarize his book--so am electing at this time not to show my code. The script is reading the file, just not bringing in the records from the file so that I can select which line to import into the stamp.
I have typed in the code exactly how the book describes, but when the popup dialog object is selected, there is nothing in the drop-down. When I click OK, the first record is put on the stamp--except for the fields that I am wanting to appear in the dialog object popup box.
I have searched the forums, and also the JavaScript reference. There are examples of the popup dialog object, but none of them show how to import the data from a file--just for the items to be typed in as the list.
Any help would be greatly appreciated! i have been trying to work on this for several months now.Karl
Thank you for getting back with me!
In answer to your questions:
1. Your trusted function is not a trusted function. Did you put this
function into a folder level script so that it will get executed at system
startup?--
yes--I saved the script as a .js file and put it in the following path (I have Acrobat XI Pro for Windows)
C:\Documents and Settings\tjohnson\Application Data\Adobe\Acrobat\Privileged\11.0\JavaScripts\GetTabData.js
2. The script cannot find your tab delimited data file, or it cannot
extract the data. Did you add the data file in the correct location? The
location from the script in the book would be c:\mydata\Contacts.txt
Yes--the file is in the same path as the book.
Below is my code that references the file.
var cPath = "/c/mydata/Contacts.txt";
the slashes in the book go in the direction of the text above--should they go in the direction that you have in your question?
Also, the name and email address need to be separated by one Tab character.
They are.
3. The fields need to be named the same way as the columns in the data file (the two names are in the first line of the file).
My headings are RevByFromTab and EmailFromTab--which match the names of the two fields on the stamp.
So, check that you are not getting any errors in the JavaScript console
(Ctrl-J or Cmd-J), and verify that the tab delimited file is in the correct
location
When I run in the java script console--and I just run the script on the stamp,
it says
TypeError: event.source is null
17:Console:Exec
undefined
When I place the stamp on the page, the popup box is working, but when you click on the down arrow, there is nothing listed. When I click OK, the RevByFromTab is populated by the first item in the file, but the EmailFromTab field says undefined.
Thank you
Message was edited by: tdjohnson7700 -
How to import data from excel or csv files to Oracle table
hello everybody,
I am new here and new in Oracle. I would like to know the steps how to import data from excel or csv files to Oracle table.
Let say I already have table inside the Oracle. Then my user give me the sets of data inside the Excel Worksheet.
So, how can I import the excel data into Oracle table.
Thank you in advance.
cheers,
shimaEven easier. Download JDeveloper 11G from this site.
Set up the database connection, right click on the table, select Import->Excel and specify your file to load it. On the import pop-up, you must view and update each tab indicating Columns, Data Types, and DML.
Columns -- move the selected columns that you want to load to the box on the right
Data Types -- select column name from second column to which the data for each column of the import file should load
DML -- click this tab to generate the INSERT SQL
Once done click 'Insert' -
Read values from Tab Separated File(tsv) or Comma Separtated File (csv)
Hi All,
Am creating a portal application to dynamically display data in a tree structure .
I'm having some data's stored in a tab separated file . I need to retrieve these data and display it in a jsp fie. Can any help me regarding this.?
Regards,
EbenHi,
see whether this code helps:
==========================================================
public class Read_TabFile {
/** Creates a new instance of Read_TabFile */
public Read_TabFile() {
private static int c;
public static void main(String aa[])//pass ur file name here
File readThis=new File(aa[0]);
int count=0;
try
FileReader input=new FileReader(readThis);
Reader reader=new BufferedReader(input);
while(c!=-1)
if(c!=9&&c!=0&&c!=10&& c!=13)// for line feed,null,tab and comma
System.out.println(c);//populate ur bean here 4m which u r //setting values 4 the tree
count++;
c=reader.read();
System.out.println("EOF"+count);
}catch(FileNotFoundException nof){System.out.println("FileNotFoundException");/do smthng/}
catch(IOException iox){System.out.println("IOException")/do smthng/;}
=========================================================
If this doesnot satisfy ur need then let me know xactly what u r lookin 4...........
Abhi -
Program to upload data from a tab-delimited file ...
I have to upload data from a tab-delimited file with following fields into database table(ZCBU) with same fields:
CBU (parent)
KUNNR (child)
ERDAT (effective from)
MANDT (client)
SFID (salesforce ID)
AEDAT (effective to)
AENAM (assigned by).
This file can be of type PC(txt) or UNIX.
plz tell me how to do this in both type of filesHi,
DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
DATA: xfile TYPE string.
DATA: BEGIN OF itab OCCURS 0,
empno TYPE zmemp-empno,
name TYPE zmemp-first_name,
last TYPE zmemp-last_name,
comp TYPE zmemp-comp,
place TYPE zmemp-place,
END OF itab.
PARAMETER : p_file TYPE rlgrap-filename OBLIGATORY.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Form to get the file path of legacy data stored on presentation server
PERFORM get_file_path.
START-OF-SELECTION.
MOVE p_file TO xfile.
to get the data from excel sheet data into an internal table
PERFORM get_data.
LOOP AT itab .
REFRESH bdcdata.
PERFORM bdc_dynpro USING 'ZM_EMPLOYEE' '9001'.
PERFORM bdc_field USING 'BDC_CURSOR'
'S9001_EMPNO'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=CREA'.
PERFORM bdc_field USING 'S9001_EMPNO'
itab-empno.
PERFORM bdc_dynpro USING 'ZM_EMPLOYEE' '9002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'S9002_PLACE'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SAVE'.
PERFORM bdc_field USING 'S9002_EMPNO'
itab-empno.
PERFORM bdc_field USING 'S9002_FIRST_NAME'
itab-name.
PERFORM bdc_field USING 'S9002_LAST_NAME'
itab-last.
PERFORM bdc_field USING 'S9002_COMP'
itab-comp.
PERFORM bdc_field USING 'S9002_PLACE'
itab-place.
PERFORM bdc_dynpro USING 'ZM_EMPLOYEE' '9001'.
PERFORM bdc_field USING 'BDC_CURSOR'
'S9001_EMPNO'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
CALL TRANSACTION 'ZMEMP'
USING bdcdata
UPDATE 'A'
MODE 'N'.
ENDLOOP.
Start new screen *
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM bdc_field USING fnam fval.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDFORM. "BDC_FIELD
*& Form get_file_path
FORM get_file_path .
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
CHANGING
file_name = p_file.
ENDFORM. " get_file_path
*& Form get_data
FORM get_data .
DATA : lines1 TYPE i.
MOVE p_file TO xfile.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = xfile
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = itab.
DESCRIBE TABLE itab LINES lines1.
WRITE : / lines1 , 'REcords uploaded' .
ENDFORM. " get_data
Regards,
Nihar Swain, -
Tab Separated file for Sales Order creation
Hi,
I am creating a Z Report which intern calls BAPI BAPI_SALESORDER_CREATEFROMDAT2 for creating Sales Orders.
Sales Order details I am giving through Tab Separated File which contains all details like
1) Header Details
2) Partner Details
3) Item Details.
Can any one tell what is the process to convert this file to into Internal Table.....This Example is only for three column. If there are more column you can check
"LOOP AT intern.
IF intern-col = *. " * is coulmn number
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = filename
i_begin_col = 1
i_begin_row = 1
i_end_col = 3
i_end_row = 65000
TABLES
intern = intern
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT intern.
IF intern-col = '1'.
l_length = strlen( intern-value ).
IF l_length > 10.
l_flag = 'E'.
wa_error-vbeln = intern-value.
wa_error-message = 'Invalid Sales Order'.
CONTINUE.
ELSE.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = intern-value
IMPORTING
output = wa_vbeln-vbeln.
CONTINUE.
ENDIF.
ELSEIF intern-col = '2'.
IF l_flag = 'E'.
wa_error-posnr = intern-value.
ELSE.
CLEAR : l_length.
l_length = strlen( intern-value ).
IF l_length > 6.
wa_error-vbeln = wa_vbeln-vbeln.
wa_error-posnr = intern-value.
wa_error-message = 'Invalid item Number'.
l_flag = 'E'.
ELSE.
wa_vbeln-posnr = intern-value.
APPEND wa_vbeln TO i_vbeln.
CLEAR : intern,wa_vbeln,l_flag,l_length.
ENDIF.
ENDIF.
ELSEIF intern-col = '3'.
CLEAR : wa_noti.
wa_noti-aufnr = intern-value.
APPEND wa_noti TO i_noti.
CLEAR : wa_noti.
ENDIF.
ENDLOOP. -
How to load date and time from text file to oracle table through sqlloader
hi friends
i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
this is my data in this path (c:\external\my_data.txt)
7369,SMITH,17-NOV-81,09:14:04,CLERK,20
7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
7566,JONES,02-APR-81,09:24:10,MANAGER,20
7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
create table emp2 (empno number,
ename varchar2(20),
hiredate date,
etime date,
ejob varchar2(20),
deptno number);the control file code in this path (c:\external\ctrl.ctl)
load data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime, ejob, deptno)this is the error :
C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 5
C:\>any help i greatly appreciated
thanks
Edited by: user10947262 on May 31, 2010 9:47 AMload data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime, ejob, deptno)Try
load data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
this is the error :
C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 5
C:\>
That's not an error, you can see errors within log and bad files. -
Can i import .sql file into oracle apex?
i'm new to oracle apex....
Can i import .sql file into oracle apex?
i've to import a table into apex...
what script i have to write into the .sql file....
pls help...
Edited by: 794244 on Jan 31, 2011 9:31 PMHi Mahesh
Navigate to the APEX documentation page - all the documents are listed there ;) (including direct links to the step-by-step "how-to's" - great stuff)
http://www.oracle.com/technetwork/developer-tools/apex/documentation/index.html
Enjoy the wonderful world of APEX!
Mike -
Import data from tsv (tab separated values) file
I have a large tab separated values file that I want to import into an oracle table so I can a) run queries on this data and b) split into smaller and more manageable files.
I'm very new to Oracle. I have installed 10g XE and sql_developer.
This tsv file has 3,684,011 rows. Maybe it could be imported into an Access DB then into Oracle, but that seems like extra work??I have a text.tsv file (Google calls it a csv, but
that's their error) which I feel I should be able to
just drop onto AW and have it open in a spreadsheet.
All I get is a couple of odd characters in the A1
cell.
Try dropping the file onto an open AppleWorks word processor document. If it is indeed a tab delimited text file, with no internal formatting information, you should then be able to copy it and paste into a spreadsheet.
Your comment regarding "a couple of odd characters in the A1 cell" indicates to me that there's more than simply text, tabs and returns in the file. If that's the case, you should be able to see the extra (often odd) characters in the WP document. If so, toggle 'Show invisibles' to on by pressing command-; (semi colon), then copy only the relevant text, tabs (will show as a right pointing arrow) and returns (will show as a reversed L haped arrow pointing left), and paste that block into your spreadsheet.
Regards,
Barry -
i am receiving the data through the rs232 in labview and i have to store the data in to the word or text file only if there is a change in the data. I have to scan the data continuasly. how can i do that. I was able to store the data into the text or word file but could not be able to do it. I am gettting the data from rs232 interms of 0 or 1. and i have to print it only if thereis a change in data from 0 to 1. if i use if-loop , each as much time there is 0 or 1 is there that much time the data gets printed. i dont know how to do this program please help me if anybody knows the answer
I have attatched the vi. Here in this it receives the data from rs232 as string and converted into binery. and indicated in led also normally if the data 1 comes then the led's will be off. suppose if 0 comes the corresponding data status is wrtten into the text file. But here the problem is the same data will be printed many number of times. so i have to make it like if there is a transition from 1 to o then only print it once. how to do it. I am doing this from few weeks please reply if you know the answer immediatly
thanking you
Attachments:
MOTORTESTJIG.vi 729 KB -
Edit tab-separated file in Numbers
I'm racking my brains, how in 21st century I can edit tsv file (stored as .txt) with such a powerful program suite as iWorks
I can open the file in Numbers, but I don't see the option to save it as text, which is very confusing...
Any suggestions?
Thanks!Don’t drown yourselves in a glass of water, use this script :
--{code}
--[SCRIPT numbers-table-to-text-file]
Select at least one cell in the table to export as text.
Run the script.
You will get the text file "was-in-numbers.txt" on the Desktop.
Yvan KOENIG (VALLAURIS, France)
2012-04-08
on run
local dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2
my activateGUIscripting()
set {dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
set selection range to range ("A1:" & name of last cell)
end tell
my safeCopy("Numbers")
the clipboard as text
my writeTo((path to desktop as text) & "was-in-numbers.txt", result, text, false)
end run
--=====
set { dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
on get_SelParams()
local d_Name, s_Name, t_Name, row_Num1, col_Num1, row_Num2, col_Num2
tell application "Numbers" to tell document 1
set d_Name to its name
set s_Name to ""
repeat with i from 1 to the count of sheets
tell sheet i to set maybe to the count of (tables whose selection range is not missing value)
if maybe is not 0 then
set s_Name to name of sheet i
exit repeat
end if -- maybe is not 0
end repeat
if s_Name is "" then
if my parleAnglais() then
error "No sheet has a selected table embedding at least one selected cell !"
else
error "Aucune feuille ne contient une table ayant au moins une cellule sélectionnée !"
end if
end if
tell sheet s_Name to tell (first table where selection range is not missing value)
tell selection range
set {top_left, bottom_right} to {name of first cell, name of last cell}
end tell
set t_Name to its name
tell cell top_left to set {row_Num1, col_Num1} to {address of its row, address of its column}
if top_left is bottom_right then
set {row_Num2, col_Num2} to {row_Num1, col_Num1}
else
tell cell bottom_right to set {row_Num2, col_Num2} to {address of its row, address of its column}
end if
end tell -- sheet…
return {d_Name, s_Name, t_Name, row_Num1, col_Num1, row_Num2, col_Num2}
end tell -- Numbers
end get_SelParams
--=====
on parleAnglais()
local z
try
tell application "Numbers" to set z to localized string "Cancel"
on error
set z to "Cancel"
end try
return (z is not "Annuler")
end parleAnglais
--=====
Handler borrowed to Regulus6633 - http://macscripter.net/viewtopic.php?id=36861
on writeTo(targetFile, theData, dataType, apendData)
-- targetFile is the path to the file you want to write
-- theData is the data you want in the file.
-- dataType is the data type of theData and it can be text, list, record etc.
-- apendData is true to append theData to the end of the current contents of the file or false to overwrite it
try
set targetFile to targetFile as text
set openFile to open for access file targetFile with write permission
if not apendData then set eof of openFile to 0
write theData to openFile starting at eof as dataType
close access openFile
return true
on error
try
close access file targetFile
end try
return false
end try
end writeTo
--=====
on activateGUIscripting()
(* to be sure than GUI scripting will be active *)
tell application "System Events"
if not (UI elements enabled) then set (UI elements enabled) to true
end tell
end activateGUIscripting
--=====
==== Uses GUIscripting ====
--=====
on safeCopy(theApp)
Fill the clipboard with a fake string *)
set the clipboard to "All The Things You Could Be By Now If Sigmund Freud’s Wife Was Your Mother, © Charles Mingus"
Copy the selected item *)
my raccourci(theApp, "c", "c")
Loop waiting the achievement of the Copy task. *)
repeat 10 times
try
if the clipboard as text is not tt then exit repeat
on error
delay 0.1
end try
end repeat
end safeCopy
--=====
This handler may be used to 'type' text, invisible characters if the third parameter is an empty string.
It may be used to 'type' keyboard raccourcis if the third parameter describe the required modifier keys.
I changed its name « shortcut » to « raccourci » to get rid of a name conflict in Smile.
on raccourci(a, t, d)
local k
activate application a
tell application "System Events" to tell application process a
set frontmost to true
try
t * 1
if d is "" then
key code t
else if d is "c" then
key code t using {command down}
else if d is "a" then
key code t using {option down}
else if d is "k" then
key code t using {control down}
else if d is "s" then
key code t using {shift down}
else if d is in {"ac", "ca"} then
key code t using {command down, option down}
else if d is in {"as", "sa"} then
key code t using {shift down, option down}
else if d is in {"sc", "cs"} then
key code t using {command down, shift down}
else if d is in {"kc", "ck"} then
key code t using {command down, control down}
else if d is in {"ks", "sk"} then
key code t using {shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "k" then
key code t using {command down, shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "a" then
key code t using {command down, shift down, option down}
end if
on error
repeat with k in t
if d is "" then
keystroke (k as text)
else if d is "c" then
keystroke (k as text) using {command down}
else if d is "a" then
keystroke k using {option down}
else if d is "k" then
keystroke (k as text) using {control down}
else if d is "s" then
keystroke k using {shift down}
else if d is in {"ac", "ca"} then
keystroke (k as text) using {command down, option down}
else if d is in {"as", "sa"} then
keystroke (k as text) using {shift down, option down}
else if d is in {"sc", "cs"} then
keystroke (k as text) using {command down, shift down}
else if d is in {"kc", "ck"} then
keystroke (k as text) using {command down, control down}
else if d is in {"ks", "sk"} then
keystroke (k as text) using {shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "k" then
keystroke (k as text) using {command down, shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "a" then
keystroke (k as text) using {command down, shift down, option down}
end if
end repeat
end try
end tell
end raccourci
--=====
--[/SCRIPT]
--{code}
Yvan KOENIG (VALLAURIS, France) dimanche 8 avril 2012
iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.3
My Box account is : http://www.box.com/s/00qnssoyeq2xvc22ra4k -
How to store the data coming from visa into file
Hi ,
I want to store the data into text file,which is coming from visa-read.
I tried visa read to file ,but it's not working.
Am new to labview plz help me out.
Thanks in advance.CSFGF wrote:
Hi ,
I want to store the data into text file,which is coming from visa-read.
I tried visa read to file ,but it's not working.
Am new to labview plz help me out.
Thanks in advance.
Share the code you have so far with us so that we can check what's going wrong. -
Issue with Date Conversion when loading XML File into Oracle 10g Database
Hello all,
I have the interface shown in the screenshot below. In it, amongst other actions, I'm mapping an XML file element representing a date to an Oracle table column defined as DATE. The source and target columns are highlighted in the screenshot.
!http://img223.imageshack.us/img223/1565/odiscr275.jpg!
When I execute the interface, I get the following error message:
java.lang.IllegalArgumentException at java.sql.Date.valueOf(Date.java:103)
I'm assuming this refers to the date conversion!
I've already tried replacing SRC_TRADES.DEAL_DATE with TO_DATE( SRC_TRADES.DEAL_DATE, 'DD/MM/YYYY' ) in the Implementation tab. This function was not recognised when I executed the interface, so it didn't work! The date value in the XML file is in DD/MM/YYYY format.
I'm guessing that Oracle SQL Date functions don't work in the Implementation tab. Please could somebody let me know:
1. Which Date Conversion function I could use instead?
2. Where I can find a reference for the methods/functions I can use in the Implementation tab (if such a reference exists)?
Cheers.
JamesHi.
Try to change the execution area to staging area. After You change it, write in the mapping box just SRC_TRADERS.DEAL_DATE. When You use TO_DATE, the source field typu should be varchar2, not date (as it is in your source datastore)
Maybe you are looking for
-
Possible to boot Win from an external drive?
I've recently replaced my original drive with both Mac OS X and a small partition for windows installed. My windows partition is now on an external drive: the only difference is, i'ts now connected via USB instead of the internal SATA connector. (I c
-
How do Import a csv file that contains strings
I have a file that contains numbers as US formmated $$$ such as $1,123,123,123 I have a perl script on one of our linux servers that creates the csv file as "Total Dollars","$1,123,123,123","some other string","etc" but when I import the file into
-
RSPAN does not put IPv6 multicast traffic into port
Hi. There is two switches in the equation: WS-C2960-24TT-L 12.2(55)SE5 C2960-LANBASEK9-M and stack of Switch Ports Model SW Version SW Image 1 12 WS-C3750G-12S 12.2(55)SE8 C3750-IPSERVICESK9
-
Here is the problem: Recently, I changed the iTunes Store Country in my iTunes (for fun.) My default store is the US store. When I changed the country, it gave this problem. I tried some solution available online, and rectified it. Now, I tried to ch
-
How to execute Sql command behind the submit button?
Hello Dear, i design a Visual JFS page with 1 text box, 1 dropdown list, 1 date picker and 1 submit button. i have a database connected to my project with hibernate framework. now i want that whatever i change to textbox, dropdown list & date picker,