Jump to content

BernyHsu

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by BernyHsu

  1. Hi JustSomeone, I have encountered the same issue before, plz check out this post: Hope it really helps.
  2. Thanks! I'll try it out later and update the result here.
  3. After posting this topic, I tried compile this code as x86 script instead of x64. It works! But another question is that: Is it possible to package dll with exe together? Just found out that I cant leave the exe file alone without commmg.dll Thanks again and excuses me for disturbing posts.
  4. Hi everyone, I am using martin's UDF to query my COM ports. Here is my code: #include <CommMG.au3> #include <MsgBoxConstants.au3> Global $portlist = _CommListPorts(0) For $i = 0 To $portlist[0] MsgBox( $MB_SYSTEMMODAL, "", $portlist[$i]) Next I've already put CommMG.au3 and commMG.dll in the same directory. When I use Tools => Go in Autoit SciTE-Lite everything is fine. The program print out all my COM ports. But when I compile this program to an EXE file and execute it. An error occurs as following: This is so confusing. I try another experiment that removing commMG.au3, then Tools=> GO again. It shows the error like it is in EXE: Is this indicating that something wrong in #include <CommMG.au3> ??? Thank you for your great support! listport.rar
  5. Hey saloo4pro, Were you using CommgExample.au3 to test? Please refer to my last post in this topic. Maybe it could give you a help.
  6. Hi Martin, I think that I have found the issue in CommgExample.au3 of the occurrence of garbled messages. After few days reviewing the code. I got the point at line 25: Dim $ParityType[5] = ["odd", "even", "none", "Mark", "Space"] If we choose parity for "none", the return parity number would be 2 instead of 0, this is how it causes the issue. According the description in CommgMG.au3: So I corrected line 25 as following: Dim $ParityType[5] = ["none", "odd", "even", "Mark", "Space"] When we choose "none", the return parity number would be 0, everything is fine! Thank you very much.
  7. Great information!! Thank you Junkew.
  8. Hi Martin Thanks for your reply. My setting on CommgExample.au3 is the same as it is in SecureCRT: Port: COM16 Baud rate: 57600 Data bits: 8 Parity: None Stop bits: 1 I have done some test which changed the data bits from 8 to 7. The data from my device to the text box is fine. But the commands I inputted cannot reach the device. After changing back to 8. I can input command to my device but the return message is garbled again. Is there any advice? Thank you!! Data bit: 7 Data bit: 8
  9. Hi Jchd! Thank you very much! Just find another helpful stuff and my problems are all solved! '?do=embed' frameborder='0' data-embedContent>> Thank you guy!
  10. Great appreciation! Melba. So I think it's impossible for me to produce this encryption kit by Autoit
  11. Good day guys! I am creating some encryption stuff via Autoit using BitXOR function but it returns something like overflow? or something so that the result went wrong. Are there any solutions to this problem? $iLicenceCode = BitXOR(1064432088155062, 7010165116) The result should be "1064438007734987", but it returns "-917101878" Thanks and Best regards.
  12. Great appreciation to Martin! This UDF saves a lot of my developing time. But it just encountered a problem of using it. While I am using terminal app such as SecureCRT and Hyperterminal to connect to my product, everything is fine. And I am just developing a test program to get access to my product. Firstly I used the "CommgExample.au3" to see whether if the function is okay. The problem occurs. When I input a command through the example, it received garbled message as a return.(please refer to the attach image) For verifying this issue. I have used a virtual serial port app to simulate a virtual port so that I can make connection between CommgExample.au3 and SecureCRT. I found that the function is okay and the characters are fine. I cannot not figure what's the root cause for this issue. Hope there's someone has the same experience and could point it out for me. Thanks!! CommgExample.au3 with my prodcut CommgExample.au3 with SecureCRT
  13. Just found something on the Vandyke official site. It provides a VBscript which performs the result I want. So is it possible to do the same thing with Autoit? Thanks! http://www.vandyke.com/support/securecrt/scripts/getdata_vbs.txt # $language = "VBScript" # $interface = "1.0" Sub Main ' Send the unix "date" command and wait for the prompt that indicating ' that it completed. In general we want to be in synchronous mode before ' doing send/wait operations. ' crt.Screen.Synchronous = True crt.Screen.Send( "date" & vbCR ) crt.Screen.WaitForString( "linux$" ) ' When we get here the cursor should be one line below the output ' of the 'date' command. Subtract one line and use that value to ' read a chunk of text (1 row, 40 characters) from the screen. ' screenrow = crt.screen.CurrentRow - 1 Dim result result = crt.Screen.Get(screenrow, 1, screenrow, 40 ) ' Get() reads a fixed size of the screen. So you may need to use ' VBScript's regular expression functions or the Split() function to ' do some simple parsing if necessary. Just print it out here. ' MsgBox result crt.Screen.Synchronous = False End Sub
  14. Hi Guys, I have a problem that using ControlGetText() in SecureCRT control. What my scripts is going to do is to input some commands in "Edit1" then get the response from "AfxFrameOrView100u1". The problem is after inputting a command then ControlGetText() gets nothing. I am wondering whether if "AfxFrameOrView100u1" is a common control which we can read the text or not. Besides that I've tried ControlGetText() in other controls of app and it works fine. Hope there is somebody have the same experience and the solution. Thanks! Local $sFeedBack = ControlGetText("Serial","","AfxFrameOrView100u1") ;get text from AfxFrameOrView100u1 FileWriteline ($sLogFile, "<br>" & "Result: " & $sFeedBack) ;Write the text to a log file
×
×
  • Create New...