Sign in to follow this  
Followers 0
White76

Creating DLL

9 posts in this topic

There is some problem - I want to create my DLL with math functions inside, and to call some "*.dll" from script using Dllcall or pluginopen. My questions to г is

- How to write DLL, using AutoIT ???

- Is it real to write any script , compile and rename to DLL ??? ( only Func-Endfunc of math functions in script)....

I dont use any programm-languages :) and want to create my Lib to use in my scripts. I know about #include directive - i need a portable DLL file

May be, anybody know who can explain me solution of my idea.

(russioned-broaken english )))

Share this post


Link to post
Share on other sites



Wrong section ?

Anyway, you can't create a dll with autoit. (and renaming stuff doesn't help lol !)

You could compile some scripts with your functions which you can call with some parameters, and then check the returns. You could also create one compiled script which does all your functions and run it like for example :

mainscript.exe /function_number /parameter1 /parameter2

and check its return.

Share this post


Link to post
Share on other sites

oh!

thanks!

I inderstand what operator

$var=run("script.exe /number /value1 /value2") can run from BAT file or command Line ???

$var will be the value of function ?

then another question -

mainscript.exe /function_number /parameter1 /parameter2 <= number function in script ???

Thanks Again!

Share this post


Link to post
Share on other sites

OK, I did

script 1 (as DLL)

func dll($a)    Return 2*$a  EndFunc

Script 2

$a=run("dll.exe /1 /2")  MsgBox(0,"",$a)

Msgbox is always different .... :)

Where a mistake ???

Share this post


Link to post
Share on other sites

I made this quick, there are probably a lot better ways xD

If you decide to work with this don't forget adding error checking and all that.

"dll"

call($CmdLine[1])

Func _MsgBox()
MsgBox($CmdLine[2],$CmdLine[3],$CmdLine[4]) 
EndFunc

example

_call('test.exe', '_MsgBox', 4,  'yes?', 'text')

Func _call($sProg, $sFunc, $p1 = "", $p2 = "", $p3 = "") ; lol
ShellExecute($sProg, $sFunc&' '&$p1&' '&$p2&' '&$p3)
EndFunc

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I understood the little part of your code xD

CALL can not by use ByRef, and var $CMDline is What ???

SHELLEXECUTE dont return the value of my func, only 1 if all right.

PLEASE DONT USE DIFFICULT WORD - MY ENGLISH IS RUSSIAN xD .

rewriting my question :

I want to write my DLL or analogical file with mathFunctions, using Autoit, and to get the value of func in program from this external file.....so....

How to get this values???

Edited by White76

Share this post


Link to post
Share on other sites

Maybe you should try the Russian community? They will probably understand you better.

http://autoit-script.ru/

Oh,Thanks! I'll create EXE and its function will depend of $CMDline...

Share this post


Link to post
Share on other sites

Oh,Thanks! I'll create EXE and its function will depend of $CMDline...

Exactly, you'll pass the number of the function and any function parameters through the command line parameters :)

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