AutoHotkey Community

It is currently May 26th, 2012, 4:22 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: April 25th, 2007, 1:43 pm 
Offline

Joined: April 17th, 2007, 1:37 pm
Posts: 761
Location: Florida
I pulled the meat of this code from the tranlucent OSD example, and just changed it a bit for my purposes:

Code:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

; Example: On-screen display (OSD) via transparent window:

CustomColor = EEAA99  ; Can be any RGB color (it will be made transparent below).
Gui +LastFound +AlwaysOnTop -Caption +ToolWindow  ; +ToolWindow avoids a taskbar button and an alt-tab menu item.
Gui, Color, %CustomColor%
Gui, Font, s32  ; Set a large font size (32-point).
Gui, Add, Text, vMyText cLime, SCRIPT RUNNING - ALT+Z TO ABORT  ; XX & YY serve to auto-size the window.
; Make all pixels of this color transparent and make the text itself translucent (150):
WinSet, TransColor, %CustomColor% 150
Gui, Show, xCenter y0 NoActivate  ; NoActivate avoids deactivating the currently active window.
return


When running this in Win 2000, it had a translucent (pink I think) background... In XP it has no background. Does transparency act different in XP and 2000?

_________________
[Join IRC!]
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 25th, 2007, 5:04 pm 
Offline

Joined: October 9th, 2006, 8:19 pm
Posts: 236
Location: Finland
I had the same problem on my second instance of Windows XP.

After reading your post I spent about an hour to investigate what causes it.

The solution was simple: on my newer intallation of XP, colours were set to 16 bits, so the color RGB 0x99AAEE became 0x9CAAEF.

You have to use 32 bit (or 24 if available!?) colors or change CustomColor (the color that's made invisible on the example script) to match 16 bit colors eg. above mentioned 0x9CAAEF.

_________________
Pekka Vartto


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 25th, 2007, 5:10 pm 
Offline

Joined: April 17th, 2007, 1:37 pm
Posts: 761
Location: Florida
svi wrote:
I had the same problem on my second instance of Windows XP.

After reading your post I spent about an hour to investigate what causes it.

The solution was simple: on my newer intallation of XP, colours were set to 16 bits, so the color RGB 0x99AAEE became 0x9CAAEF.

You have to use 32 bit (or 24 if available!?) colors or change CustomColor (the color that's made invisible on the example script) to match 16 bit colors eg. above mentioned 0x9CAAEF.


Great catch!

I appreciate you taking the time to look into this, as it would have taken me much longer than an hour (if ever!) to find it.

_________________
[Join IRC!]
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 25th, 2007, 11:13 pm 
Offline

Joined: October 9th, 2006, 8:19 pm
Posts: 236
Location: Finland
No problem 8)

I tried to figure it out earlier, but thought that the TransColor has to be set after Gui, Show on certain circumstances, and tried to find out why, not primarly to solve it.
But this thread made me effort to fix the problem.

I think it should be mentioned in help file (Gui, OSD example) that Transcolor has to be the color that the video card produces, which may differ from the color defined by Gui, color, or use in the example some 16-bit color (means 5 bits for red, 6 for green and 5 for blue, but no idea how they are coded).

It's confusing that some image processing applications (at least ArcSoft PhotoStudio) show color values defined in the image file, while IrfanView and Window Spy show the value produced by the video card :?

_________________
Pekka Vartto


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 23rd, 2009, 8:59 pm 
Offline

Joined: September 19th, 2005, 1:31 am
Posts: 115
Took me about 30 minutes of screwing around (after my company upgraded my computer) to find out why I was having this same problem: My simple solution: Change my video card settings to 32bit (vs. 16 that it came defaulted at).

To do this: Right click on your desktop then Click

Properties - Settings Tab - Color quality dropdown

then select 24 or 32 bit.

Note: Perhaps the Help File can be updated to address this issue? :idea:


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, Cerberus, poserpro, SKAN, tterB, Yahoo [Bot] and 15 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group