Jump to content

Need a Pop-Up to showup after a given amount of time Script (NEED HELP, VERY SIMPLE SCRIPT)


 Share

Recommended Posts

All I want is a program that pops up a message or notification every xx minutes. The only things that I want to be able to configure is the message that's popped up, and the frequency it is popped up. (Need an input box so I can add information)

As far as the "pop up" all I want is a simple notification, akin to those of microsoft updates (when there are updates and it pops up in the lower-right corner) or AIM (sign on notifications).

Here are some examples of what I mean:

Posted Image

Posted Image

I want the message size to be bigger -- about big enough to fit 3-4 sentences with size 14 font. There doesn't need to be animation (it can just flash for like 5 seconds then dissappear for xx minutes).

If I'm missing anything, pm me.

Thanks

Here is my example code:

$Message = "Place Text Here"
$TimeInterval = "5000"
$MessageTitle = "Message Title"
$x = "0"
$MajorDelay = "10000"


$Input = InputBox ( "Input", 1 , 0 , "" )
;Don't know how to translate string into variable...
;I need three input boxes: Time between each pop-up (frequency), message that is inside the box

Do
$window = ToolTip ( $Message , 1326 , 1077 , $MessageTitle , 1 , 2 )
Send ($window)
sleep($TimeInterval)
ProcessClose($window)
Until $x = 1
Link to comment
Share on other sites

See if this works for you. I might've misunderstood what you wanted.

Message = "Place Text Here"
$TimeInterval = "5000"
$MessageTitle = "Message Title"
$x = "0"
$MajorDelay = "10000"


$Input = InputBox ("Enter New Message", "Enter New Message Below", "", "", 200, 120, -1, -1, 10000)
If $Input <> "" And $Input <> 1 And $Input <> 2 Then $Message = $Input; If string is not empty and "cancel" wasn't pressed and inputbox didn't time out then message is whatever you entered, otherwise default message displayed.


While 1
$window = TrayTip($MessageTitle, $Message, 5, 1)
sleep($TimeInterval)
WEnd
Live and Learn, 'cause Knowledge is Super Power.
Link to comment
Share on other sites

Thank you very much...that was exactly what I needed. I have one more problem though. How can I make the ToolTip JUST SHOW UP FOR like 5 seconds than go away and take i gigantic sleep break after that. Here is my updated code:

$Message = "Place Text Here"
$TimeInterval = "5000"
$MessageTitle = "Message Title"
$x = "0"
$MajorDelay = "10000"


$Input1 = InputBox ("Enter The Message That You Want To Pop-Up", "Enter The Message That You Want To Pop-Up Below", "", "", 500, 520, -1, -1, 10000)
If $Input1 <> "" And $Input1 <> 1 And $Input1 <> 2 Then $Message = $Input1; If string is not empty and "cancel" wasn't pressed and inputbox didn't time out then message is whatever you entered, otherwise default message displayed.

$Input2 = InputBox ("Enter Frequency of Pop-Ups in Seconds", "1000 = 1 second, 5000 = 5 seconds, 60000 = 1 minute", "", "", 500, 520, -1, -1, 10000)
If $Input2 <> "" And $Input2 <> 1 And $Input2 <> 2 Then $TimeInterval = $Input2; If string is not empty and "cancel" wasn't pressed and inputbox didn't time out then message is whatever you entered, otherwise default message displayed.

While 1
sleep($TimeInterval)
$window = ToolTip ( $Message , 1326 , 1077 , $MessageTitle , 1 , 2 )
sleep($TimeInterval)
;WinKill($window) ----- This is where I want the ToolTip to be killed/removed.
sleep($MajorDelay)
WEnd
Link to comment
Share on other sites

$Message = "Place Text Here"
$TimeInterval = "5000"
$MessageTitle = "Message Title"
$x = "0"
$MajorDelay = "10000"


$Input1 = InputBox ("Enter The Message That You Want To Pop-Up", "Enter The Message That You Want To Pop-Up Below", "", "", 500, 520, -1, -1, 10000)
If $Input1 <> "" And $Input1 <> 1 And $Input1 <> 2 Then $Message = $Input1; If string is not empty and "cancel" wasn't pressed and inputbox didn't time out then message is whatever you entered, otherwise default message displayed.

$Input2 = InputBox ("Enter Frequency of Pop-Ups in Seconds", "1000 = 1 second, 5000 = 5 seconds, 60000 = 1 minute", "", "", 500, 520, -1, -1, 10000)
If $Input2 <> "" And $Input2 <> 1 And $Input2 <> 2 Then $TimeInterval = $Input2; If string is not empty and "cancel" wasn't pressed and inputbox didn't time out then message is whatever you entered, otherwise default message displayed.

While 1
sleep($TimeInterval)
$window = ToolTip ( $Message , @DesktopWidth - 100 , @DesktopHeight - 100, $MessageTitle , 1 , 2 )
sleep($TimeInterval)
ToolTip("")
sleep($MajorDelay)
WEnd

This should do the trick. Just change ToolTip coordinates to whatever you want.

Live and Learn, 'cause Knowledge is Super Power.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...