Std barcode reader - keyboardevent for stream of chars - help :(
Hi all,
It's the very first time for me in adobe forum so.. hi everyone
I've got a question related to my air application. This application has many controls like textinput button etc. etc.
I would like to catch a barcode (a very fast keyboard stream of chars) in the main application (this isn't a problem I already can do this) and, if it is a barcode then i would like to stop the propagation of the chars otherwise the propagation of the chars continue as usual
In order to catch the stream of chars I've used a timer, restarted every time i retrieve a character, if this timer expire and I have collect more the 5 chars I suppose the chars collected could be a barcode otherwise the chars (if they are less than 5) should be normal character from the user that use a keyboard
the effect is:
first case:
a fast keyboard chars coming (a.. ok this is a barcode)
stops the writing for example in the related textinput that has focus
elaborate the barcode
second case:
a character or two is arrived from the keyboard (ok this isn't a barcode)
continue with propagation and the related textinput show the character
is this possible?
I've tryed it.. but I can't find the solution, could anyone help me?
thank you
edit: if it isn't clear, please let me know, I can try to explain the problem in a better way
I tried to made some other test.
first test -------------
here I tried to record all the 3 events (i report only the script part)
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
import spark.components.Application;
var eventArray:Array = new Array()
var t:Timer = new Timer(5000)
private function init():void
NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, appKeyDown, true);
NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_UP, appKeyUp, true);
NativeApplication.nativeApplication.addEventListener(TextEvent.TEXT_INPUT, textinput, true);
private function appKeyUp(e:KeyboardEvent):void
trace("appKeyUp")
var evttmp:KeyboardEvent = new KeyboardEvent(KeyboardEvent.KEY_UP)
evttmp = e.clone() as KeyboardEvent
eventArray.push(evttmp);
e.stopPropagation()
e.preventDefault()
private function textinput(e:TextEvent):void
trace("textinput")
var evttmp:TextEvent = new TextEvent(TextEvent.TEXT_INPUT)
evttmp = e.clone() as TextEvent
eventArray.push(evttmp);
e.stopPropagation()
e.preventDefault()
private function appKeyDown(e:KeyboardEvent):void
trace("appKeyDown")
var evttmp:KeyboardEvent = new KeyboardEvent(KeyboardEvent.KEY_DOWN)
evttmp = e.clone() as KeyboardEvent
eventArray.push(evttmp);
t.addEventListener(TimerEvent.TIMER, timerout)
t.start()
e.stopPropagation()
e.preventDefault()
private function timerout(e:TimerEvent):void
trace("timerout")
t.stop()
NativeApplication.nativeApplication.removeEventListener(KeyboardEvent.KEY_DOWN, appKeyDown, true);
NativeApplication.nativeApplication.removeEventListener(KeyboardEvent.KEY_UP, appKeyUp, true);
NativeApplication.nativeApplication.removeEventListener(TextEvent.TEXT_INPUT, textinput, true);
for(var i:int=0; i<eventArray.length; i++)
barcodeField.dispatchEvent(eventArray[i])
NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, appKeyDown, true);
NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_UP, appKeyUp, true);
NativeApplication.nativeApplication.addEventListener(TextEvent.TEXT_INPUT, textinput, true);
]]>
</fx:Script>
the textinput event is never catch.
then I tried writing textinput event myself (in order to try if something appens) but I wasn't lucky
second test ---------
private function timerout(e:TimerEvent):void
trace("timerout")
t.stop()
NativeApplication.nativeApplication.removeEventListener(KeyboardEvent.KEY_DOWN, appKeyDown, true);
NativeApplication.nativeApplication.removeEventListener(KeyboardEvent.KEY_UP, appKeyUp, true);
barcodeField.dispatchEvent(eventArray[0])
var text:TextEvent = new TextEvent(TextEvent.TEXT_INPUT, true, false, bcd);
barcodeField.dispatchEvent(text);
barcodeField.dispatchEvent(eventArray[1])
Similar Messages
-
Are there any Barcode Reader apps for the Palm Pre? Thanks!
None yet, because Palm hasn't released support for the camera in the software development kit (SDK). This support (along with support for the microphone and a number of other important capabilities) will be provided in a major update to be released by/in the fall.
-
I cannot get my screen reader to read my PDF format at all. I am using Window-Eyes 9.0 Screen Reading Program for the blind.
HELP!!!For information regarding Accessibility, see here:
http://www.oracle.com/us/corporate/accessibility/products/index.html
You can also find additional configuration in the older Forms documentation, however most will still apply in newer versions although file version references and file locations may differer.
http://docs.oracle.com/html/B10668_05/chap_forms.htm#g1095470 -
I have attached a USB barcode reader which essentially emulates a USB
keyboard. Having looked through the VC++ V5.0 documentation and some SDK
documents that I have, I could not find a library function that identifies
what device sourced the keyboad event.
Does know if this is possible ? Anyone have any ideas ?
Thanks.If you over ride the "CWnd:reTranslateMessage" function you'll be able to trap keyboard messages.
ex:
BOOL CTestexecDlg:reTranslateMessage(MSG* pMsg)
if (pMsg->message == WM_KEYDOWN && (pMsg->wParam == 13 || pMsg->wParam == VK_ESCAPE))
// Enter or escape key was pressed; return TRUE to stop default handling
return TRUE;
if (pMsg->message == WM_KEYDOWN && pMsg->wParam == 0x30)
BringWindowToTop( );
return TRUE;
if (pMsg->message == WM_KEYDOWN && pMsg->wParam == 0x31 && m_DisplayObject1 != NULL)
// Enter or escape key was pressed; return TRUE to stop default handling
m_DisplayObject1->SetWindowToTop( );
return TRUE;
if (pMsg->message == WM_KEYDOWN && pMsg->wPa
ram == 0x32 && m_DisplayObject2 != NULL)
// Enter or escape key was pressed; return TRUE to stop default handling
m_DisplayObject2->SetWindowToTop( );
return TRUE;
if (pMsg->message == WM_KEYDOWN && pMsg->wParam == 0x33 && m_DisplayObject2 != NULL)
// Enter or escape key was pressed; return TRUE to stop default handling
m_DisplayObject3->SetWindowToTop( );
return TRUE;
return CDialog:reTranslateMessage(pMsg);
Steve -
Problem while reading clob with Stream
Hi
I'm trying to read some clob data from database using Streams.
Here is the simple code of what I'm trying to do
Environment *env = Environment::createEnvironment("JA16SJIS", "OCCIUTF16", Environment::THREADED_MUTEXED);
Connection *conn = env->createConnection("user", "pass", "database");
Statement stmt = conn->createStatement("SELECT FROM TABLE");
ResultSet *rs = stmt->executeQuery();
char buffer[65536];
rs->setCharacterStreamMode(3, 65536);
while (rs->next ())
Stream* stream = rs->getStream (3);
int r = stream->readBuffer(buffer, 65536);
rs->closeStream(stream);
..I call setCharacterStreamMode method for the right column and than iterate through recordset. But if i just iterate through the recordset without reading stream data, the second call of rs->next() crash the program.
Any idea what this could be, and why the application crash if I don't read the entire stream? Is there some catch with Streams?Thx, I just thought that there is some other way to avoid the whole stream reading.
Thx anyway -
How to use multiple hierarchies for a single char in single query
Hi,
Is there any way that we can use multiple hierarchies for a single char in single query. I tried and it just allows me to select one hierarchy even if I use hierarchy variable.
I have a requirement where user wants to see information related to a cost center with different cost center groups in different hierarchies (every year has different cost center group hierarchies).
Suppose I want to see information related to a cost center from year 2001-2004.in these four year cost center may have been associated to different groups depending upon that year hierarchy. How can I do that?
Thanks
JonaNope. Now way to do this.
There is always just one hierarchy assigned to a characteristic. And even if the hierarchy was time dependent, it only reads it for one key date and not according to transaction data.
Regards,
Beat -
Hi,
We are getting the following error when running our SSIS packages on Microsoft SQL Server 2012 R2 on Windows Server 2008 R2 SP1:
Error: 4014, Severity:20, State: 11. A fatal error occurred while reading the input stream from the network. The session will be terminated (input error: 109, output error: 0)
SQL Server Data Tools and SQL Server Database Engine reside on the same server.
We tried the following:
Disabling TCP Chimney Offload
Installed Windows Server 2008 SP1
Splitting our SSIS code into multiple steps so it is not all one large continuous operation
The error occurs during a BulkDataLoad task.
Other options we are investigating with the engineering team (out-sourced, so delayed responses):
Firewall configurations (everything is local, so this should not make a difference)
Disabling the anti-virus scanner
Are there other things we can try?
Any insight is greatly appreciated.
Thanks!Hi HenryKwan,
Based on the current information, the issue can be caused by many reasons. Please refer to the following tips:
Install the latest hotfix based on your SQL Server version. Ps: there is no SQL Server 2012 R2 version.
Change the MaxConcurrentExecutables property from -1 to another one based on the MAXDOP. For example, 8.
Set "RetainSameConnection" Property to FALSE on the all the connection managers.
Reference:
https://connect.microsoft.com/SQLServer/feedback/details/774370/ssis-packages-abort-with-unexpected-termination-message
If the issue is still existed, as Jakub suggested, please provide us more information about this issue.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
I can no longer edit information for streaming files in Get Info.
I can no longer edit information for streaming files in Get Info.
Similar problem here. My Ical refuses to edit or delete events. Viewing is possible, though sometimes the whole screen turns grey. Adding new events from mail is still possible. The task-pane completely disappeared. My local apple technic-centre messed about with disk utility for a bit and than told me to reinstall leopard. I could of course do that, but it seems to me that reinstalling Leopard just to fix iCal events is a bit invasive.
I tried also tried removing everything, installing a new copy of iCal from the leopard-cd, software updates, all to no avail.
At the moment I'm open to all suggestions that do not include a complete leopard reinstall. -
How can I get data from barcode reader to forms
Hi Experts,
Forms 6i
I would like to gather data from barcode reader.
Any idea if you got please share.
Thanks in advance.Hi,
I think its working same like keyboard. Either you type the code manually or you can read it from scanner. With the help of keyboard you can able to type anything on the cursor position, on the same way the barcode-scanner is also working. Just like a copy and paste the scanner copies the data from physical device and paste it into your corrent cursor position. There is no separate program codings needed for this job. -
Dynamic Playlist for streaming video
This is my first attempt at building a dynamic playlist for
streaming flash video and I'm following the tutorial at
"macromedia.com/devnet/flash/articles/video_player.html". I've
changed the paths to my FMS and loaded the video files to the
applications directory of the FMS (flash_applications/videosource).
The thumbnails load and the player skin loads but the videos do not
load when I click on the thumbnails.
I've read the earlier post about this same issue. I followed
the advice from that post and reloaded the 'main.asc' file from my
Flash 8 program files but the video still does not play.
Here is a link to the site so you can see the problem:
http://media.us.elsevierhealth.com/videosource/VideoSource1.swf
My FMS is 'media.us.elsevierhealth.com'
I believe my code is correct and I believe the paths I've
created are correct. If someone could review my code and check the
path info I would appreciate it. Here is the code from
'VideoSource1.as'
import mx.video.*;
//Set up the list box, call function VideoThumb to create the
actual thumbnails
list.rowHeight = 70;
list.cellRenderer = "VideoThumb";
list.selectable = true;
//create new empty listener object
listListener = {};
nc = new NetConnection(); //create a connection
nc.connect("rtmp://media.us.elsevierhealth.com/videosource");
//connect to FCS (nav.attributes.url)
ns = new NetStream(nc); //create a stream
ns.connect(); //connect the stream
nc.connect("rtmp://media.us.elsevierhealth.com/videosource");
var stream_ns:NetStream = new NetStream(nc);
stream_ns.play("video2.flv");
// Create function to trace all the status info.
function traceStatus(info) {
Message.text+="Level: " + info.level + " Code: " +
info.code+"\n";
} // Assign this function to onStatus handlers when you
create objects.
//Function to handle what happens when an item in the list is
selected
listListener.change = function( evtobj ) {
var nav = list.dataProvider[list.selectedIndex];
var reset = true;
for ( var i = 0; i < nav.childNodes.length; i++ ) {
var stream = nav.childNodes
if ( stream.nodeName == "stream" ) {
attachMovie("FLVPlayback", "my_FLVPlybk", 10, {width:320,
height:240, x:90, y:100});
//center the FLVPlayback component when FLV is ready to play
var listenerObject
bject = new Object();
listenerObject.resize = function(eventObject
bject):Void {
//center video in playback area
newx = (460 - my_FLVPlybk.preferredWidth)/2;
newy = (470 - my_FLVPlybk.preferredHeight)/2;
my_FLVPlybk._x = newx;
my_FLVPlybk._y = newy;
my_FLVPlybk.addEventListener("resize", listenerObject);
listenerObject.ready = function(eventObject
bject):Void {
my_FLVPlybk.setSize(250, 350);
my_FLVPlybk.skin = "ClearExternalAll.swf";
my_FLVPlybk.clear();
my_FLVPlybk.contentPath =
"rtmp://media.us.elsevierhealth.com/videosource/stream/_definst_/"
+ stream.attributes.name+".flv";
my_FLVPlybk.autoSize = true;
trace(my_FLVPlybk.contentPath);
reset = false;
//Add an event listener on the list, when it triggers, run
the listListener function to repopulate the list
list.addEventListener("change", listListener);
//Function that loads the XML file, parses it, and builds the
list of available video clips
var xmllist = new XML(); //setup a variable to hold the XML
xmllist.ignoreWhite = true;
xmllist.load( "playlist-demo-1.xml" ); //load the XML file
//The following gets called when the XML has been loaded
xmllist.onLoad = function( status ) {
if ( !status )
trace( status );
var entries = this.childNodes[0];
var playlists = {};
var nav = [];
for ( var i = 0; i < entries.childNodes.length; i++ ) {
var entry = entries.childNodes;
if ( entry.nodeName == "listitem" )
//builds array of video clip names
playlists[entry.attributes.name] = entry;
else if ( entry.nodeName == "menu" ) {
//builds array of available videos
for ( var j = 0; j < entry.childNodes.length; j++ )
nav[j] = playlists[entry.childNodes[j].attributes.name];
} //end else if
} //end if
//sends the array of videos to the listbox UI
list.dataProvider = nav;
} //end xmllist.onload
Any advice or troubleshooting will be appreciated. Thanks in
advance.I just used the server on Windows (as opposed to linux) and
it worked great. So the issue, at least for me and my issue (could
see the thumbnails, couldn't play the video) was windows vs. Linux.
I guess the linux version doesn't work with this exact script. Now
to put together something of my own to test to see if the linux
version works right. -
Keyence Barcode Reader & RS-232
Hey gang! Just wondering if anybody out there has successfully communicated with a Keyence BL-600 series barcode reader (or any Keyence barcode reader for that matter, I'm desperate) via RS-232.
I have a BL-601 and I can communicate with it when I'm using Keyence's software, but I can't get it to do anything through LabVIEW.
I've tried using the Instrument I/O Assistant and coding it the "low level way" and I'm just not getting anywhere with it so I decided I would throw my problem into the internet tubes and see what happens....
Thanks!
-- JasonCommunicating with a barcode reader over RS232 is the same as communicating with any RS232 device. You should first verify that you can communicate with it by using HyperTerminal if you're on Windows, or your favorite terminal program if you're using another OS. Next, call up the "Basic Serial Write and Read" example that ships with LabVIEW (Help->Find Examples). Set up the communication parameters as you need. In your case you probably want the "write" off. The VI is not set up to run in a loop so you will need to scan first then run the VI to get the data off the serial port buffer.
One suggestion: can you use a keyboard wedge with this reader instead? This would make it so that the string you scan would be as if you had physically typed it via a keyboard, and the application wouldn't know the difference. -
What's the regex pattern for regular English chars and numbers ...
In Java String there is a matches(String regex) method, how can I specify the regex for regular English chars, I want it to tell me if the string contains non-English chars. The string is from an email, my application wants to know if the email contains any foreign characters, such as French, Spanish, Chinese ...
So if the string looks like this : "Hi Frank, today is (5-7-2007), my address is : '[email protected]', email me ~ ! ^_^, do you know 1+2=3 ? AT&T, 200%, *[$300] | {#123}, / _ \;"
It should recognize it as regular English characters.
But if it contains any foreign language (outside of a-z) chars either western(Russian, Greek ...) or eastern languages (Japanese, Chinese ...), it should return false.
I wonder how to write this "regex" ?
Franksince french, english, and spanish use thesame
alphabet, i don't know how you will have theregex
for "english chars but not french or spanishones"
:)Not true. Spanish has �
KajAlso ll.ll was in 1994 dropped from the Spanish alphabet. :)No shit?
What about ch and rr? -
I installed the cable between my TV set and the new apple Tv for streaming. Nothing cam up on my TV screen. I want to get NETFLIx from my apple tablet and myTv set.
Change to the appropriate input on the tv.
-
Best Practices? Rendering to Flash for streaming web....
I am always impressed with the flash based videos I see streaming on YouTube, FastCompany.Tv and other sites....
My question... can you please either explain or point me in the right direction for streaming video best practices? Specifically, I am looking for info on best settings to produce the flash video (codecs and/or FCP render settings) and then what do people use as a flash player on their websites to show the end result.
My goal is to create internal instructional videos for corporate training and then host them on my site (or streaming from Akamai). I would like people to be able to watch it in a flash player embedded on my site (and have it look good even if they click on a full screen button) or download to their iPod.
Examples of what I like, but I don't know how to do:
http://www.fastcompany.tv/video/getting-government-work
Thank you in advance for your expertise and insight.
-StevenI would like people to be able to watch it in a flash player embedded on my site (and have it look good even if they click on a full screen button) or download to their iPod.
Use the H.264 setting for iPod in Compressor. The h.264 file will play in a JW Flash Player and it's able to be downloaded for iPod viewing. -
Using the Barcode Reader with QR codes
Manchester Art Gallery is trialling QR codes in its Remembering Slavery: Revealing History display. From 1-29 March visitors will be able to use their mobile phones to retrieve specially designed web pages. The pages invite visitors to submit comments on six works on show, and listen to and read poems and comments on some of the objects.
More information on the display is at http://www.manchestergalleries.org/whats-on/community-programmes/current-projects/
The project was initiated by Julian Tomlin, a freelance consultant who is undertaking a review of machine-readable technologies in museums for a consortium of London museums.
Come to the Gallery on Moseley Street, Manchester and try out your phone. The N95 includes a barcode reader. On Saturday 1 March there will be people on hand to offer some guidance. Let us know what you think of this emerging technology.If your phone doesn't have bar code reader. This one works great for me:
http://www.i-nigma.com/personal/GetReader.asp
Or go here to find other suppliers:
http://mobilecodes.nokia.com/scan.htm
640K Should be enough for everybody
El_Loco Nokia Video Blog
Maybe you are looking for
-
Hi , My requirement is to call WD java in portal from WD ABAP . I Searched and found it is possible by using PCD Path but i am not able to do . I tried it and now called application is opening up but full portal opens up in a separate browser , i wan
-
Changing Audio Language in Netflix (Latin America)
Hi all, I´m having issues with Netflix in Latin America from an Apple TV. Many movies have three languages (spanish, english and portuguese) and depending the availabitty it starts by default in spanish. I prefer english but i can´t find the way to c
-
Muvo nx deleted everything whe
The battery level was already low. But before I changed batteries, I decided to delete the last item I was listening to. Right after pressing Delete, the unit simply powered-off. After replacing the battery, the unit powered up showing NO content! Ev
-
Finding and fixing block corruption in oracle 10g
10.2.0.5.6 OS: Hp-unix databases files on RAW. DB Size: 10 TBs+ We had a SAN outage recently. The DB is back online. We want to check for block corruption to be on the safe side. We are planning to take a SAN EMC BCV copy of prod to run this. Looking
-
My iPhoto library is on an external firewire drive; and while in iPhoto, I accidentally pulled the cable slightly, which was enough to disconnect it. As a result, all my thumbnails became empty frames with no associated photos; but all my albums were