Sign in to follow this  
Followers 0
Kip

API Functions Lib

25 posts in this topic

#1 ·  Posted (edited)

All the functions from User32, Kernel32, Shell32, GDIPlus, GDI32, WinInet, WinMM, AdvAPI32 and ComCtl32.

All functions are in a list which can be searched very easily.

Just click on an item to view the function info at MSDN in the embedded IE control.

[note that it's just a list with functions, I didn't rewrite them]

Posted Image

I know that there are much more dlls, but these are the most common used.

API_Lib.zip

Edited by Kip

Share this post


Link to post
Share on other sites



Looks interesting. Do you have a version that uses FireFox instead of IE? I, like many, have totally disabled IE which means any AutoIt scripts solely relying on IE (rather than default browser) fail miserably.

Share this post


Link to post
Share on other sites

True, but "default" browser covers them all including IE, FF, Opera, Netscape and a host of others.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

You could do sth like this:

install Mozilla ActiveX BrowserControl from http://www.iol.ie/~locka/mozilla/mozilla.htm

$IE = ObjCreate("Mozilla.Browser.1")
If @error Then 
    msgbox(0,"API Lib","Using IE, no Mozilla COM-Control found!")
    $IE = _IECreateEmbedded()
EndIf

And Change the _IENavigate to

_IENavigate ($IE, $URLedited,0)

because Mozilla doesn't support the LoadWait-Method.

//Edit: Then it uses Mozilla-Engine, but NOT Firefox/Mozilla/... the ActiveX is separate from them.

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

@Kip, I spend the majority of the day on MSDN... so this is very useful, thank you....

Edit:

Removed first comment

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Hi!

Thanks, @Kip.

PartyPooper: @Kip use ActiveX functionnality of IE. On this way, FF is too poor. You can't use FF in place of IE, because many possibilities are not implemented in FF.

If "portability" is synonymous with loss of functionalities, I prefer use IE, and drop FF.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

@Kip, I spend the majority of the day on MSDN

Get a life :) [That's a joke]

so this is very useful, thank you....

You're welcome :) [That's not a joke]

:)

Edited by Kip

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Very cool idea - especially considering all the times I have to look this stuff up.

Feel free to disregard the following, but I made some modifications in the following example:

  • Isolate displayed selections to one or more specific .DLL entries
  • Select All/Deselect All (see previous item)
  • Changed the page navigation to use the "Return immediately" parameter (I was having to wait for a page load to finish before I could close the app)
  • Window sizing adjustment(s) to a fixed set of percentages of screen dimensions for width/height
CODE

#NoTrayIcon

#include <WindowsConstants.au3>

#include <GUIConstantsEx.au3>

#include <StaticConstants.au3>

#include <ButtonConstants.au3>

#include <WinAPI.au3>

#include <Misc.au3>

#include <IE.au3>

$iGUIWidth = Int(@DesktopWidth * .9)

$iGUIHeight = Int(@DesktopHeight * (2 / 3))

Global $IE

Global $ActiveItems = ""

Global $Create = 0

Global $User32Items = StringReplace(StringReplace(StringReplace(FileRead("User32.txt"), ":", " * "), @CRLF, "|"), ".dll", "")

Global $Kernel32Items = StringReplace(StringReplace(StringReplace(FileRead("Kernel32.txt"), ":", " * "), @CRLF, "|"), ".dll", "")

Global $Shell32Items = StringReplace(StringReplace(StringReplace(FileRead("Shell32.txt"), ":", " * "), @CRLF, "|"), ".dll", "")

Global $GDIPlusItems = StringReplace(StringReplace(StringReplace(FileRead("GDIPlus.txt"), ":", " * "), @CRLF, "|"), ".dll", "")

Global $WinInetItems = StringReplace(StringReplace(StringReplace(FileRead("WinInet.txt"), ":", " * "), @CRLF, "|"), ".dll", "")

Global $WinMMItems = StringReplace(StringReplace(StringReplace(FileRead("WinMM.txt"), ":", " * "), @CRLF, "|"), ".dll", "")

Global $AdvAPI32Items = StringReplace(StringReplace(StringReplace(FileRead("AdvAPI32.txt"), ":", " * "), @CRLF, "|"), ".dll", "")

Global $ComCtl32Items = StringReplace(StringReplace(StringReplace(FileRead("ComCtl32.txt"), ":", " * "), @CRLF, "|"), ".dll", "")

#Region Create GUI

$GUI = GUICreate("API Functions Lib", $iGUIWidth, $iGUIHeight, 5, 5);, $WS_SIZEBOX) ;, $WS_MAXIMIZEBOX + $WS_MAXIMIZE + $WS_MINIMIZEBOX + $WS_SIZEBOX)

$iTopIndex = 5

$bodyInputBase = GUICtrlCreateLabel("", 5, $iTopIndex, 260, $iGUIHeight - 10, $SS_SUNKEN)

GUICtrlSetState($bodyInputBase, $GUI_DISABLE)

$bodyBrowserBase = GUICtrlCreateLabel("", 270, $iTopIndex, $iGUIWidth - 275, $iGUIHeight - 10, $SS_SUNKEN)

GUICtrlSetState($bodyBrowserBase, $GUI_DISABLE)

$IE = _IECreateEmbedded()

GUICtrlCreateObj($IE, 275, $iTopIndex + 5, $iGUIWidth - 285, $iGUIHeight - 20)

$iTopIndex = $iTopIndex + 5

$labelSearch = GUICtrlCreateLabel("Search in:", 8, $iTopIndex, 52, 17)

$iTopIndex = $iTopIndex + 15

$dCombosStart = GUICtrlCreateDummy()

$comboUser32 = GUICtrlCreateCheckbox(_SpaceSelections("User32", "(User Interface)"), 30, $iTopIndex, 200, 17)

$comboKernel32 = GUICtrlCreateCheckbox(_SpaceSelections("Kernel32", "(System)"), 30, $iTopIndex + 15, 200, 17)

$comboShell32 = GUICtrlCreateCheckbox(_SpaceSelections("Shell32", "(Shell)"), 30, $iTopIndex + 30, 200, 17)

$comboGDIPlus = GUICtrlCreateCheckbox(_SpaceSelections("GDIPlus", "(Graphics)"), 30, $iTopIndex + 45, 200, 17)

$comboWinInet = GUICtrlCreateCheckbox(_SpaceSelections("WinInet", "(Network)"), 30, $iTopIndex + 60, 200, 17)

$comboWinMM = GUICtrlCreateCheckbox(_SpaceSelections("WinMM", "(Multimedia)"), 30, $iTopIndex + 75, 200, 17)

$comboAdvAPI32 = GUICtrlCreateCheckbox(_SpaceSelections("AdvAPI32", "(Reg, Security)"), 30, $iTopIndex + 90, 200, 17)

$comboComCtl32 = GUICtrlCreateCheckbox(_SpaceSelections("ComCtl32", "(UI Controls)"), 30, $iTopIndex + 105, 200, 17)

$dCombosEnd = GUICtrlCreateDummy()

_SetFont($dCombosStart, $dCombosEnd)

$dButtonsStart = GUICtrlCreateDummy()

$buttonselectAll = GUICtrlCreateButton("Select All", 25, $iTopIndex + 125, 100, 15)

$buttonDeselectAll = GUICtrlCreateButton("Deselect All", 135, $iTopIndex + 125, 100, 15)

$buttonGenerateList = GUICtrlCreateButton("Generate List", 25, $iTopIndex + 145, 210, 20, $BS_FLAT)

$dButtonsEnd = GUICtrlCreateDummy()

_SetFont($dButtonsStart, $dButtonsEnd)

$iTopIndex = $iTopIndex + 170

Global $inputSearch = GUICtrlCreateInput("", 10, $iTopIndex, 250, 21)

$iTopIndex = $iTopIndex + 25

Global $listAPIFunctions = GUICtrlCreateList("", 10, $iTopIndex, 250, $iGUIHeight - ($iTopIndex + 15))

_SetFont($listAPIFunctions)

$labelStatus = GUICtrlCreateLabel("", 10, $iGUIHeight - 22, 250, 15)

_SetFont($labelStatus)

#EndRegion Create GUI

GUISetState(@SW_SHOW)

Global $PreviousSearch = ""

Global $PreviousSelected = ""

State("Loading functions...")

GUICtrlSetData($listAPIFunctions, $ActiveItems)

State("")

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $buttonselectAll

_SelectAll(1)

Case $buttonDeselectAll

_SelectAll(0)

Case $buttonGenerateList

$ActiveItems = ""

GUICtrlSetData($inputSearch,"")

GUICtrlSetData($listAPIFunctions, $ActiveItems)

_GenerateList()

EndSwitch

$Read = GUICtrlRead($inputSearch)

$ReadList = GUICtrlRead($listAPIFunctions)

If $ReadList And $ReadList <> $PreviousSelected Then

$URLdefault = "http://search.msdn.microsoft.com/?query=%SEARCH%&locale=en-us&ac=3"

$Function = StringSplit($ReadList, " * ", 1)

$FunctionStr = $Function[$Function[0]]

If StringInStr(StringRight($FunctionStr, 1), "W", 1) Or StringInStr(StringRight($FunctionStr, 1), "A", 1) Then

$FunctionStr = StringTrimRight($FunctionStr, 1)

EndIf

GUICtrlSetData($labelStatus,$FunctionStr)

$URLedited = StringReplace($URLdefault, "%SEARCH%", $FunctionStr)

_IENavigate($IE, $URLedited,0)

$PreviousSelected = $ReadList

EndIf

If $Read And $Read <> $PreviousSearch Then

State("Searching...")

GUICtrlSetData($listAPIFunctions, "")

$Split = StringSplit($ActiveItems, "|")

For $i = 1 To $Split[0]

If StringInStr($Split[$i], $Read) Then

$Prev = GUICtrlRead($listAPIFunctions)

GUICtrlSetData($listAPIFunctions, $Prev & $Split[$i] & "|")

EndIf

Next

$PreviousSearch = $Read

State()

ElseIf Not $Read And $PreviousSearch Then

State("Adjusting...")

GUICtrlSetData($listAPIFunctions, $ActiveItems)

$PreviousSearch = ""

State()

EndIf

WEnd

#Region Functions List

Func _GenerateList()

If GUICtrlRead($comboAdvAPI32) = $GUI_CHECKED Then

$ActiveItems &= $AdvAPI32Items & "|"

EndIf

If GUICtrlRead($comboComCtl32) = $GUI_CHECKED Then

$ActiveItems &= $ComCtl32Items & "|"

EndIf

If GUICtrlRead($comboGDIPlus) = $GUI_CHECKED Then

$ActiveItems &= $GDIPlusItems & "|"

EndIf

If GUICtrlRead($comboKernel32) = $GUI_CHECKED Then

$ActiveItems &= $Kernel32Items & "|"

EndIf

If GUICtrlRead($comboShell32) = $GUI_CHECKED Then

$ActiveItems &= $Shell32Items & "|"

EndIf

If GUICtrlRead($comboUser32) = $GUI_CHECKED Then

$ActiveItems &= $User32Items & "|"

EndIf

If GUICtrlRead($comboWinInet) = $GUI_CHECKED Then

$ActiveItems &= $WinInetItems & "|"

EndIf

If GUICtrlRead($comboWinMM) = $GUI_CHECKED Then

$ActiveItems &= $WinMMItems & "|"

EndIf

GUICtrlSetData($listAPIFunctions,$ActiveItems)

EndFunc

Func _SelectAll($iState)

If $iState = 1 Then

For $iCtrl = $dCombosStart To $dCombosEnd

GUICtrlSetState($iCtrl, $GUI_CHECKED)

Next

Else

For $iCtrl = $dCombosStart To $dCombosEnd

GUICtrlSetState($iCtrl, $GUI_UNCHECKED)

Next

EndIf

EndFunc

Func _SetFont($dStart, $dEnd = $dStart)

For $iCtrl = $dStart To $dEnd

GUICtrlSetFont($iCtrl, 8.5, 400, Default, "Courier New")

Next

EndFunc

Func _SpaceSelections($str1, $str2)

$sSpacer = " "

$iTargetLength = 26

$iTotalLength = StringLen($str1) + StringLen($str2)

If $iTotalLength < $iTargetLength Then

$iBuffer = $iTargetLength - $iTotalLength

Do

$sSpacer &= " "

Until StringLen($sSpacer) = $iBuffer

EndIf

Return $str1 & $sSpacer & $str2

EndFunc

Func State($Text = "Done!")

GUICtrlSetData($labelStatus, $Text)

EndFunc

#EndRegion Functions List

Edit: Updated includes for 3.2.12.0 (I was still working on a 3.2.10.0 build on my core machine)

Edited by Monamo

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Share this post


Link to post
Share on other sites

Good idea kip :)

Idea for little improvement:

Make new checkbox "Search substring"

When it's checked you will search also for substring and not only begining of API function names.

Share this post


Link to post
Share on other sites

If the Tabcount doesn't change, it's easy:

$iTopIndex = 5
$bodyInputBase = GUICtrlCreateLabel("", 5, $iTopIndex, 260, $iGUIHeight - 10, $SS_SUNKEN)
GUICtrlSetState($bodyInputBase, $GUI_DISABLE)
;$bodyBrowserBase = GUICtrlCreateLabel("", 270, $iTopIndex, $iGUIWidth - 275, $iGUIHeight - 10, $SS_SUNKEN)
;GUICtrlSetState($bodyBrowserBase, $GUI_DISABLE)

Dim $IE[5],$tabitem[5]
$tabs = GUICtrlCreateTab(270, $iTopIndex, $iGUIWidth - 275, $iGUIHeight - 10)
$tabitem[0] = GUICtrlCreateTabItem("MSDN 1")
$IE[0] = _IECreateEmbedded()
GUICtrlCreateObj($IE[0], 275, $iTopIndex + 25, $iGUIWidth - 285, $iGUIHeight - 40)
$tabitem[1] = GUICtrlCreateTabItem("MSDN 2")
$IE[1] = _IECreateEmbedded()
GUICtrlCreateObj($IE[1], 275, $iTopIndex + 25, $iGUIWidth - 285, $iGUIHeight - 40)
$tabitem[2] = GUICtrlCreateTabItem("MSDN 3")
$IE[2] = _IECreateEmbedded()
GUICtrlCreateObj($IE[2], 275, $iTopIndex + 25, $iGUIWidth - 285, $iGUIHeight - 40)
$tabitem[3] = GUICtrlCreateTabItem("MSDN 4")
$IE[3] = _IECreateEmbedded()
GUICtrlCreateObj($IE[3], 275, $iTopIndex + 25, $iGUIWidth - 285, $iGUIHeight - 40)
$tabitem[4] = GUICtrlCreateTabItem("MSDN 4")
$IE[4] = _IECreateEmbedded()
GUICtrlCreateObj($IE[4], 275, $iTopIndex + 25, $iGUIWidth - 285, $iGUIHeight - 40)
GUICtrlCreateTabItem("")


$iTopIndex = $iTopIndex + 5
$labelSearch = GUICtrlCreateLabel("Search in:", 8, $iTopIndex, 52, 17)
and
GUICtrlSetData($labelStatus,$FunctionStr)
$URLedited = StringReplace($URLdefault, "%SEARCH%", $FunctionStr)

$ieTab=GUICtrlRead($tabs)
_IENavigate($IE[$ieTab], $URLedited,0)
GUICtrlSetData($tabitem[$ieTab],$FunctionStr)

$PreviousSelected = $ReadList

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

When it's checked you will search also for substring and not only begining of API function names.

It already searches with StringInStr :)

Share this post


Link to post
Share on other sites

Hi!

Thanks, @Kip.

PartyPooper: @Kip use ActiveX functionnality of IE. On this way, FF is too poor. You can't use FF in place of IE, because many possibilities are not implemented in FF.

If "portability" is synonymous with loss of functionalities, I prefer use IE, and drop FF.

Ah ok no probs, thanks for the explanation. Can't believe ppl still use ActiveX, I thought most ppl had it disabled due to its world renown insecurities and only activated it for the Windows Update website as recommended by most security type software and TV shows. Each to their own I guess.

Share this post


Link to post
Share on other sites

Very Good.

An idea: download all the pages that was viewed into local directory (when user select a page in the list), so the next time they will load directly from disk without waiting until the page is loaded, and once in a while (or at every view) check the page on the internet, and if it's updated, redownload it again.


 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Share this post


Link to post
Share on other sites

Looks interesting. Do you have a version that uses FireFox instead of IE? I, like many, have totally disabled IE which means any AutoIt scripts solely relying on IE (rather than default browser) fail miserably.

In Windows, you can remove Internet Explorer from your computer, but it still leaves the ActiveX object that many applications use. If you want to completely disable it, you'll have to dig into your Windows installer.

Not sure what you ment by saying "totally disabled IE", just thought I'd straighten out that Internet Explorer and the IE object are two different things.

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