bafh Posted April 8, 2005 Share Posted April 8, 2005 Hi guys, is there any way to use vb code in autoit script? because i made a program in autoit and just need a little vb code and thus it would be a lot easier. thanks alot, bye Link to comment Share on other sites More sharing options...
DaleHohm Posted April 8, 2005 Share Posted April 8, 2005 is there any way to use vb code in autoit script? because i made a program in autoit and just need a little vb code and thus it would be a lot easier.<{POST_SNAPBACK}>Perhaps you'd like to give a little more detail about what you are trying to do. You can run an external program from AutoIt as I believe you have already discovered. You can use AutoItX to execute many AutoIt functions from a language like VB. You can use the new Beta build available from the Programmers forum to access the ObjCreate (CreateObject in VB) fundtion to instantiate an external application API.The way you are asking the question doesn't make much sense to me... it is like "Can I run some COBOL in my MS-DOS .bat file?"Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
bafh Posted April 9, 2005 Author Share Posted April 9, 2005 Well, first of all thanks for answering, and here my question again, more detailed: its possible with autoitx to include autoit code within vb or many other languages. but is it possible to include vb code within an autoit program? the reason why i want to do that is that i have a whole program in autoit and only need a few lines of vb script for some stuff i cant do in autoit. So far i solved the problem by compiling both and running the in vb written program from the autoit one - but that doesnt seem to be a very good solution. Of cause it would be alot more professional to write everything in vb and what you cant do in vb (or what is easier in autoit) you write in autoit, but since i dont know alot about vb and i dont have much time to learn it, it would be alot faster the way i want to do it. i was just reading that .dll files are like compiled code from any language, but not a executable program. so if i compile my vb code into a dll file and run (or use it) from my autoit program it would solve the problem (at least i dont need 2 executables) ((-->is that a word??)). Because, my problem with the 2 executables (if thats a word) was that the vb program needs runtimefiles and on some computers i had to install them first, which is a pain. Would it using dlls solve that problem or do they still need stuff like that?!?!(runtime files or something or need to be registered so i need to install the program) Thanks alot Link to comment Share on other sites More sharing options...
SvenP Posted April 14, 2005 Share Posted April 14, 2005 Well, first of all thanks for answering,and here my question again, more detailed:....Thanks alot<{POST_SNAPBACK}>Hello bafh,First of all: You mentioned both VB script and VB. Those are two different languages. Secondly: Are you sure you want to use AutoItX? Because AutoItX implies that you already run a different programming language (VB, VBscript, C++, ..).I have only a 'VBScript' solution for you. This piece of script requires the beta version of AutoIt (not AutoItX) with COM support:; AutoItCOM 3.1.0 ; ; Test File ; ; Wscript.shell example ; Returns file information of AutoIt.exe $objShell = ObjCreate("WScript.Shell") $objFS = ObjCreate("Scripting.FileSystemObject") $strPath = @AutoItExe $objFile = $objFS.GetFile($strPath) WITH $objFile Msgbox(0, $strpath , _ @AutoITexe & " " & @CRLF & _ "File Version: " & $objFS.GetFileVersion($strpath) & @CRLF & _ "File Size: " & Round((.Size/1024),2) & " KB" & @CRLF & _ "Date Created: " & .DateCreated & @CRLF & _ "Date Last Modified: " & .DateLastModified ) ENDWITHIs this the kind of stuff you ask for ?Regards,-Sven Link to comment Share on other sites More sharing options...
kjactive Posted April 16, 2005 Share Posted April 16, 2005 (edited) Well there is a solution - you can wrap up your code into a DHTML script and use WebPage.dll to fire it up in a autoit3 gui... DHTML, or Dynamic HTML, Javascript and VB Script can be used to really bring your web pages to life and more than that act on events etc.. DHTML allows computer code to be executed on the machine, a technique frequently used to provide dynamic pop-up menus, roll-over images and other such features or in your case to activate a VB subscripts... I suggest that you use the WebPage string option to do this kind of action and the control could be off site still working... A real hybrid solution - it's fun... Kåre Edited April 16, 2005 by kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc... 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