Sign in to follow this  
Followers 0
CerealKilla

Draw floating text

23 posts in this topic

At some point I drew text, similarly to a ToolTip, floating at the designated coordinates, but cannot remember/find how I did it. Does anyone know?

I DO NOT want a GUI, AT ALL.

The intention is that I can have text drawn in a game, and it won't interfere with the game by minimizing(as a GUI would) and won't flicker like mad(like a ToolTip)

Thanks for any help.

Share this post


Link to post
Share on other sites



At some point I drew text, similarly to a ToolTip, floating at the designated coordinates, but cannot remember/find how I did it. Does anyone know?

I DO NOT want a GUI, AT ALL.

The intention is that I can have text drawn in a game, and it won't interfere with the game by minimizing(as a GUI would) and won't flicker like mad(like a ToolTip)

Thanks for any help.

Splash text?

Share this post


Link to post
Share on other sites

FreeText.au3 is what you want... IMHO.. >_<

http://www.autoitscript.com/forum/index.php?app=downloads&showfile=124

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

FreeText.au3 is what you want... IMHO.. >_<

http://www.autoitscript.com/forum/index.php?app=downloads&showfile=124

8)

That is actually NOT what I want, and there are 2 reasons.

1) I've never used that, and I DID do it in the past with the standard functions of autoit

2) If that is supposed to be a file consisting of several pre-written functions for doing various things, the author sorely needs to create at least a description of the file, as well as per function. There is no mention of how these functions are actually used... and they aren't easy to decipher w/o them.

Edited by CerealKilla

Share this post


Link to post
Share on other sites

There is no mention of how these functions are actually used... and they aren't easy to decipher w/o them.

See this link for demonstrations of FreeText: http://www.autoitscript.com/forum/index.php?showtopic=72294&st=0&p=527912&#entry527912

Beyond that, you may have been thinking of something like this:

http://www.autoitscript.com/forum/index.php?s=&showtopic=96764&view=findpost&p=695639

@Valuater,

The forum links in the download section for FreeText are malformed

Share this post


Link to post
Share on other sites

See this link for demonstrations of FreeText: http://www.autoitscript.com/forum/index.php?showtopic=72294&st=0&p=527912&#entry527912

Beyond that, you may have been thinking of something like this:

http://www.autoitscript.com/forum/index.php?s=&showtopic=96764&view=findpost&p=695639

@Valuater,

The forum links in the download section for FreeText are malformed

jesus it was 1 line of code... not 10,000. it was NOT on the desktop either, as I believe I already said. There was NO GUI, i.e. gui_**** or w/e it is. it was basically draw_text(string, x, y)...

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

You're obviously new around here... You don't show any attempt at trying, and when valid solutions are given to your already vague question, you shoot them down with how it wasn't right.

From your behavior I see you wanted it handed to you on a silver platter. Study the example ResNullius gave you. It really isn't that hard if you sit down and give it a go.

Cheers,

Brett

>_<

Edited by BrettF

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

You're obviously new around here... You don't show any attempt at trying, and when valid solutions are given to your already vague question, you shoot them down with how it wasn't right.

From your behavior I see you wanted it handed to you on a silver platter. Study the example ResNullius gave you. It really isn't that hard if you sit down and give it a go.

Cheers,

Brett

>_<

How long did it take you to read how many posts I've put up?

All I ask is people actually READ what people ask for. When someone says, "I DO NOT want a GUI, AT ALL." that they don't offer solutions that involve gui, i.e. all of FreeText's functions. I know for a fact that the way that I'd done it before did not involve a gui, and am not asking for A solution to my question. I'm asking for THE solution to my question. I quite clearly asked for someone to try to tell me how I did it previously, not using GUI. That's not vague in the slightest. There are only x number of functions in AutoIt, and if you don't have a possible solution, don't bother saying you don't, or criticizing me for asking people take the extra 3 seconds to read the last sentences of someones post before they reply with something already denied.

PS: I did work with FreeText, and guess what, because it used gui, it constantly took focus away from the active window, as I do believe I said in the second paragraph of my initial post that it would do, and that this form of solution was unacceptable. (You can scroll up if you don't believe me... as apparently you yourself did not actually read my question in it's entirety) So I daresay I have reason to "shoot them down" when they are incorrect, and are irrelevant to the question asked. If you think that I did not search the forum already, and hadn't already downloaded AND tested FreeText before I posted my question, then you severely underestimate how pissed off I get when I read the exact same question posted 5 times, with the exact same responses from the exact same people.

Edited by CerealKilla

Share this post


Link to post
Share on other sites

Meanie, haha umm Console Write

i THINK


My UDF:Freeze.au3-Freeze values like CE, ML, ETC[i][/i][u][/u]

Share this post


Link to post
Share on other sites

How long did it take you to read how many posts I've put up?

All I ask is people actually READ what people ask for. When someone says, "I DO NOT want a GUI, AT ALL." that they don't offer solutions that involve gui, i.e. all of FreeText's functions. I know for a fact that the way that I'd done it before did not involve a gui, and am not asking for A solution to my question. I'm asking for THE solution to my question. I quite clearly asked for someone to try to tell me how I did it previously, not using GUI. That's not vague in the slightest. There are only x number of functions in AutoIt, and if you don't have a possible solution, don't bother saying you don't, or criticizing me for asking people take the extra 3 seconds to read the last sentences of someones post before they reply with something already denied.

PS: I did work with FreeText, and guess what, because it used gui, it constantly took focus away from the active window, as I do believe I said in the second paragraph of my initial post that it would do, and that this form of solution was unacceptable. (You can scroll up if you don't believe me... as apparently you yourself did not actually read my question in it's entirety) So I daresay I have reason to "shoot them down" when they are incorrect, and are irrelevant to the question asked. If you think that I did not search the forum already, and hadn't already downloaded AND tested FreeText before I posted my question, then you severely underestimate how pissed off I get when I read the exact same question posted 5 times, with the exact same responses from the exact same people.

ToolTip()

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

How long did it take you to read how many posts I've put up?

All I ask is people actually READ what people ask for. When someone says, "I DO NOT want a GUI, AT ALL." that they don't offer solutions that involve gui, i.e. all of FreeText's functions. I know for a fact that the way that I'd done it before did not involve a gui, and am not asking for A solution to my question. I'm asking for THE solution to my question. I quite clearly asked for someone to try to tell me how I did it previously, not using GUI. That's not vague in the slightest. There are only x number of functions in AutoIt, and if you don't have a possible solution, don't bother saying you don't, or criticizing me for asking people take the extra 3 seconds to read the last sentences of someones post before they reply with something already denied.

PS: I did work with FreeText, and guess what, because it used gui, it constantly took focus away from the active window, as I do believe I said in the second paragraph of my initial post that it would do, and that this form of solution was unacceptable. (You can scroll up if you don't believe me... as apparently you yourself did not actually read my question in it's entirety) So I daresay I have reason to "shoot them down" when they are incorrect, and are irrelevant to the question asked. If you think that I did not search the forum already, and hadn't already downloaded AND tested FreeText before I posted my question, then you severely underestimate how pissed off I get when I read the exact same question posted 5 times, with the exact same responses from the exact same people.

Sorry for my breaking in, but your altitude is definitely against the community's spirit. Let me tell you, no-one on this board is actually paid a single penny for all their efforts on answering questions. Don't you see? They're all volunteers, so kind, and so nice. And, does this make you think that you have the rights to yell at them, by using Caps Lock, huh? :| And, if I were you, I wouldn't ask that rudely, no, really no, positively sure. :|

Have you ever considered to take your time to look at the links the others have post?

See this link for demonstrations of FreeText: http://www.autoitscript.com/forum/index.php?showtopic=72294&st=0&p=527912&#entry527912

Beyond that, you may have been thinking of something like this:

http://www.autoitscript.com/forum/index.php?s=&showtopic=96764&view=findpost&p=695639

@Valuater,

The forum links in the download section for FreeText are malformed

And, I am entirely sure that, they do mention in the very very first link:

@SW_SHOWNA

Displays the window in its current size and position. This value is similar to @SW_SHOW, except the window is not activated.

@SW_SHOWNOACTIVATE

Displays a window in its most recent size and position. This value is similar to @SW_SHOWNORMAL, except the window is not activated.

The next time you post another topic, keep in mind that: You come here to learn, to look for help, not to make commands to people.

Edited by eEniquEe

Share this post


Link to post
Share on other sites

This draws text to screen without a GUI.

;
#include <GDIPlus.au3>
#include <WinAPI.au3>

Opt("GUIOnEventMode", 1) ;0=disabled, 1=OnEvent mode enabled
HotKeySet("{ESC}", "_Quit")
Global $GuiSizeX = @DesktopWidth, $GuiSizeY = @DesktopHeight

Local $hGui = ControlGetHandle("Program Manager", "", "SysListView321");GUICreate("GDIPlus Example", $GuiSizeX, $GuiSizeY)
;GUISetState()

_GDIPlus_Startup()

Local $hGraphicGUI = _GDIPlus_GraphicsCreateFromHWND($hGui)
Local $hBMPBuff = _GDIPlus_BitmapCreateFromGraphics($GuiSizeX, $GuiSizeY, $hGraphicGUI)
Local $hGraphic = _GDIPlus_ImageGetGraphicsContext($hBMPBuff)

;Graphics here
_GDIPlus_GraphicsClear($hGraphic, 0x00E8FFE8)

_GDIPlus_GraphicsDrawString($hGraphic, "Hello world", 600, 420)
;End of graphics

_GDIPlus_GraphicsDrawImage($hGraphicGUI, $hBMPBuff, 0, 0)
;End Double Buffer add-on 2 of 3

While 1
    _GDIPlus_GraphicsDrawImage($hGraphicGUI, $hBMPBuff, 0, 0)
    Sleep(20)
WEnd

Func _Quit()
    ;_GDIPlus_BrushDispose($hBrush)
    ;_GDIPlus_PenDispose($hPen)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_GraphicsDispose($hGraphicGUI)
    _WinAPI_DeleteObject($hBMPBuff)
    _GDIPlus_Shutdown()
    Exit
EndFunc   ;==>_Quit
;

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

liten - thanks for trying. You should probably write some code for yourself for experimentation before suggesting it like that. ConsoleWrite writes data to the Console. The Console does not actually draw its contents at all.

AdmiralAlkex - As I said in the first post, ToolTip doesn't work because it causes flickering. Also, if you click on it, the program will lose focus, and if it's a game in full screen, minimize.

eEniquEe - I am not demanding of anyone answers to my question. I am demanding they take the time to fully read a question, formulate carefully a potential solution (maybe even testing it in code if they're not really sure), and then, after making sure that the proposed solution doesn't break any of the conditions of the question, post their ideas.

I don't believe that it's too much to ask of people that they don't waste resources (theirs, mine, this sites) on regurgitating information which has already been nullified in the question, or subsequent responses. I know quite well that forums are run freely, and that anyone posting on them is doing so at their own leisure and expense. I am not saying that they owe me an answer. All that I ask is that, if you are going to respond to someones question, you respect their time in not posting nearly irrelevant information. It's not much different from spamming an add for your product on someone's question about how to use a while loop. The person who asked the question has to filter through all these ad's to find the legitimate responses.

If someone were to go onto a post you had made in which you had asked for help with while loops, and proceeded to tell you all about Switch statements, would you feel it unnecessary or improper to ask that person to conform their responses to the question asked? I don't see this as inexcusable, nor do I see what I've done as anything different, though presentation may have been.

Attempting to follow your added information about @SW_SHOWNA, I was unable to find any content on any of the links you'd posted(in the quote block about 3 lines prior) about @SW_SHOWNA. I searched the AutoIt documentation and the only information provided was for _WinAPI_ShowWindow, which is not used anywhere in FreeText.au3.

I'm not saying it doesn't exist, I'm saying it does not exist in the first link of either of those two links, including the actual page those links go to. It'd be helpful if you put a link to the page with that information directly.

Malkey - Though your solution does draw text without a GUI, and without borders, it also only draws the text onto the desktop itself. When another program is brought on top of it, the text is covered up. This wouldn't really help if the text was supposed to be displayed over top of a game.

Heres an example of what a program (WC3Banlist.exe) looks like doing just what I'm trying to do: http://willhostforfood.com/?Action=download&fileid=77599

"Obviously you cannot tell whether or not this flickers. It slowly fades to nothing without affecting the game at all. Nothing happens when clicked."

Methods (again) that don't work and why:

GUI - Can have either a physical form or simply floating text. Problem: if, say, there's a while/sleep combination, every time sleep ends, it takes focus from CPU.

ToolTip - Can be displayed anywhere. Problems: There is a box around the text, with a background, Does not supercede the games draw events, causing a constant flickering affect. And if one clicks on the ToolTip, the game minimizes...

liten's Method - Writes content to the Console. Problem: other than storage of data, this doesn't really draw the content to the screen.

Malkey's Method - Draws floating text, that doesn't really interfere with other programs. Problem: the text is only drawn on the desktop, when another window (including games) is above it, the text is invisible.

Edited by CerealKilla

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

@CerealKilla

Wow that was a long answer >_< .

Unfortunately no-one has made a function for DirectX hooks in AutoIt (which is what you need to display something ingame) so what your screenshot shows can't be done :(

Whatever you used previously to draw text like that was not in AutoIt or not in a game, which brings us back to func's like ToolTip() etc...

Edit: Well maybe it's possible to use ToolTip's or GUI's ontop if the game is running windowed (I don't really know but worth a try), but then we're back at func's you don't wanna use again...

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

@CerealKilla

Wow that was a long answer >_< .

Unfortunately no-one has made a function for DirectX hooks in AutoIt (which is what you need to display something ingame) so what your screenshot shows can't be done :(

Whatever you used previously to draw text like that was not in AutoIt or not in a game, which brings us back to func's like ToolTip() etc...

Edit: Well maybe it's possible to use ToolTip's or GUI's ontop if the game is running windowed (I don't really know but worth a try), but then we're back at func's you don't wanna use again...

lol I've written longer

Yea I'm starting to think that I had drawn text on my right monitor, and when I opened my game up, it was on the desktop on the right monitor while the game was running on the left, and I got in my head that they'd been on the same monitor...

Share this post


Link to post
Share on other sites

Just keep a-killing that cereal!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
Posted Image

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

that picture is somewhat irrelevant... but i like the picture anyway XD i miss that website (i apologize for the off topic reply)

edit... apologize yet again.. did not see post #16

Edited by CodyBarrett

Share this post


Link to post
Share on other sites

I think that pic is TOTALLY relevant!!!

... Good One Info!!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

I know for a fact that the way that I'd done it before did not involve a gui, and am not asking for A solution to my question. I'm asking for THE solution to my question. I quite clearly asked for someone to try to tell me how I did it previously, not using GUI. That's not vague in the slightest. There are only x number of functions in AutoIt,

To be able to tell you how you did it previously would mean we'd need access to every script you ever wrote.

I'm sure you think that's a reasonable request... >_<

Yea I'm starting to think that I had drawn text on my right monitor, and when I opened my game up, it was on the desktop on the right monitor while the game was running on the left, and I got in my head that they'd been on the same monitor...

Anyway, on behalf of the rest of the members who attempted to help, apology(?) accepted :(

Edit: Damnit, on post #8 I hit the plus reputation button when I meant to hit the MultiQuote...

Edited by ResNullius

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