ptrex Posted June 3, 2005 Posted June 3, 2005 Hello All, I tested the vbscript in AutoIt which was previously added to a post by : AutoIt COMposer Group: Developers Posts: 393 Joined: 4-January 05 From: The Netherlands Member No.: 4276 I copied the script to test it. but it does not run ? I use AutoIT 3.1.1.0 I want to use VBscript in autoIT since I have a lot of VBscripts available allready. This is the script, any idea what is wrong ; 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 ) ENDWITH Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
DaleHohm Posted June 3, 2005 Posted June 3, 2005 The COM functions (e.g. ObjCreate() ) require the latest beta or alpha builds. Get them from the beta section of the Downloads page. 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
ptrex Posted June 3, 2005 Author Posted June 3, 2005 Dale, Thanks for the fast reply. 2 Questions : - When a VBscript is used can I still compile the AutoIT script (including the VBscript) - Can I use the full syntax of VBscript in AutoIT or is it a subselection of it. Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
ptrex Posted June 3, 2005 Author Posted June 3, 2005 I installed the last Beta available Autoit-v3.1.1.42B-alpha-Setup.exe and the last AutoItX3.dll version 3.1.0.11 Still it give an error UNKNOWN FUNCTION in line 9. Help would be appreciated. Thanks Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
w0uter Posted June 3, 2005 Posted June 3, 2005 did you run it with the exe's in the BETA dir ? My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
ptrex Posted June 3, 2005 Author Posted June 3, 2005 Can you explain you answer a bit. I don' t know what you mean. - I installed the Beta version - Than I ran the script And ended up in getting the error. Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
ptrex Posted June 3, 2005 Author Posted June 3, 2005 Wouter, Thanks for the TIP. Since I installed the BETA it seems that I had 2 versions of AutoIT3. I didn' t check before. The scripts works fine now. Stil I haven' t got an answer on wether I can use the full blown syntax of VBscript in AutoIT or only a subset of it ? Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
Developers Jos Posted June 3, 2005 Developers Posted June 3, 2005 Can you explain you answer a bit. I don' t know what you mean.- I installed the Beta version- Than I ran the scriptAnd ended up in getting the error.<{POST_SNAPBACK}>How are you running the script ?From SciTE you need to do Alt+F5 or else you neeed to start the Autoit3.exe in:c:\program files\autoit3\beta SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Valik Posted June 3, 2005 Posted June 3, 2005 Wouter,Thanks for the TIP.Since I installed the BETA it seems that I had 2 versions of AutoIT3.I didn' t check before. The scripts works fine now.Stil I haven' t got an answer on wether I can use the full blown syntax of VBscript in AutoIT or only a subset of it ?<{POST_SNAPBACK}>You haven't gotten an answered because you've asked a stupid question. You're not using VBScript, you're using COM. It just so happens basically all of VBScripts usefulness is its implementation of COM, therefore, the bulk of VBScript seen is syntactically similar to virtually any other language implementing COM support. The COM implementation in AutoIt has absolutely nothing to do with VBScript. Forget about VBScript, it is meaningless if you are using COM objects from within AutoIt.
ptrex Posted June 5, 2005 Author Posted June 5, 2005 Mr. Arroganzio, stupid questions don't exist, only stupid answers. Only the brave dare to stand up and ask questions !! Since I am not a developer, but a system administrator I am allowed to ask these kind of questions ! If you don't have anything to say that adds value to the question. KEEP OUT. Anyway I will come to the point, and create a new thread. Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
Valik Posted June 5, 2005 Posted June 5, 2005 (edited) Mr. Arroganzio, stupid questions don't exist, only stupid answers.Only people who frequently ask stupid questions use that phrase. Just an FYI from somebody who's observed that phrase used a great number of times.There is in fact, such a thing as a stupid question. A stupid question is one asked based on assumptions on subjects one doesn't know about (Basing anything on assumptions is stupid by default). I would say that your question falls into the category of you assuming that all COM is VBScript or some similar theory. Also, stupid questions can be asked when in the time it takes to ask the question and wait for a response, research could of been done which would of yield the answer (Your question did not fall into this category, however). There are other numerous ways to ask a stupid question as well. These are the two most common.If you don't have anything to say that adds value to the question.If you fail to see the value of my response, then you need to learn how to focus on what's said, not how it's said. I answered your question. I stated that you are in fact, not using VBScript, so the obvious answer to "wether I can use the full blown syntax of VBscript in AutoIT or only a subset of it " is quite obviously, no, since you are not using VBScript (Yes, that was intentionally redundant).Only the brave dare to stand up and ask questions !!Hardly. Lazy people often ask questions as well because they are too lazy to do the work finding the answer (I am not accusing you of this, however, so don't attempt to misconstrue what I'm saying).Since I am not a developer, but a system administrator I am allowed to ask these kind of questions !Thats worded in such a way that it reads that a developer would not be allowed to ask the question or that you have some divine right by not being a developer that only you and those like you are allowed to ask such a question. It wasn't so much that the question itself was stupid as much as the way it was asked. Its loaded with the assumption that COM = VBScript exclusively which is the farthest thing from the truth. Any amount of casual observation on your part should of caused you to realize that AutoIt is in no way, shape, or form making use of VBScript to perform its COM related operations. The fact that VBScript code has to be "ported" as demonstrated by many COM related posts. The fact that VBScript isn't stated as being the provider of COM. The responsibility falls on you to make sure you ask a good question by not loading it with incorrect assumptions.Edit: Also, this thread and the new one which you have started have absolutely nothing to do with the subject of the forum in which you started them. AutoItX has nothing to do with the COM integration of AutoIt. This question as well as the new thread you started belong in the Support forum, unless specifically addressing the AutoItX DLL. Posting things in the wrong forum and asking questions full of assumptions is not the best way of going about things, don't you think? Edited June 5, 2005 by Valik
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