Jammer Posted March 14, 2007 Share Posted March 14, 2007 Sleep(10000) $number = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\I-Love-You\", "NO") $line = FileReadLine("data.dat",$number) if @error = -1 Then $number = 1 $line = FileReadLine("data.dat",$number) EndIf TrayTip("Dar vienas budas pasakyti kad myli...",$line,5) Sleep(5000) RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\I-Love-You\", "NO", "REG_SZ",$number+1) so i have words i love you in 180 different languages stored in data.dat. When this file is run after 10 seconds it should show a traytip with the words. and show different words every time. everything works fine when you(the user) run the file but if the file is run by registry startup the traytip does not appear for some reason. i even made a launcher program which is ran by startup. the launcher program is started by registry startup then it waits 120 seconds and does Run("I-Love-You.exe") ... the i love you icon on the tray appears but still it does not show the traytip for some reason. Help? Link to comment Share on other sites More sharing options...
SadBunny Posted March 14, 2007 Share Posted March 14, 2007 Sleep(10000) $number = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\I-Love-You\", "NO") $line = FileReadLine("data.dat",$number) if @error = -1 Then $number = 1 $line = FileReadLine("data.dat",$number) EndIf TrayTip("Dar vienas budas pasakyti kad myli...",$line,5) Sleep(5000) RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\I-Love-You\", "NO", "REG_SZ",$number+1) so i have words i love you in 180 different languages stored in data.dat. When this file is run after 10 seconds it should show a traytip with the words. and show different words every time. everything works fine when you(the user) run the file but if the file is run by registry startup the traytip does not appear for some reason. i even made a launcher program which is ran by startup. the launcher program is started by registry startup then it waits 120 seconds and does Run("I-Love-You.exe") ... the i love you icon on the tray appears but still it does not show the traytip for some reason. Help? Seems that this code only reads a line and traytips it ONCE, then exits. This is what you intended? Note that when a tray icon disappears, the traytip also disappears. Also note that the TrayTip help states that Windows has roughly lower-upper limits of 10-30 sec. for showing traytips. To go short, what if you do this: Sleep(10000) $number = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\I-Love-You\", "NO") $line = FileReadLine("data.dat",$number) if @error = -1 Then $number = 1 $line = FileReadLine("data.dat",$number) EndIf TrayTip("Dar vienas budas pasakyti kad myli...",$line,15); *** INCREASED DURATION *** Sleep(15000); *** INCREASED DURATION *** RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\I-Love-You\", "NO", "REG_SZ",$number+1) Roses are FF0000, violets are 0000FF... All my base are belong to you. 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