Jump to content

AutoItX3.dll Library InClude


Laymanball
 Share

Recommended Posts

Between writting update code.

Include name: AU3XDLL.AU3

#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 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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...