Jump to content

How do I position a Splash on the screen (bottom right)?


Recommended Posts

Just calculate the desktop width/height minus the window size.  For example:

#include <Array.au3>
#include <AutoItConstants.au3>

;~ Example 1
Local $aTrayPos = WinGetPos("", "[CLASS: Shell_TrayWnd]")
$sMessage = ""
SplashTextOn("TitleFoo", $sMessage, 300, 50, $aTrayPos[2] - 325, $aTrayPos[3] - 100, $DLG_TEXTLEFT, "")
For $i = 1 To 20
    $sMessage = $sMessage & $i & @CRLF
    ControlSetText("TitleFoo", "", "Static1", $sMessage)
    Sleep(100)
Next
SplashOff()

;~ Example 2
$sMessage = ""
SplashTextOn("TitleFoo", $sMessage, 300, 50, @DesktopWidth - 305, @DesktopHeight - 125, $DLG_TEXTLEFT, "")
For $i = 1 To 20
    $sMessage = $sMessage & $i & @CRLF
    ControlSetText("TitleFoo", "", "Static1", $sMessage)
    Sleep(100)
Next

 

Link to post
Share on other sites

Couldn't see the image, this works for me:

#include <Array.au3>
#include <StringSize.au3> ;~ https://www.autoitscript.com/forum/topic/114034-stringsize-m23-new-version-16-aug-11/

Local $sGuiTitle = '11111111111111111111111111111'
Local $aStringSize = _StringSize($sGuiTitle)
ToolTip ( '1111111111111111111111111' & @Crlf, @DesktopWidth - $aStringSize[2], @DesktopHeight - (60 + $aStringSize[3]), $sGuiTitle, 0, 4 )
Sleep(3000)

 

Link to post
Share on other sites
12 hours ago, Subz said:

לא יכולתי לראות את התמונה, זה עובד בשבילי:

#include <Array.au3>
#include <StringSize.au3> ;~ https://www.autoitscript.com/forum/topic/114034-stringsize-m23-new-version-16-aug-11/

Local $sGuiTitle = '11111111111111111111111111111'
Local $aStringSize = _StringSize($sGuiTitle)
ToolTip ( '1111111111111111111111111' & @Crlf, @DesktopWidth - $aStringSize[2], @DesktopHeight - (60 + $aStringSize[3]), $sGuiTitle, 0, 4 )
Sleep(3000)

 

Thanks for your help.

Error 
>"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\PC\Desktop\1.au3"    
C:\Users\PC\Desktop\1.au3 (2) : ==> Error opening the file.: 
#include <StringSize.au3> 

>Exit code: 1    Time: 0.1016

Delete the picture,
I don't need the picture.
only Splash. 
That there always will be 
On the bottom right
apologetic
I didn't make it.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...