Jump to content
Sign in to follow this  
zeroZshadow

Popup maker

Recommended Posts

zeroZshadow

i make a scripts that creates a MSN like poup, just for the fun of it :D

have fun with it

#notrayicon
#include <GUICONSTANTS.au3>
_Popup("hallo daar",2000)

Func _Popup($text,$sleep)
dim $Y = @DesktopHeight
$handle = GUICreate("Popup",100,100,@DesktopWidth-110,@DesktopHeight,0x80040000,0x00000088)
$label1 = GUICtrlCreateLabel($text,5,10,95,90)
GUISetState()
for $i = 1 to 14
    WinMove ( "Popup","",@DesktopWidth-110,$Y)
    $Y = $Y-10
    sleep(100)
Next
WinMove ( "Popup","",@DesktopWidth-110,$Y+8)
$Y = $Y-8
sleep($sleep)
WinMove ( "Popup","",@DesktopWidth-110,$Y-8)
$Y = $Y+10
for $i = 1 to 14
    WinMove ( "Popup","",@DesktopWidth-110,$Y)
    $Y = $Y+10
    sleep(100)
Next
EndFunc

btw its pretty handy for instead of balloons or whatever :)


*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...

Share this post


Link to post
Share on other sites
layer

yea that's actually pretty cool, why didnt i think of something like that! good work


FootbaG

Share this post


Link to post
Share on other sites
zeroZshadow

thanks man :D

i'm trying to make one now, with an msn style :D (just a picture :))


*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...

Share this post


Link to post
Share on other sites
zeroZshadow

newer version is done, i upload the image also

#notrayicon
#include <GUICONSTANTS.au3>
FileInstall("C:\Documents and Settings\zeroZshadow\Mijn documenten\autoitscripts\petprogram\popup.bmp",@ScriptDir&"\popup.bmp")
_Popup("I am a Popup :P",2000)


Func _Popup($text,$sleep)
dim $Y = @DesktopHeight
$handle = GUICreate("Popup",181,116,@DesktopWidth-191,@DesktopHeight,0x80000000,0x00000088)
GUICtrlCreatePic (@ScriptDir&"\popup.bmp",0,0,181,116,0x0100)
$label1 = GUICtrlCreateLabel($text,10,30,171,86)
GUISetState()
for $i = 1 to 16
    WinMove ( "Popup","",@DesktopWidth-191,$Y)
    $Y = $Y-10
    sleep(100)
Next
sleep($sleep)
for $i = 1 to 16
    WinMove ( "Popup","",@DesktopWidth-191,$Y)
    $Y = $Y+10
    sleep(100)
Next
EndFunc
Edited by zeroZshadow

*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...

Share this post


Link to post
Share on other sites
Mosquitos

Is it not better if you create a tempdir and that you delete the tempdir if the popup closed.Like this:

#notrayicon
#include <GUICONSTANTS.au3>
FileInstall("C:\popup.bmp",@TempDir & "\popup.bmp")
_Popup("I am a Popup :P",2000)


Func _Popup($text,$sleep)
dim $Y = @DesktopHeight
$handle = GUICreate("Popup",181,116,@DesktopWidth-191,@DesktopHeight,0x80000000,0x00000088)
GUICtrlCreatePic (@TempDir & "\popup.bmp",0,0,181,116,0x0100)
$label1 = GUICtrlCreateLabel($text,10,30,171,86)
GUISetState()
for $i = 1 to 16
    WinMove ( "Popup","",@DesktopWidth-191,$Y)
    $Y = $Y-10
    sleep(100)
Next
sleep($sleep)
for $i = 1 to 16
    WinMove ( "Popup","",@DesktopWidth-191,$Y)
    $Y = $Y+10
    sleep(100)
    
If $handle = $GUI_EVENT_CLOSE Then
      FileDelete(@TempDir & "\popup.bmp")
   EndIf
Next
EndFunc

ps: My birthday is 4october :)

Edited by Mosquitos

Sapiente vince, rex, noli vincere ferro!

Share this post


Link to post
Share on other sites
zeroZshadow

i know about the temp dir, but i needed to be sure that it wrote is, so i took the scriptdir :)

btw, why do u delete the temp dir???

just leave it there


*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...

Share this post


Link to post
Share on other sites
zeroZshadow

oooo shit, i just see i left the BAD text into the popup example.

SORRY SORRY SORRY

i'll get it away, it was a text lenght test (i think :))


*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...

Share this post


Link to post
Share on other sites
Mosquitos

i know about the temp dir, but i needed to be sure that it wrote is, so i took the scriptdir :)

btw, why do u delete the temp dir???

just leave it there

<{POST_SNAPBACK}>

Omdat hij als je het script gebruikt de popup.bmp achterliet in uw map.

Because if you use the script he left the popup.bmp into the map.


Sapiente vince, rex, noli vincere ferro!

Share this post


Link to post
Share on other sites
zeroZshadow

dat zou ut allen maar sneller maken als je de volgende keer opstart :)

That would only make it faster when u use it next time :D

rare jongens, die belgen XD


*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...

Share this post


Link to post
Share on other sites
buzz44

I was looking at msdn yesterday and found this exact 'topic' of creating a popup window (Windows messenger style) and you can put whatever text you want in it, like a proper one that Messenger uses, but, I can't find the link and I dont think my History recorded the site :D. Might be good to poke around but :).


qq

Share this post


Link to post
Share on other sites
Mosquitos

I use it to remind me for importent things :)

Or is there a script for a reminder?


Sapiente vince, rex, noli vincere ferro!

Share this post


Link to post
Share on other sites
zeroZshadow

I was looking at msdn yesterday and found this exact 'topic' of creating a popup window (Windows messenger style) and you can put whatever text you want in it, like a proper one that Messenger uses, but, I can't find the link and I dont think my History recorded the site :D. Might be good to poke around but :).

<{POST_SNAPBACK}>

PLEAS TRY TO FIND THAT TOPIC!!!

i am searching for it for 2 days, but i just can't find it.

thats why i made this.

btw there IS a topic about how to sync the toasts (popups)

pleas try to remeber what u did.


*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...

Share this post


Link to post
Share on other sites
buzz44

I will lol. I was first looking at the AnimateWindow Function and then I sort of looked around form there. I think it might have something to do with window property's? Maybe ask Larry, he seems to know about Dll Calls and stuff.


qq

Share this post


Link to post
Share on other sites
FrashMX

Very nice!

Is it somehow possible to determine the top co-ords of the start menu? I like to stretch the taskbar when I use alot programs so it would be cool if the popup would not overrule the start menu/taskbar.

Share this post


Link to post
Share on other sites
zcoacoaz

yeah, and it looks kind of ugly for me because i have my taskbar on the left hand side of my screen


[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Share this post


Link to post
Share on other sites
TuMbLeWeEd

Very nice!

Is it somehow possible to determine the top co-ords of the start menu? I like to stretch the taskbar when I use alot programs so it would be cool if the popup would not overrule the start menu/taskbar.

<{POST_SNAPBACK}>

You can do it like this:
$pos = ControlGetPos("Program Manager", "", "SysListView321")
    $x = $pos[2];X position
    $y = $pos[3];Y position

This wil get the workable desktop sizes

Your startmenu can be anywhere then

Share this post


Link to post
Share on other sites
TuMbLeWeEd

Very nice!

Is it somehow possible to determine the top co-ords of the start menu? I like to stretch the taskbar when I use alot programs so it would be cool if the popup would not overrule the start menu/taskbar.

<{POST_SNAPBACK}>

You can do it like this:
$array = ControlGetPos("Program Manager", "", "SysListView321")
    $x = $array[0];X position 
    $y = $array[1];Y position 
    $w = $array[2];Width 
    $h = $array[3];Height

This wil get the workable desktop sizes and possition

You can figureout on the X and Y positions where your start menu is located and the Width and Height is your real desktopsize

Edited by TuMbLeWeEd

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.