Reply To: Omega-Beta Script

My previous post was the whole script with my modifications. To modify what you already have, do the following:

; Put the below in the auto-execute section of your script, that is at the top. This is the initalisation part that prepares some settings. There can be no "hotkey::" command, no return, and no hotstring above this, or it won't get activated.</p><p>OSDColour2 = EAAA99 ; Can be any RGB color (it will be made transparent below).</p><p>Gui, 2: +LastFound +AlwaysOnTop -Caption +ToolWindow ; +ToolWindow avoids a taskbar button and an alt-tab menu item.</p><p>Gui, 2:Font, s128, Times New Roman ; Set a large font size (32-point).</p><p>Gui, 2:Add, Text, vOSDControl cBlue x0 y0, XXXXXXYYYYYY ; XX & YY serve to auto-size the window; add some random letters to enable a longer string of text (but it might not fit on the screen).</p><p>Gui, 2:Color, %OSDColour2%</p><p>WinSet, TransColor, %OSDColour2% 110 ; Make all pixels of this color transparent and make the text itself translucent (150)</p><p>Gui, 2:Show, NoActivate, OSDGui</p><p>Gui, 2:Show, Hide<br><br><br></p><p>; Put the below anywhere in your script that is not part of a subroutine. Not at the point where you want the actual text to appear on screen: just at the bottom of your script is fine. This is the logic that will get called whenever you want to display some text.</p><p>OSD(Text="OSD",Colour="Blue",Duration="300",Font="Times New Roman",Size="128")</p><p>{ ; Displays an On-Screen Display, a text in the middle of the screen.</p><p>Gui, 2:Font, c%Colour% s%Size%, %Font% ; If desired, use a line like this to set a new default font for the window.</p><p>GuiControl, 2:Font, OSDControl ; Put the above font into effect for a control.</p><p>GuiControl, 2:, OSDControl, %Text%</p><p>Gui, 2:Show, % "x" A_ScreenWidth-300 " y" A_ScreenHeight-130 " NoActivate", OSDGui, ; NoActivate avoids deactivating the currently active window; add "X600 Y800" to put the text at some specific place on the screen instead of centred.</p><p>SetTimer, OSDTimer, -%Duration%</p><p>Return </p><p>}</p><p>OSDTimer:</p><p>Gui, 2:Show, Hide</p><p>Return<br><br><br>; you can now put something on screen by inserting 'OSD()' into your code where you want the message to trigger. the inputs are: OSD(text<text>, text_colour<text_colour>, duration<display_duration>, font<font>, font_size<font_size>)<br>For example: <br><br>OSD("Detect 2", "Red", "500", "Arial", "14")<br></font_size></font></display_duration></text_colour></text><span>MouseMove, 1000, 560, 2<br></span></p><p><span>Sleep, 10