Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Is there a way to write "Text" on Desktop, above W


  • Please log in to reply
39 replies to this topic
Hans2008
  • Guests
  • Last active:
  • Joined: --
I tried this and the other examples. It works well except for one problem.

Some space of the desktop is blocked. For example placing an icon in that area it is not possible.

Is there a way to write text above wallpaper, but under icons?

Thanks! Hans

Hans2008
  • Guests
  • Last active:
  • Joined: --
The code doesn't work for me. The window is completely visible, even the text.

The example below only works if I remove the following line
winset, transcolor, FF00FF, ahk_pid %pid%

I am on Vista.

Hans


Here's a working example:

#singleinstance force
; #notrayicon

process, exist
pid = %errorlevel%

gui, color, FF00FF
gui, font, s14 cFFFFFF, arial bold

; 0x02000000 = WS_CLIPCHILDREN, prevents parent window from redrawing over child window
gui, -caption +toolwindow +0x02000000 ; toolwindow stops flicker of icon in taskbar

gui, add, text, x0 y0, Hello World!

winminimizeall

gui, show, x20 y20
winset, transcolor, FF00FF, ahk_pid %pid%

; dock to desktop:
winget, hw_gui, ID, ahk_pid %pid%
winget, hw_desktop, ID, ahk_class Progman
DllCall("SetParent", "uint", hw_gui, "uint", hw_desktop)

return



EricCartman
  • Members
  • 60 posts
  • Last active: Oct 26 2010 12:50 PM
  • Joined: 13 Oct 2008
Rainmeter and/or Rainlendar... freeware of awesomeness... because Rainmeter uses .ini files (not sure about Rainlendar), you can use IniRead and IniWrite ahk commands to automate a whole lot of stuff.

Drugwash
  • Members
  • 1078 posts
  • Last active: May 24 2016 04:20 PM
  • Joined: 07 Sep 2008
Except Rainmeter won't work in Win9x anymore. Remember SKAN originally wanted this for Win98 and frankly I've thought a few times about having such tool myself for my 98SE.

GDIP could well offer some fake transparency, I believe, although I didn't have time to play with its functions.

(AHK 1.0.48.05 and Win98SE) forever | My scripts are here


EricCartman
  • Members
  • 60 posts
  • Last active: Oct 26 2010 12:50 PM
  • Joined: 13 Oct 2008

Except Rainmeter won't work in Win9x anymore. Remember SKAN originally wanted this for Win98 and frankly I've thought a few times about having such tool myself for my 98SE.


That was almost three years ago. Hans2008 posted recently and he's using Vista.

Drugwash
  • Members
  • 1078 posts
  • Last active: May 24 2016 04:20 PM
  • Joined: 07 Sep 2008
My bad. Old habit of mine, recommending something that works in all operating systems or at least mention alternatives. I erroneously assumed everybody would do the same. My apologies.

(AHK 1.0.48.05 and Win98SE) forever | My scripts are here


EricCartman
  • Members
  • 60 posts
  • Last active: Oct 26 2010 12:50 PM
  • Joined: 13 Oct 2008

My bad. Old habit of mine, recommending something that works in all operating systems or at least mention alternatives. I erroneously assumed everybody would do the same. My apologies.

That's a good policy, and no worries, no offense taken. Out of curiosity, is it a patch in Win98 that made Rainmeter not work, or an update of Rainmeter? If it's an update of Rainmeter that made it incompatible, a legacy version should still work.

Drugwash
  • Members
  • 1078 posts
  • Last active: May 24 2016 04:20 PM
  • Joined: 07 Sep 2008
It's the Rainmeter code itself. I've tried to build it in VC6 and got hundreds of errors related to unsupported functions and whatnot. I eventually gave up. Nothing that can't be done in AHK anyway, it just takes a bit of time.

Using older, unsupported versions wouldn't pay off if they are buggy. In that case, one would be better off building their own applications from scratch or find alternatives that are still supported and being worked on.

(AHK 1.0.48.05 and Win98SE) forever | My scripts are here


CH Lee
  • Guests
  • Last active:
  • Joined: --
Hi,

I Googled and found this autohotkey with the transparent text on desktop script by Serenity, very good.

As a way to show my gratitude, I compiled this Portable Autohotkey (no installation required).

http://www.megaupload.com/?d=6QERY5QU

Regards.

Psycho.Mario
  • Members
  • 28 posts
  • Last active: Apr 14 2009 08:38 PM
  • Joined: 21 Mar 2009
Is it possible to put this BEHIND desktop icons? So the icons can be seen over the top and clicked and stuff?

Thanks

sorockinalex
  • Guests
  • Last active:
  • Joined: --
Help me please!
This is not working when i printing
CreateRectF(RectangleArea, 0, 0, 1000, 300)
DllCall("User32.dll\DrawTextEx", hDC, "text to print", "int", RectangleArea, "DT_BOTTOM", "NULL")


sorockinalex
  • Guests
  • Last active:
  • Joined: --
this is my problem:
I need to determine each letter width to summ it. Depending woth SummWidth i need to wrap rows or narrow wrapped row
And i must do this when i'm printing
This is script:
; Start gdi+
If !pToken := Gdip_Startup()
{
   MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system
   ExitApp
}
OnExit, Exit

Document_Name :="Print_job"
DllCall("LoadLibrary","str","comdlg32.dll")
VarSetCapacity(PRINTDIALOG_STRUCT,66,0), NumPut(66,PRINTDIALOG_STRUCT)

NumPut((PD_RETURNDC:=0x100),PRINTDIALOG_STRUCT,20)
if !DllCall("comdlg32\PrintDlgA","uint",&PRINTDIALOG_STRUCT)
    return

if (hDevMode := NumGet(PRINTDIALOG_STRUCT,8))
    DllCall("GlobalFree","uint",hDevMode)
if (hDevNames := NumGet(PRINTDIALOG_STRUCT,12))
    DllCall("GlobalFree","uint",hDevNames)
; Get the newly created printer device context.
if !(hDC := NumGet(PRINTDIALOG_STRUCT,16))
    return

....


VarSetCapacity(DOCUMENTINFO_STRUCT,20,0), NumPut(20,DOCUMENTINFO_STRUCT), NumPut(&Document_Name,DOCUMENTINFO_STRUCT,4)
if DllCall("StartDoc","uint",hDC,"uint",&DOCUMENTINFO_STRUCT,"int") > 0
{
    if DllCall("StartPage","uint",hDC,"int") > 0
    {
        G := Gdip_GraphicsFromHDC(hdc)
        DllCall("gdiplus\GdipSetPageUnit","uint",G,"int",2)
        Gdip_SetSmoothingMode(G, 4)

!!!!!!!!!!!!!!!!!!!!!!!!!!!THIS IS NOT WORKING!!!!
CreateRectF(RectangleArea, 0, 0, 1000, 300)
		DllCall("User32.dll\DrawTextEx", G, "some text", 1000, RectangleArea,"DT_WORDBREAK", "")


IT WORKS!
		xPos:=18.25*xdpi/2.54
		Options = x%xPos% y%yPos% Center cffffffff r4 s70 Italic 
		Gdip_TextToGraphics(G, "Примечание", Options, Font)


sorockinalex
  • Guests
  • Last active:
  • Joined: --
also not working
DllCall("User32.dll\DrawTextEx", hDC, "some text", 1000, RectangleArea,"DT_WORDBREAK", "")


sorockinalex
  • Guests
  • Last active:
  • Joined: --
Guys! help please!!!
also not working
CreateRectF(RectF, 110, 110, 1000, 300)
		DllCall("User32.dll\DrawTextEx", hDC, "some text", 3000, &RectF,DT_WORDBREAK, 0)
		DllCall("User32.dll\DrawTextEx", hDC, "some text", 3000, &RectF,"DT_WORDBREAK", 0)
		DllCall("User32.dll\DrawTextEx", hDC, some text, 3000, &RectF,DT_WORDBREAK, 0)
		DllCall("User32.dll\DrawTextEx", G, "some text", 3000, &RectF,DT_WORDBREAK, 0)
		DllCall("User32.dll\DrawTextEx", G, "some text", 3000, &RectF,"DT_WORDBREAK", 0)
		DllCall("User32.dll\DrawTextEx", G, some text, 3000, &RectF,DT_WORDBREAK, 0)
		DllCall("User32.dll\DrawTextEx", G, "some text", 3000, &RectF,"DT_WORDBREAK", 0)
		DllCall("User32.dll\DrawTextEx", G, "some text", 3000, RectF,"DT_WORDBREAK", 0)


Drugwash
  • Members
  • 1078 posts
  • Last active: May 24 2016 04:20 PM
  • Joined: 07 Sep 2008
You haven't defined the parameter types in your dll calls. Try this:
DllCall("User32\DrawTextEx", UInt, hDC, Str, "some text", UInt, 3000, UInt, &RectF, UInt, DT_WORDBREAK, UInt, 0)