|
|||
|
thankyou for all the support.
I had to use Virtual Machine to install windows 98 and I ran the software on it again and it worked. the problem i found was I was not ticking the standalone program option and it was would work fine on windows xp but not on windows 98, but after i ticked the option it worked on both just fine. I am on my way to creating a nice application with serial port in flash. Thanks alottttttt |
|
|||
|
hi again...
my program is working fine, basically the code and everything is unchanged from the sample program QM that is available on the website. Now I want to save a stream of incoming text response from com port. I have a micro controller attached to the com port, I send it a chck command and it reponds with a stream of text for e.g "AH BH CH DH EH FH GH HH" I want to be able to capture this whole string so I can further write code in flash to process this information. > on a side note / although the qm program works, but in the response text box I cannot see the text properly /complete. For e.g. original response is AMOUNT OF T: 04 in the reponse textbox i can only read "T:04" this is not issue of textbox being too small to handle the whole text... //another side note: In Qm sample program is there specific Baudrate being used ? / if so what is it / I want to have a baudrate of 9600. thanks.. waiting for reply. - sz |
|
|||
|
Quote:
Code:
var stream = this.read(count);
FlashPlayer.setVariable("response.text", stream.toString());
trace(stream);
Code:
var HexString;
var DecString;
commx.onRxChar = function (count) {
var getStreamByte = this.read(count);
streamByte = getStreamByte;
for(i=0; i<streamByte.length; i++) {
var Dec = streamByte.get(); //
var Hex = Dec.format("%X"); //
HexString = HexString + "," + Hex; //
DecString = DecString + "," + Dec; //
}
FlashPlayer.setVariable("response.text", HexString + "\n");
FlashPlayer.setVariable("response.text", FlashPlayer.setVariable("response.text") + DecString + "\n");
}
|
|
|||
|
Which ocx is better run on WindowsXP/Windows2003/Windows Vista?
cportx.ocx or mscomm32.ocx. In my application use cportx.ocx run on WindowsXP a crack and change to mscomm32.ocx now! Both is free. |
|
|||
|
The help file says that "Call WriteStr function to write Str variable to output buffer. The function does not return until whole string is written or timeout elapses.". So you can call your function just next to the previous "writeStr" call.
|
|
|||
|
Ok, I understand.
I use a USB switcher and when switching a relay on it, I just wait for the process, and then call a function in AS script (check the status and display the results). Now my solution a setInterval() process. It's working, but not too elegant. I was think maybe use some function like Shell.runandwait()-for external processes, or some onEndPrinting() in printing. Anyway, Thank You to Your answer! |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|