madshiva Posted September 29, 2009 Share Posted September 29, 2009 Dear all, I have search but found nothing about this. There is a way, to add C++ code (few line) to a AutoIt script without a dll call ? I would write a script that benchmark one hard drive, I got one source in C++ for help me. Link to the source in C++ : http://www.benchmarkhq.ru/fclick/fclick.php?fid=250 I have search in the fonction of AutoIt but there is no fonction to read the disk by sector, it's why I would like to create this fonction, but I don't know how I could transform this to AutoIt : char buf[10]; wsprintf(buf,"\\\\.\\%c:",name[0]); return (int)CreateFile(buf,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL|FILE_FLAG_NO_BUFFERING,NULL); I hope someone could help me, to find the right way to do this. Thanks in advance. Link to comment Share on other sites More sharing options...
JRowe Posted September 29, 2009 Share Posted September 29, 2009 Relatively easy to do. Check out the Plugins interface. Valik even updated the VS projects, so if you have Visual Studio Express, you should be able to adapt your code in a matter of minutes.This will let you create a function with the plugin interface that will be treated exactly like a native function in AutoIt. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
madshiva Posted September 29, 2009 Author Share Posted September 29, 2009 (edited) Ok, I will try. Thanks you for your help JRowe ! Edited September 29, 2009 by madshiva Link to comment Share on other sites More sharing options...
trancexx Posted September 29, 2009 Share Posted September 29, 2009 Dear all, I have search but found nothing about this. There is a way, to add C++ code (few line) to a AutoIt script without a dll call ? I would write a script that benchmark one hard drive, I got one source in C++ for help me. Link to the source in C++ : http://www.benchmarkhq.ru/fclick/fclick.php?fid=250 I have search in the fonction of AutoIt but there is no fonction to read the disk by sector, it's why I would like to create this fonction, but I don't know how I could transform this to AutoIt : char buf[10]; wsprintf(buf,"\\\\.\\%c:",name[0]); return (int)CreateFile(buf,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL|FILE_FLAG_NO_BUFFERING,NULL); I hope someone could help me, to find the right way to do this. Thanks in advance. In AutoIt: $hFile = FileOpen("\\.\C:", 16) ConsoleWrite(FileRead($hFile, 10) & @CRLF) FileClose($hFile) Or just: ConsoleWrite(FileRead("\\.\C:", 10) & @CRLF) Have in mind requirements of your system regarding admin privileges needed for running that code. ♡♡♡ . eMyvnE 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