Sign in to follow this  
Followers 0
Shaggi

Drawing text/png

5 posts in this topic

Hello.

I've been searching for a method for creating a transparent label anywhere on the screen, but since it seems impossible, i made an .png image containing the text to be shown. However i can't find anything about this even.

Is it possible to create a label, anywhere on the screen, gui-less? like: DrawLabel("Text", x,y)

Or if that isn't possible, can you do it with a .png image? Similar to before: DrawPng(image, x, y)

The point is to draw it with transparancy. It should only be shown in a certain window (not a gui), and should be redrawn. I can figure this out myself though, i just want to know which functions to use? Or if anyone have a UDF out there ;) I guess it would have to include some GDI+ functions though?

Thanks for any help.


Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG

Share this post


Link to post
Share on other sites



See _WinAPI_DrawText() for adding some transparent text to the screen.

as for PNG, I don't believe their is much PNG support in AutoIt, look around the forums though. If you trying to place a pic in your GUI you could use GUICtrlCreatePic().

I do believe their is some support in the WinAPI & the GDIPlus folder found in the User Defined Functions Reference of the Help file for bitmap, if that may interest you.


My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.  

Share this post


Link to post
Share on other sites

See this post, it can help you ! Posted Image

It's about animated splash with PNG and transparency...


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

See _WinAPI_DrawText() for adding some transparent text to the screen.

as for PNG, I don't believe their is much PNG support in AutoIt, look around the forums though. If you trying to place a pic in your GUI you could use GUICtrlCreatePic().

I do believe their is some support in the WinAPI & the GDIPlus folder found in the User Defined Functions Reference of the Help file for bitmap, if that may interest you.

I looked at it, but i had some troubles with it. Mainly that transparancy function didnt work, the example given in helpfile just creates a black background - even though i didn't modify the script. But i guess this is the func i have to use.

See this post, it can help you ! Posted Image

It's about animated splash with PNG and transparency...

Very nice example, but because its based on GUI it captures focus each time it draws, which makes it rather useless for my needs.

Thanks anyway though, i hope someone maybe has another solution? Or know how to make transparancy work with (or explain why it doesnt) with _WinApi_Drawtext(). I'm also having trouble determine the coords with _winapi_drawtext.

I might post an example of how the function should be used in a moment.


Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG

Share this post


Link to post
Share on other sites

I looked at it, but i had some troubles with it. Mainly that transparancy function didnt work, the example given in helpfile just creates a black background - even though i didn't modify the script. But i guess this is the func i have to use.

No black background for me !

Hello world ! is display in red

Example works well...


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

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