Laymanball Posted October 19, 2011 Share Posted October 19, 2011 (edited) Between writting update code. Include name: AU3XDLL.AU3 expandcollapse popup#include-once ;AU3XDLL.AU3 Library Include Global Const $DLLhandle = DllOpen("AutoItX3.dll"), $ReturnType = "int" Func _AU3_ClipGet() Local $cgRet = DllCall($DLLhandle, $ReturnType, "AU3_ClipGet", "str", "", "int", 1024) If(@error)Or(Not $cgRet[1])Then Return SetError(1, 0, 0) Return $cgRet[1] EndFunc Global $szClip Func _AU3_ClipPut($szClip) Local $cpRet = DllCall($DLLhandle, $ReturnType, "AU3_ClipPut", "str", $szClip) If(@error)Or(Not $cpRet[0])Then Return SetError(1, 0, 0) Return $cpRet[0] EndFunc Global $szDrive, $szAction Func _AU3_CDTray($szDrive, $szAction) Local $ctRet = DllCall($DLLhandle, $ReturnType, "AU3_CDTray", "str", $szDrive, "str", $szAction) If(@error)Or(Not $ctRet[0])Then Return SetError(1, 0, 0) Return $ctRet[0] EndFunc Global $szTip, $nX, $nY Func _AU3_ToolTip($szTip, $nX=0, $nY=0) Local $tRet = DllCall($DLLhandle, $ReturnType, "AU3_ToolTip", "str", $szTip, "long", $nX, "long", $nY) If(@error)Or(Not $tRet[0])Then Return SetError(1, 0, 0) Return $tRet[0] EndFunc Global $szRun, $szDir, $nFlag Func _AU3_Run($szRun, $szDir="", $nFlag=1) Local $rRet = DllCall($DLLhandle, $ReturnType, "AU3_Run", "str", $szRun, "str", $szDir, "long", $nFlag) If(@error)Or(Not $rRet[0])Then Return SetError(1, 0, 0) Return $rRet[0] EndFunc Global $szTitle, $szText, $szControl, $szControlText Func _AU3_ControlSetText($szTitle, $szText, $szControl, $szControlText) $stRet = DllCall($DLLhandle, $ReturnType, "AU3_ControlSetText", "str", $szTitle, "str", $szText, "str", $szControl, "str", $szControlText) If(@error)Or(Not $stRet[0])Then Return SetError(1, 0, 0) Return $stRet[0] EndFunc Global $szTitle, $szText, $szControl Func _AU3_ControlGetText($szTitle, $szText, $szControl) $gtRet = DllCall($DLLhandle, $ReturnType, "AU3_ControlGetText", "str", $szTitle, "str", $szText, "str", $szControl) If(@error)Or(Not $gtRet[0])Then Return SetError(1, 0, 0) Return $gtRet[0] EndFunc Global $nMilliseconds Func _AU3_Sleep($nMilliseconds=0) Local $sRet = DllCall($DLLhandle, $ReturnType, "AU3_Sleep", "long", $nMilliseconds) If(@error)Or(Not $sRet[0])Then Return SetError(1, 0, 0) Return $sRet[0] EndFunc Global $dsRun Func _Run_Dos($dsRun) Local $dRet = _AU3_Run(@ComSpec& " /c "& $dsRun, "", 0) If(@error)Or(Not $dRet[0])Then Return SetError(1, 0, 0) Return $dRet[0] EndFunc Script sample: #include "AU3XDLL.AU3" _AU3_ToolTip("I Love AutoIt", 400, 300) Sleep(3000) #include "AU3XDLL.AU3" $tTestMessage = "Hello World!"&@CRLF&"I Love AutoIt" _AU3_ClipPut($tTestMessage) MsgBox(4096, "", _AU3_ClipGet()) Download:Full AutoIt3XDLL Library & Script sample ..Please wait.. Edited October 19, 2011 by Laymanball My Sample Script Download: VistaDesktopIconsChangerForXp.au3 (Com,Doc and Bin only) http://www.4shared.com/rar/NMHYL5Igba/VistaDesktopIconsChangerForXp_.html VistaDesktopIconsChangerForXp.exe (Resources) http://www.4shared.com/rar/nzs7Mb1gba/VistaDesktopIconsChangerForXp_.html Link to comment Share on other sites More sharing options...
Mikeman27294 Posted October 19, 2011 Share Posted October 19, 2011 Ok... I dont know if it is just on my computer or not, but neither of these work. And I dont know the point in all these DLL calls, when someone can just use the native autoit functions? 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