Jump to content

Auto3Lib


PaulIA
 Share

Recommended Posts

My first post here, so..

A big thanks to PaulIA for this incredible addition to AutoIt.

I was just wondering how to make _GDIP_FontCreate.au work without a true type font like Arial.

Try it with "MS Sans Serif" or Courier; it doesn't work.

$hFamily = _GDIP_FontFamilyCreate("Courier")

Link to comment
Share on other sites

PaulIA, is Auto3Lib's source available? I would like to run it on a computer where I don't have admin privleges and thus cannot run your installer. I understand it is folly to try a manual install, but I am only interested in a few of the functions, and thus should be able to figure out everything I need from your source. My apologies if this has already been asked...I wasn't about to sort through 54 pages of replies...

Edit: P.S. Can a control of class "SSTreeWndClass" be manipulated using any of your funcs? I haven't been able to find any documenation on this class on the internet...

Edited by mikehunt114
IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
Share on other sites

PaulIA is no longer developing Auto3Lib, but he has provided the source in the package, zipped in C:\Program Files\AutoIt3\Auto3Lib\Tools

Or, if you just want the includes, they are all loaded in at C:\Program Files\AutoIt3\Include, and all start with "A3".

SSTreeWndClass looks like a proprietary class, so I'd be surprised if any API commands could control it.

Edited by lod3n

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Link to comment
Share on other sites

@ alc: I don't plan on trying to install it, as indicated by my previous post, I just want to look at how he's done some of his funcs. It'll be an excellent source of solutions. Opening the exe through WinRAR was just what I needed, thanks.

@lod3n: Could you provide me a link to any documentation, or anything else that would be helpful? I'm kind of in the dark on this one.

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
Share on other sites

There is documentation in the Auto3Lib help file. If you can't run the installer, you can extract the files using the utilities alc mentioned above. There is no other source for the library other than the installer. If you can't install it, or extract the contents, you can't get at anything.

The help file mostly just talks about using the library, it doesn't explain the specific mechanics of what makes it work. If you want to learn from it, you need to open each of the .au3 files that are used and see what they do. They are based around Windows API calls made using DLLCall and other DLL related functions.

What are you trying to do, specifically?

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Link to comment
Share on other sites

Ah, yes I understand the situation well lod3n. All I desired from PaulIA's AU3Lib is the .au3 files to peruse through. I learn much better from code than other resources usually. I haven't yet found anything I can use for my current project, but I've noted some things I can use for other issues.

I was actually referring to perhaps MSDN docs or something of that sort on the SSTreeWndClass. I'd like to know how to interact with them. I'm just trying to manipulate said control in an application at work. Right now I'm only interested in reading the contents, but may extend further. I'd appreciate it if you could point me in the right direction.

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
Share on other sites

SSTreeWndClass doesn't turn up any results on Google, or MSDN, or this Forum. I think it must be some custom control, which means you can't control it with the Windows API, which means Auto3Lib won't be of much use to you.

You might be able to control it with AutoIt's ControlSend and other Control functions, but don't get your hopes up too hight. What application is it that uses SSTreeWndClass anyway?

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Link to comment
Share on other sites

That more or less confirms what I thought. The application is called Value Navigator.

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
Share on other sites

Try it with "MS Sans Serif" or Courier; it doesn't work.

Maybe PaulIA's _API_CreateFontIndirect, but I see no examples of using this to give it a try.

Any idea how to choose MS Sans Serif, 14?

#include <A3LGDIPlus.au3>

Global $hGUI, $hWnd, $hGraphic, $hBrush, $hFormat, $hFamily, $hFont, $tLayout

Global $sString = "Hello world"

; Create GUI

$hGUI = GUICreate("GDI+", 400, 300)

$hWnd = WinGetHandle("GDI+")

GUISetState()

; Draw a string

_GDIP_Startup()

$hGraphic = _GDIP_GraphicsCreateFromHWND($hWnd)

$hBrush = _GDIP_BrushCreateSolid(0xFF00007F)

$hFormat = _GDIP_StringFormatCreate()

$hFont = _API_CreateFontIndirect(????)

$tLayout = _GDIP_RectFCreate(140, 110, 0, 0)

$aInfo = _GDIP_GraphicsMeasureString($hGraphic, $sString, $hFont, $tLayout, $hFormat)

_GDIP_GraphicsDrawStringEx($hGraphic, $sString, $hFont, $aInfo[0], $hFormat, $hBrush)

; Loop until user exits

do

until GUIGetMsg() = $GUI_EVENT_CLOSE

; Clean up resources

_API_DeleteObject ($hFont )

_GDIP_StringFormatDispose($hFormat )

_GDIP_BrushDispose ($hBrush )

_GDIP_GraphicsDispose ($hGraphic)

_GDIP_Shutdown()

Link to comment
Share on other sites

Tried to install A3L but it says I have version 3.2.0.1 of autoit but I ran this simple script I made and it tells me I have version 3.2.5.6. Which is what I thought I had. :)

Version display script:

MsgBox(0, "AutoIt Version", "AutoIt Version is :" & @AutoItVersion)

Any ideas?

Autoit (and Scite) has two directories: release and beta

You probably have release: 3.2.0.1 and beta 3.2.5.6

For Auto3Lib you need have your release version 3.2.4.9

Link to comment
Share on other sites

Hi.

I have a problem when i try to use

_ScreenCap_Capture on Win2k

These two lines of code work fine under WinXP

#include <A3LScreenCap.au3>
_ScreenCap_Capture("C:\Dokumente und Einstellungen\Crashcourse\Desktop\screeny\Image1.jpg",0, 0, 300, 300)

But produce this error on Win2k:

---------------------------------------

Line 2321 (File "C:\...\A3lGDIPlus.au3");

Return $aResult[0] <> 0

Return $aResult^ ERROR

ERROR: Subscript used with non-Array Variable

----------------------------------------

Thanks for your time.

Crashcourse

Link to comment
Share on other sites

  • Moderators

Hi.

I have a problem when i try to use

_ScreenCap_Capture on Win2k

These two lines of code work fine under WinXP

#include <A3LScreenCap.au3>
_ScreenCap_Capture("C:\Dokumente und Einstellungen\Crashcourse\Desktop\screeny\Image1.jpg",0, 0, 300, 300)

But produce this error on Win2k:

---------------------------------------

Line 2321 (File "C:\...\A3lGDIPlus.au3");

Return $aResult[0] <> 0

Return $aResult^ ERROR

ERROR: Subscript used with non-Array Variable

----------------------------------------

Thanks for your time.

Crashcourse

I'm pretty sure the gdiplus dll is not included in win2k. You'll need to download it into your system folder.

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.

Link to comment
Share on other sites

What's the problem?

Instalation or some runtime error or something else?

Same problem here, so I can answer that question :)

The problem is the installer does not seem to be parsing and comparing the version number correctly. I have the latest release installed, and not the beta. I completely removed all traces of AI, installed the latest released version, and again tried the library installer with the same results:

Posted Image

As you can see, the error is stating you need at least 3.2.4.9 and currently installed is 3.2.6.0

Link to comment
Share on other sites

  • Moderators

Auto3Lib don't work with 3.2.6.0 ?

Here is a temporary fix.

$sRegKey = "HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt"
$sRegValue = "Version"
$sRegType = "REG_SZ"

$sCurrent = RegRead($sRegKey, $sRegValue)
RegWrite($sRegKey, $sRegValue, $sRegType, "v3.2.4.9")
MsgBox(0, "", "You are ready to install Auto3Lib." & @CRLF & @CRLF & _
        'Click "OK" when the installation is complete.')
RegWrite($sRegKey, $sRegValue, $sRegType, $sCurrent)
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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