gkarasik Posted May 18, 2015 Share Posted May 18, 2015 Hi,I'm a newbie both to this forum and to programming.Necessity brought me here. I needed and was provided with a script someone wrote that shows the system time on a ToolTip on the desktop but with a +5-minute offset. It's just what I need, but I'm having a problem with it because the user for whom it's intended has a pair of wide-screen monitors she keeps at high resolution, so, as the script is written, the Time-Telling ToolTip's location is wrong. I am able to relocate it via a trial-and-error process of changing the script's screen coordinates, but the user has the annoying habit of constantly changing her screen resolution, so the ToolTip's location will change with it. What I'm asking for help with--presuming it's even possible--is suggestions for adding to the script the ability to move the ToolTIp's location via a key-stroke combination, for example Ctrl-Shft-U to move the ToolTIp up, Ctrl-Shift-D to move it down, Ctrl-Shft-R to move it right, and Ctrl-Shft-L to move it left (doesn't need to be Ctrl-Shif--any key-combination will do).I will much appreciate anyone's taking time to help me with this.GaryK Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 18, 2015 Moderators Share Posted May 18, 2015 gkarasik,An easier solution would be to check periodically for the screen resolution and adjust the tooltip position as required. Can you post the script you have so we can see how this might best be implemented.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
MilesAhead Posted May 18, 2015 Share Posted May 18, 2015 (edited) Also you can have it change "automatically" by detecting WM_SETTINGCHANGE message. It helps too instead of hard coding pixel positions if you get the current desktop width and height and covert your position and size info into percentages. Then if the user changes the screen res at least you are in the ball park and can just check for extending past the screen edge etc.. Edited May 18, 2015 by MilesAhead spelling My Freeware Page Link to comment Share on other sites More sharing options...
iamtheky Posted May 18, 2015 Share Posted May 18, 2015 heres a newbie way to move it utilizing the arrow keys. But as described above, there are better ways to detect screen area and present information.#include <Misc.au3> $msg = ("This is a test") Tooltip($msg) while 1 If _IsPressed("25") Then Tooltip($msg , 0 , @DesktopHeight - 30) If _IsPressed("26") Then Tooltip($msg , 0 , 0) If _IsPressed("27") Then Tooltip($msg , @DesktopWidth - 200 , 0) If _IsPressed("28") Then Tooltip($msg , @DesktopWidth - 200 , @DesktopHeight - 30) sleep(50) wend ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now