Sign in to follow this  
Followers 0
CyberMax

How to call AutoitX3 dll from batch file?

16 posts in this topic

Can anyone help me by showing me how's its done calling autoitx3 dll function from a batch file? Maybe I didnt search enough but I cant find any example of it. :(

Thanks. :graduated:

Share this post


Link to post
Share on other sites



You can't. AutoItX is a dll.

You could instead consider converting your batch file to an AutoIt script and then just call the functions directly.

Share this post


Link to post
Share on other sites

Considering the organization of AutoItX3 this can be achieved by adding one small wrapper function to it that it would additionally export. You could then use rundll32.exe to call functions you want. Something like:

rundll32.exe AutoItX3.dll,BatchCall CDTray,D:,open

...or whatever the syntax is.

Make a feature request if you are really interested.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Can this tool below, be able to call the autoitx3.dll?

http://www.softpedia.com/get/Programming/Other-Programming-Files/CallDLL-OL.shtml

Share this post


Link to post
Share on other sites

Probably. What is it you are trying to do anyway?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Probably. What is it you are trying to do anyway?

Simple, I just wanted to know whether I can call AutoitX3 dll from a batch file.

I can write simple autoit script already. But now this is a crazy idea of me whether its possible

to do it in a batch file using AutoitX3 dll file. :graduated:

Once awhile, people come up with crazy ideas and I'm one of them. :(

Edited by CyberMax

Share this post


Link to post
Share on other sites

Simple, I just wanted to know whether I can call AutoitX3 dll from a batch file.

I can write simple autoit script already. But now this is a crazy idea of me whether its possible

to do it in a batch file using AutoitX3 dll file. :graduated:

Once awhile, people come up with crazy ideas and I'm one of them. :(

That only explains what you are trying to do, not what you are trying to accomplish!

Why would you want a wrapper for autoitx3.dll when you have autoit3.exe?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

That only explains what you are trying to do, not what you are trying to accomplish!

Why would you want a wrapper for autoitx3.dll when you have autoit3.exe?

Jos

This is just the beginning, I'm trying to read an ini file by using autoitx3.dll in

a batch file. The reason is simple, since I already know its easy to use autoit to do

it but now I want to use autoitx3.dll in a batch file to do the same thing.I read in

autox future, someone already created a autoit dll wrapper for delphi, so why not create a autoit dll wrapper to be

use in a batch file, and if its really possible to do it? :graduated:

Edited by CyberMax

Share this post


Link to post
Share on other sites

Even if you read the value, what would you do with it? Batch files don't have things like variables.

Share this post


Link to post
Share on other sites

Even if you read the value, what would you do with it? Batch files don't have things like variables.

Batch files do have variables.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

@CyberMax

You're trying to hammer a nail with a Twinkie. Just stop. Reconsider your purpose and choose a more suitable tool.

Share this post


Link to post
Share on other sites

Batch files do have variables.

How? All I knew about were environment variables (which are not batch variables and would be problematic in scope) and parameters (which are not assignable).

Share this post


Link to post
Share on other sites

Batch considers this a variable:

set _var=value
echo %_var%

In reality it is an environment variable, but it is in local scope to the script. So you just have to be careful how you name your variables that they don't collide with the existing environment.

Share this post


Link to post
Share on other sites

But I hope you agree with me that trying to call IniRead and store it in a batch "variable" is senseless when AutoIt is made for things like that.

Share this post


Link to post
Share on other sites

"Tell him about the Twinkie..."

Share this post


Link to post
Share on other sites

But I hope you agree with me that trying to call IniRead and store it in a batch "variable" is senseless when AutoIt is made for things like that.

That I would agree with. He's basically trying to use a hammer when a screwdriver is needed.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0