
dougmoran
Members-
Posts
14 -
Joined
-
Last visited
Everything posted by dougmoran
-
Hello Friends, I've seen this question pop up a few times but without answer. So here goes... I have developed an application using AutioIT. The application is a simple GUI that enables the user to configure hardware remotely from their terminal. The hardware is a new computer IC that has multiple complex parameters and is connected to the network through WiFi, USB, Ethernet, or Cellular Modem. I have the whole system working very well and would like to simplify it, making the installation process as simple as copy/paste. The system relies on half a dozen DLL's to operate, so to achieve my goal I'll have to merge the DLL functionality into my code or find an automated method to merge an existing .exe (generated by AutoIT) with DLL's (some from AutoIT, like COM, others from 3rd parties). I've tried to use ilmerge (http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx) with no luck. Visual Studio has a method that would work if I wasn't using AutoIT (it does the merge at compile time). So.. does anyone have similar requirements and if so how are you doing it? A little background... I've asked this question on several other forums and usually get responses like "why would you want to do that, it sounds silly". It probably does sound silly at first, but here's the reason just in case it helps... The end customers don't want to have to go through a Windows software installation to run this tool. They are primarily in education and want to be able to carry a single file on a memory stick or email a single .exe to students. The key learning for the student is how to use the specific hardware integrated circuits the software talks to and they don't want the students getting defocused from this in any way. Anyway, thanks in advance for the time you spent reading this post and for any advice you can give. Doug
-
DllCall pointer return type revisited
dougmoran replied to dougmoran's topic in AutoIt General Help and Support
New Dad, Thank you so much for that code snippet. It works perfectly!!! It saved me from having to rewrite my app in C, so I owe you big-time. If you're ever in the San Diego area look me up and I'll buy the beers. And congrats on being a new dad! Doug -
Sorry I'm asking this again. Don't want to bug you good people but I still can't find a way to solve this problem. I am calling a function in a DLL using DllCall in AutoIT. The function's return type is a pointer to an array of bytes. I've tried everything I can think of to try to get the actual array but nothing works. I don't have the source code for the DLL, only the header. I am using OpenDll and getting @error=0 The function has two parameters and they are being set as expected by the function. How can I get to the data that the DLL is returning a pointer to?
-
getting data from pointers
dougmoran replied to dougmoran's topic in AutoIt General Help and Support
MVPs: I see a table with the following information: Row Col0 [0] 0 [1] 1 [2] 1795 -
getting data from pointers
dougmoran replied to dougmoran's topic in AutoIt General Help and Support
I just realized I copied the wrong code in my original post. Here is the correct code: The c code: const an_Byte* an_GetPrimaryConfigData(an_Chip chip, int* count); The AutoIT call: $bptr = DllCall($dll,"byte*:cdecl","an_GetPrimaryConfigData","byte",1,"int*",$count_ptr) -
Hi Folks, I've been struggling with this problem for days and am turning to you as my last resort. I am using a DLL provided by a vendor. I don't have the c source, only the function users guide. One of the functions I am using returns a type byte*. Here is the line in the .h file: const an_Byte* an_GetPrimaryConfigData(an_Chip chip, int* count); I can call the function like this: $an_Ptr = DllCall($dll,"int_ptr:cdecl","an_GetPrimaryConfigData","byte",1,"int*",$count_ptr) Now how do I use an_Ptr to get the data I need. an_Ptr is pointing to an array of bytes. I know this is probably really stupid but I'm not getting it and I can't find anything here about how to do this. Thanks in advance for your kind help. Doug
-
Looking for a Forth compiler or assember
dougmoran replied to dougmoran's topic in AutoIt Technical Discussion
I'm using a stack processor in an FPGA design. The processor's assembly language is modeled after forth and I'm looking for a simple way to build an assembler or compiler using AutoIT because I'm most familiar with that language. -
Hey folks, does anyone happen to have code for a Forth compiler or assembler in Autoit3?
-
Hi Martin, I agree this is not a problem with your Commg UDF's. This is a Microsoft issue that has been present since W98 and is still not fixed in W7. Something to do with the virtual comm port stack not notifying that the USB connection has been unplugged. Anyway, I'm going to try to find a workaround to this and will post here if I'm able to find one. It's funny, the Microsoft support post on this basically says "yes, it's a bug and we're not going to fix it, so don't unplug the USB device while your program is running.." Thanks, Doug
- 680 replies
-
- serial port
- virtual port
-
(and 2 more)
Tagged with:
-
Hi Martin, Well... my little gui that uses your Commg UDF's is working fabulously. There is only one problem remaining for me to figure out: the script crashes if I unplug the USB cable while running in a tight loop. When not in a tight loop the script checks the comm port before any accesses happen and go to an error handler function. When in a tight loop even though I always check to comm port the script still crashes. I've done some research and found that there is a problem in Microsoft's .net comm port libraries that cause an exception under certain circumstances - like when the USB cable is suddenly unplugged. But I'm not a software engineer and don't have time to become one to debug this. The error code in AutoIt's console is: !>10:48:13 AutoIT3.exe ended.rc:255 So.... I'm wondering if you've heard from any other folks about this issue since the last thread? Also wondering if you or someone you know would be interested indoing some paid consulting on my project? I'd like to have someone take ownership of this project long term for debugging, future feature enhancements, and customer support. I'd prefer to have an expert familiar with AutoIt, and a big plus would be someone familiar with RFID but that's not required. Cheers, Doug
- 680 replies
-
- serial port
- virtual port
-
(and 2 more)
Tagged with:
-
Thanks again for your help. Your suggestione and code worked. Also you were correct about the difference between Hyperterminal's handling of data vs. mine. Thanks again....
- 680 replies
-
- serial port
- virtual port
-
(and 2 more)
Tagged with:
-
Thanks for your suggestions & sorry for not responding sooner. I've been in airports most of the last few days. Whew. Anyway, I'll try your suggestions this morning and get right back to you. -ddm
- 680 replies
-
- serial port
- virtual port
-
(and 2 more)
Tagged with:
-
Hi Martin, I'm using your com udf library with great success except for one little problem. I've embedded a small hyperterminal into an application for driving an rfid reader system. The terminal connects to the reader hardware via a USB port. Everthing works great, but something strange happens when I enter data into the command line (hyper terminal). Here's an example: "rfoff @CR" entered into control input and sent to the reader using _CommSendString() "CLI:rof" is the response of the reader as captured by _CommGetLine() The response should look like: "CLI:" So it looks like the comm interface is somehow capturing every other character of the outbound data and including it into the inbound buffer (i.e. "rfoff" --> "rof"). When I use a generic hyperterminal this does not happen, so I know the problem is either in my code or possibly the dll? I'm running Windows 7 professional, 64 bit version. Here's the code to my simple command line hyperterm: ;function cliChange is executed when input control $cli is triggered with a CR Func cliChange() $cliInput = GUICtrlRead($cli) ;reads input control GUICtrlSetData($cli,"") _CommSendString($cliInput & @CR) ; send the reader a command wait() ;waits 20mS $_news=_CommGetLine(@CR, 0, 0) ;retrieves the reader response. News($_news) ; writes the reader response into the list control. EndFunc
- 680 replies
-
- serial port
- virtual port
-
(and 2 more)
Tagged with:
-
Good day, folks. I'm new to AutoIt, and definately not an experienced software guy. I'm using AutoIt to build a GUI interface into an RFID system and am having difficulty understanding how to use lists, put display data in them, etc. I included a very simple example below of a GUI that just opens with a list box and displays a count and then closes. When I run the script the list works fine until the count exceeds the size of the box when the scroll bar appears. Then the counts start to write over themselves. I want it to just keep counting down the scroll bar in order. Are there any tutorials you can point me to to help figure this out? GUICreate("My GUI") $mylist=GUICtrlCreateList("", 30, 30, 100, 100) GUISetState(@SW_SHOW) Dim $i=0 While $i < 15 GUICtrlSetData($mylist,$i) $i=$i+1 sleep(1000) Wend