Sign in to follow this  
Followers 0
tinkythomas

Splastext position with different screen resolution

8 posts in this topic

Hi,

I've been searching the forum for information regarding how to have splashtext appear in the same position regardless of screen resolution.

I thought I had found the answer with this line of code

SplashTextOn("", $message1, 350, 55, @DesktopWidth - 895, @DesktopHeight - 890, 1, "Tahoma", 10, 700)
using the macros @DesktopWidth, @DesktopHeight.

But when I run this code on another pc the splashtext appears in a different position, not centered top as on my pc. Can anyone suggest how I would achieve this?

Thank-you

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

I've been searching the forum for information regarding how to have splashtext appear in the same position regardless of screen resolution.

I thought I had found the answer with this line of code

SplashTextOn("", $message1, 350, 55, @DesktopWidth - 895, @DesktopHeight - 890, 1, "Tahoma", 10, 700)
using the macros @DesktopWidth, @DesktopHeight.

But when I run this code on another pc the splashtext appears in a different position, not centered top as on my pc. Can anyone suggest how I would achieve this?

Thank-you

try @desktopheight /2 and @desktopwidth/2

Edit~

That'd be too easy eh? doesnt work...same place, but not centered for some reason...

Edited by ReaImDown

[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]

Share this post


Link to post
Share on other sites

try @desktopheight /2 and @desktopwidth/2

Edit~

That'd be too easy eh? doesnt work...same place, but not centered for some reason...

Just as I was about to reply you had edited your post. It is not centered for some reason and not at the top of the screen.

Thanks anyway.

Share this post


Link to post
Share on other sites

for the position, just use "" , no number, just quotes. That will make it use the default position, which is centered.

I tried that but I need the splashtext also at the top of the screen. I did experiment and this code sems to work......
SplashTextOn("", $message1, 350, 55, -1, 3, 1, "Tahoma", 10, 700)
I have only tried this on my desktop pc and laptop which have different resolutions, and it seems ok. Will have to try this on the pc's at work to discover if this is reliable.

Thanks for your help though.

Share this post


Link to post
Share on other sites

Here are some Positions:

CODE
$Width = 350

$height = 55

SplashTextOn("", "Center Top", $Width, $height, Default, 0, 1, "Tahoma", 10, 700)

Sleep(1000)

SplashTextOn("", "Center Middle", $Width, $height, Default, Default, 1, "Tahoma", 10, 700)

Sleep(1000)

SplashTextOn("", "Center Bottom", $Width, $height, Default, @DesktopHeight-$height, 1, "Tahoma", 10, 700)

Sleep(1000)

SplashTextOn("", "Left Top", $Width, $height, 0, 0, 1, "Tahoma", 10, 700)

Sleep(1000)

SplashTextOn("", "Left Middle", $Width, $height, 0, Default, 1, "Tahoma", 10, 700)

Sleep(1000)

SplashTextOn("", "Left Bottom", $Width, $height, 0, @DesktopHeight-$height, 1, "Tahoma", 10, 700)

Sleep(1000)

SplashTextOn("", "Right Top", $Width, $height, @DesktopWidth-$Width, 0, 1, "Tahoma", 10, 700)

Sleep(1000)

SplashTextOn("", "Right Middle", $Width, $height, @DesktopWidth-$Width, Default, 1, "Tahoma", 10, 700)

Sleep(1000)

SplashTextOn("", "Right Bottom", $Width, $height, @DesktopWidth-$Width,@DesktopHeight-$height, 1, "Tahoma", 10, 700)

Sleep(1000)


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

Here are some Positions:

CODE
$Width = 350

$height = 55

SplashTextOn("", "Center Top", $Width, $height, Default, 0, 1, "Tahoma", 10, 700)

Sleep(1000)

SplashTextOn("", "Center Middle", $Width, $height, Default, Default, 1, "Tahoma", 10, 700)

Sleep(1000)

SplashTextOn("", "Center Bottom", $Width, $height, Default, @DesktopHeight-$height, 1, "Tahoma", 10, 700)

Sleep(1000)

SplashTextOn("", "Left Top", $Width, $height, 0, 0, 1, "Tahoma", 10, 700)

Sleep(1000)

SplashTextOn("", "Left Middle", $Width, $height, 0, Default, 1, "Tahoma", 10, 700)

Sleep(1000)

SplashTextOn("", "Left Bottom", $Width, $height, 0, @DesktopHeight-$height, 1, "Tahoma", 10, 700)

Sleep(1000)

SplashTextOn("", "Right Top", $Width, $height, @DesktopWidth-$Width, 0, 1, "Tahoma", 10, 700)

Sleep(1000)

SplashTextOn("", "Right Middle", $Width, $height, @DesktopWidth-$Width, Default, 1, "Tahoma", 10, 700)

Sleep(1000)

SplashTextOn("", "Right Bottom", $Width, $height, @DesktopWidth-$Width,@DesktopHeight-$height, 1, "Tahoma", 10, 700)

Sleep(1000)

Thank-you ProgAndy for the code, that's just what I wanted. So the position will be center-top regardless of screen resolution/size?

Thanks again for your help.

Share this post


Link to post
Share on other sites

So the position will be center-top regardless of screen resolution/size?

Right.

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


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
Sign in to follow this  
Followers 0