redblacktree Posted August 20, 2008 Share Posted August 20, 2008 Hello, Thank you for taking the time to help. I have tested AutoIt functions using SciTE, and I have come up with a series of commands that I would like to implement in C#. Unfortunately, I can only figure out how to use the built-in AutoIt functions. Since _GUICtrlListView_ClickItem is in GuiListView.au3, I am not sure how to proceed. Can someone tell me how to "reference" these user-defined functions from Visual Studio? Do I need to open up the au3 and recreate it using standard functions? Thanks again. redblacktree Link to comment Share on other sites More sharing options...
zfisherdrums Posted August 20, 2008 Share Posted August 20, 2008 (edited) Hello, redblacktree. Just a suggestion:Open up GuiListView.au3 and observe the call tree, especially when those calls resolve to WinAPI functions. Then, download the VS plugin entitled PInkove from www.pinvoke.net. This will provide the Interop signatures to utilize the WinAPI calls in C#. - OR -Save yourself a lot of time and heartache. Download ManagedWindowsAPI from http://mwinapi.sourceforge.net. You can utilize these low-level API calls using a great, free framework that exposes the functions you need to interact with those - and all other windows-native - controls.Zach... Edited August 20, 2008 by zfisherdrums Identify .NET controls by their design time namesLazyReader© could have read all this for you. Unit Testing for AutoItFolder WatcherWord Doc ComparisonThis here blog... Link to comment Share on other sites More sharing options...
redblacktree Posted August 20, 2008 Author Share Posted August 20, 2008 Thank you for your reply; also, thank you for the tip re: ManagedWindowsAPI. I have used PInvoke in the past; this is a nice alternative. I was hoping to find something a bit simpler. I am using C# mostly for the ease of creating the UI. Also, I'm most comfortable there. If I'll be reinventing the wheel by converting these user-defined functions from the library, then I think I might be better off using the scripting language to create my GUI. Thanks again for your reply. Can anyone else confirm that this is my only option for using UDFs/"includes" in .Net code? redblacktree Link to comment Share on other sites More sharing options...
redblacktree Posted August 20, 2008 Author Share Posted August 20, 2008 A definitive answer here would really help me. I don't want to start writing my GUI in AutoIt script until I know for sure that I can't use includes in C#. If anyone can help, I would very much appreciate it. redblacktree Link to comment Share on other sites More sharing options...
redblacktree Posted August 21, 2008 Author Share Posted August 21, 2008 Is there another place I can ask this kind of question? Thanks for any assistance. redblacktree Link to comment Share on other sites More sharing options...
redblacktree Posted August 22, 2008 Author Share Posted August 22, 2008 It appears I posted this in the wrong forum. I thought I would post a follow-up here, however, for future forum searchers. My research has shown that User Defined Functions must be recreated if you want to use them in C#. zfisherdrums' tips above are good for anyone looking to do this. If you have problems doing this or want to talk about it, the appropriate place is the AutoItX forum. Thanks for the help! redblacktree Link to comment Share on other sites More sharing options...
Richard Robertson Posted August 22, 2008 Share Posted August 22, 2008 UDFs are scripts. You'll always have to translate them. Also, why would you need an external library for platform invocation? You can call native functions from C# very easily. You just have to not be stupid about it. Link to comment Share on other sites More sharing options...
redblacktree Posted August 22, 2008 Author Share Posted August 22, 2008 UDFs are scripts. You'll always have to translate them.Also, why would you need an external library for platform invocation? You can call native functions from C# very easily. You just have to not be stupid about it.Thank you for your input?I'm not sure if you're calling me or zfisherdrums stupid. But I'm not finding anything useful here. Surely you weren't just tooting your own horn by bashing the newbie.redblacktree Link to comment Share on other sites More sharing options...
Richard Robertson Posted August 22, 2008 Share Posted August 22, 2008 I didn't call anyone stupid. I said the process is doable as long as the person performing the process isn't stupid. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now