Star Trek Online Group
Reply To: Omega-Beta Script
So i’ve been playing arounc a bit with the script. I’m a programmer, although i’ve never used AutHotkey before. I’ve implemented the text functionality myself.:
; Put the below in the auto-execute section of your script, that is at the top. 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</p><p>#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.</p><p>SendMode Input ; Recommended for new scripts due to its superior speed and reliability.</p><p>;CoordMode, pixel, screen</p><p>CoordMode, mouse, screen </p><p>^!NumPad5::</p><p>OSD("Bot In search mode", "Red", "500", "Arial", "14")</p><p>KeepLoop=1</p><p>time := A_Now</p><p>time += 60, Seconds</p><p>Loop</p><p>{</p><p>if (KeepLoop=0)</p><p>Return</p><p>else</p><p>PixelSearch, Px, Py, 935, 483, 949, 720, 0x3497CB, 10, Fast RGB</p><p>if !ErrorLevel </p><p> {</p><p> OSD("Detect 1", "Red", "500", "Arial", "14")</p><p> MouseMove, 1000, 501, 2</p><p> Sleep, 10</p><p> Send {Click}</p><p> }</p><p>else</p><p> Sleep, 0</p><p>PixelSearch, Px, Py, 935, 483, 949, 720, 0x323C9B, 10, Fast RGB</p><p>if !ErrorLevel </p><p> {</p><p> OSD("Detect 2", "Red", "500", "Arial", "14")</p><p> MouseMove, 1000, 560, 2</p><p> Sleep, 10</p><p> }</p><p>else</p><p> Sleep, 0</p><p>PixelSearch, Px, Py, 935, 483, 949, 720, 0x47E0D2, 10, Fast RGB</p><p>if !ErrorLevel </p><p> {</p><p> OSD("Detect 3", "Red", "500", "Arial", "14")</p><p> MouseMove, 1000, 618, 2</p><p> Sleep, 10</p><p> }</p><p>else</p><p> Sleep, 0</p><p>PixelSearch, Px, Py, 935, 483, 949, 720, 0x6C3FC1, 10, Fast RGB</p><p>if !ErrorLevel </p><p> {</p><p> OSD("Detect 4", "Red", "500", "Arial", "14")</p><p> MouseMove, 1000, 681, 2</p><p> Sleep, 10</p><p> }</p><p>else</p><p> Sleep, 0</p><p> </p><p>if (A_Now = time)</p><p> {</p><p> OSD("Bot In Reaccept Cycle", "Red", "500", "Arial", "14")</p><p> MouseMove, 1015, 420, 2</p><p> Sleep, 500</p><p> MouseClick</p><p> Sleep, 1000</p><p> MouseMove, 969, 624, 2</p><p> Sleep, 500</p><p> MouseClick</p><p> Sleep, 3000</p><p> MouseMove, 836, 700, 2</p><p> MouseMove, 845, 700, 5</p><p> Sleep, 500</p><p> Click, down</p><p> Sleep, 10</p><p> Click, up</p><p> Sleep, 1500</p><p> MouseMove, 1015, 420, 2</p><p> Sleep, 500</p><p> MouseClick</p><p> Sleep, 500</p><p> MouseMove, 975, 585, 2</p><p> Sleep, 500</p><p> MouseClick</p><p> Click, down</p><p> Sleep, 10</p><p> Click, up</p><p> MouseMove, 1015, 420</p><p> Click</p><p> Sleep, 10</p><p> Click</p><p> Send {Click}</p><p> time := A_Now</p><p> time += 60, Seconds</p><p> }</p><p>}</p><p>return</p><p>^!NumPad6::</p><p>OSD("Bot Inactive", "Red", "500", "Arial", "14")</p><p>KeepLoop=0</p><p>Return</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.</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