name15 Posted November 20, 2009 Share Posted November 20, 2009 can i convert C++ code too autoit code or make it as header file Link to comment Share on other sites More sharing options...
torels Posted November 20, 2009 Share Posted November 20, 2009 I don't think so... anyway not in an automatic way, you should re-write entirely the code in C++ Anyway if you have an autoit code you want to use in a C++ program you can either use the AutoItX functions OR more simply compile the script as a command line exe and call it from your script Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
jvanegmond Posted November 20, 2009 Share Posted November 20, 2009 Yes, you can convert C++ code to AutoIt manually. Either by doing it yourself or have someone else do it for you. As far as header files go; AutoIt doesn't have them. Just take your time by writing some function prototypes in AutoIt. github.com/jvanegmond Link to comment Share on other sites More sharing options...
name15 Posted November 20, 2009 Author Share Posted November 20, 2009 here sample example code in C++ so how can convert it #include "stdafx.h" int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { char shellcode[] = MessageBox (0,"Hello word",0,0); return 0; } Link to comment Share on other sites More sharing options...
jvanegmond Posted November 20, 2009 Share Posted November 20, 2009 (edited) here sample example code in C++ so how can convert it #include "stdafx.h" int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { char shellcode[] = MessageBox (0,"Hello word",0,0); return 0; } MsgBox(0, "", "Hello word") Edit: I think you want to convert your dll calls into AutoIt dll calls. Like this (SEe documentation on DllCall) DllCall("user32.dll","long","MessageBox","long",0,"str", "Hello word","str", "","long", 0) Edited November 20, 2009 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
name15 Posted November 20, 2009 Author Share Posted November 20, 2009 (edited) no but how you can make it as function Edited November 20, 2009 by name15 Link to comment Share on other sites More sharing options...
jvanegmond Posted November 20, 2009 Share Posted November 20, 2009 MessageBox (0,"Hello word",0,0); Func MessageBox($a, $b, $c, $d) DllCall("user32.dll","long","MessageBox","long",$a,"str", $b,"str", $c,"long", $d) EndFunc github.com/jvanegmond Link to comment Share on other sites More sharing options...
name15 Posted November 20, 2009 Author Share Posted November 20, 2009 thank but i try whit this code DenyAccess to protect you project when it running expandcollapse popup#define _WIN32_WINNT 0x0500 #include <windows.h> #include <sddl.h> #include <accctrl.h> #include <stdio.h> #include <conio.h> #include <aclapi.h> BOOL ProtectProcess(HANDLE hProcess); void main(void) { HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, GetCurrentProcessId()); ProtectProcess(hProc); printf("SetProcessDacl - Keep a process from being closed by other applications.\nDeveloped by ANUBIS"); while(TRUE) { Sleep(100); } } BOOL ProtectProcess(HANDLE hProcess) { SECURITY_ATTRIBUTES sa; sa.nLength = sizeof(SECURITY_ATTRIBUTES); sa.bInheritHandle = FALSE; if (!ConvertStringSecurityDescriptorToSecurityDescriptor("D:P", SDDL_REVISION_1, &(sa.lpSecurityDescriptor), NULL)) return FALSE; if (!SetKernelObjectSecurity(hProcess, DACL_SECURITY_INFORMATION, sa.lpSecurityDescriptor)) return FALSE; return TRUE; } Link to comment Share on other sites More sharing options...
jvanegmond Posted November 20, 2009 Share Posted November 20, 2009 github.com/jvanegmond Link to comment Share on other sites More sharing options...
name15 Posted November 20, 2009 Author Share Posted November 20, 2009 ok but sme time we don't have call dll so we need some fuction in C++ Code how we control it Link to comment Share on other sites More sharing options...
name15 Posted November 21, 2009 Author Share Posted November 21, 2009 i find this function LockFile in kernel32.dll but i didn't how can i use it Link to comment Share on other sites More sharing options...
Developers Jos Posted November 21, 2009 Developers Share Posted November 21, 2009 i find this function LockFile in kernel32.dll but i didn't how can i use itOk, now first spent some time to explain what it is you want to accomplish here....Jos 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. Link to comment Share on other sites More sharing options...
name15 Posted November 21, 2009 Author Share Posted November 21, 2009 (edited) LockFile(hAppend, dwPos, 0, dwBytesRead, 0); DllCall("Kernel32.dll","long","LockFile","long","C:\1.wav","str", 0,"str", 0,"str", 0) not work Edited November 21, 2009 by name15 Link to comment Share on other sites More sharing options...
Developers Jos Posted November 21, 2009 Developers Share Posted November 21, 2009 LockFile(hAppend, dwPos, 0, dwBytesRead, 0);DllCall("Kernel32.dll","long","LockFile","long","C:\1.wav","str", 0,"str", 0,"str", 0)not workI understood that, but what are you trying to do with this script you are creating? 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. Link to comment Share on other sites More sharing options...
name15 Posted November 21, 2009 Author Share Posted November 21, 2009 Locks the specified file adding more function to my script Link to comment Share on other sites More sharing options...
Developers Jos Posted November 21, 2009 Developers Share Posted November 21, 2009 Locks the specified file adding more function to my scriptTry to use a some more words to explain what it is you want to accomplish.I understand your native language isn't English but you will have to try to make it clear what you want to do for us to be able top help you.Jos 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. Link to comment Share on other sites More sharing options...
name15 Posted November 21, 2009 Author Share Posted November 21, 2009 ok i am try to add more function using MSDN Libery by use DLL() but i don't how can use this Function Link to comment Share on other sites More sharing options...
Developers Jos Posted November 21, 2009 Developers Share Posted November 21, 2009 I give up..... 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. 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