Jump to content

Recommended Posts

Posted

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

Posted

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

Posted
Posted

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 ?

  • Developers
Posted

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.

<{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.
  :)

Posted

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.
Posted

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.

Posted (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 by Valik

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...